Response
stringlengths
15
2k
Instruction
stringlengths
37
2k
Prompt
stringlengths
14
160
Use absolute path in your form action:<form class="form" method="get" id="searchform" action="/searchrd">And refactor your rules like this:RewriteEngine On RewriteCond %{QUERY_STRING} ^query=([^&]+)$ [NC] RewriteRule ^searchrd/?$ /results/%1? [R=301,L,NC,NE] RewriteRule ^/?results/([^&]+)?$ results.php?query=$1 [NC,L...
I am trying to create a search form for my website with search engine friendly urls.I have the following form code on every page of my website :<form class="form" method="get" id="searchform" action="searchrd">SearchHere is also my htaccess file :`RewriteCond %{REQUEST_URI} searchrd$ RewriteCond %{QUERY_STRING} ^query...
Search results mod rewrite with request uri
ThatGoogle+ tipsmentions:tip: edit your.gitignorefile even though it doesn't show in the "project files":At the command line, simply enter:open .gitignoreand see the file display and edit in a new tab.Save, commit, etc.Fromthis issue, it looks like Cloud9 is still not ignoring automatically the.c9revisionsfolder (and t...
How can i edit gitignore on Cloud9 (c9.io) so i can add the .c9revisions/ folder to it to avoid adding it to my repo on github.Everytime i use git config --global core.excludesfile ~/.gitignore_global it just does not do anything, can anyone help me out with that, thank you.
How to use gitignore on c9.io for adding .c9revisions/ folder
In your case both objects will be created and valueminAvailable: 3defined in PodDisruptionBudget will have higher priority thanminReplicas: 2defined in Deployment. Conditions defined in PDB are more important. In such case conditions for PDB are met but if autoscaler will try to decrease number of replicas it will be b...
If you have a PDB that specifies a higherminAvailablethan theminReplicasof a HPA, will the number of pods ever reach the lowerminReplicas?Example configs:PDBapiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: name: frontend-pdb spec: minAvailable: 3 # HERE selector: matchLabels: app: frontend...
Do PodDisruptionBudgets take priority over HorizontalPodAutoscalers?
Does your repository have arequirements.txtfile at the top level of you repo? That's what Heroku uses to determine whether your app should use the Python build pack. Details:https://devcenter.heroku.com/articles/pythonhttps://github.com/heroku/heroku-buildpack-python/blob/master/bin/detectShareFollowansweredMar 19, 201...
I am unable to push my Django application to Heroku from github. I have already synced the files inside the App directory. After that I followed this procedure given inthiscloning your git reporemoving the virtualenv==1.8.4 from your requirements.txtgit add .git commit -m "removing virtualenv requirementgit push heroku...
Difficulties pushing application to Heroku
1 If the problem is indeed the space in your URL, open your pod spec file and remove the space from spec.source. Here's some documentation: https://guides.cocoapods.org/syntax/podspec.html Share Follow ...
I am having a hard time creating a cocoa pods template and pushing it to GitHub because every time I access the terminal at the root to validate the pod using : pod lib lint I get the error message : url: There was a problem validating the URL https://github.com/Nathaniel Whittington/me. Any...
I have a problem using validating my URL using cocoapods
o---o---o branch1 / o---o---o---o---o---o---o master \ o---o---o---o---o branch2 From master branch first merge branch1: git merge branch1 o---o---o branch1 / \ o---o---o---o---o---o---o...
I have two sibling branches(from master branch) in which I am facing conflicts while merging both branches with master branch. I have to merge them with resolving conflicts(or merge conflict fix commit). master commit 1. init branch1 commits are 1. init(inherited of master) 2. commit1 branch2 commits are 1. init(inhe...
github merge rebase branch without conflicts
10 yarn Version 1 You can safely remove cache files, it will not affect your application. There's even a dedicated command for that: $ yarn cache clean yarn Version 2 With Plug'n'Play, however, clearing the cache will very likely break your application because dependencies...
While building the docker images, after the below steps Installing dependencies (RUN yarn install) generate build (RUN ng build --prod) If I clean the yarn cache from usr location using below command in docker file, will it affect afterward when I run the docker image? RUN rm -rf /usr/local/share/.cache/yarn/* a...
Does cleaning the user yarn cache will affect docker image?
It's unclear why the port is unavailable.But, if you don't need high availability, you can disable it and alertmanager won't try to use that port with:alertmanager \ --cluster.listen-address= \ --config.file=/etc/alertmanager/alertmanager.ymlSee:https://github.com/prometheus/alertmanager#high-availabilityShareFollowans...
When I'm trying to run Prometheus alert manager withalertmanager --config.file /etc/alertmanager/alertmanager.ymlIt giving me error like$ alertmanager --config.file /etc/alertmanager/alertmanager.yml level=info ts=2021-11-10T05:08:13.937Z caller=main.go:216 msg="Starting Alertmanager" version="(version=0.21.0, branch=H...
Prometeus Failed to start TCP listener on \"0.0.0.0\" port 9094:
Because composer installuses the composer.lock file and therefore installs a predefined set of packages. What you instead want is to composer update so it checks your packages new version.
I forked a repository and patched a yml file in my forked repository in order to give it valid yml formatting. https://github.com/patrickmaynard/SonataMediaTwigExtensionBundle/blob/master/Resources/config/services.yml ... but I now find that when I run composer install the old, unpatched version of the file is being ...
Why is composer using the unpatched version of a file?
To whom it may concern in the future:I was able to find the root cause of this issue- I was using a proxy (Zscaler) which causes an issue with the CA certificates. Once the proxy was disabled I was able to run my code smoothlyShareFollowansweredNov 28, 2020 at 23:59TamirTamir1,27411 gold badge66 silver badges2121 bronz...
I am trying to run the following command:fetch_openml('mnist_784')from thesklearnlibrary. I keep getting the following error message:urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)>I searched online and tried runningpip install certifiand runningopen /Applic...
mnist_784 download fails with CERTIFICATE_VERIFY_FAILED (Even after installing certifi)
Quoting the GitHub docs A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project. So, to answer your question, yes you will have control of all your code but if you refer by rights to legal, that might be be different according to th...
I have a question regarding forking web/app projects available on Github for making my new project for web and apps. I have read somewhere somebody written on their Github profile that the project has been bootstrapped from https://github.com/facebook/create-react-app. So if I fork such projects or the other projects ...
Forking an open source repository to create a new project on Github
What dotnet core library are you using? There is aWatchon every resource in the golang client (e.g.ingress). You can find our more about this under "Setup a Watch" section inthis articleIt looks like there is aWatch example in the kubernetes-client/csharpas well.
I'm creating a minimal custom ingress controller in dotnet core. I can access the k8s ingress resources by querying the api server, but polling doesn't seem like a good solution to update ingress rules since in my use case they aren't changed that often but if they change, the changes should be applied right away.Is th...
Is there a way to hook into a Kubernetes Ingress Resource change event?
1 First, make sure Git for Windows is in your PATH, as seen here. The best practice is to execute npm install from a git bash session, to be sure to be in an environment where Git will be active, even if not directly in your PATH. Share Improve this answer ...
I know how to clone and run git repository but Okuna git repository from Github is cloned successfully and when I install its dependencies. This shows me an error. I just simply install dependencies with the npm install comment. Error is: C:\Users\username\folder>npm install npm WARN deprecated @xkeshi/[email protect...
npm dependencies installing error in Vuejs
This is a very important question and the answer is very simple, but fundamental:Run: create a new container of an image, and execute the container. You can create N clones of the same image. The command is:docker run IMAGE_IDand notdocker run CONTAINER_IDStart: Launch a container previously stopped. For example, if yo...
In practice tostarta container I do:docker run a8asd8f9asdf0If thats the case, what does:docker startdo?In the manual it saysStart one or more stopped containers
Difference between Running and Starting a Docker container
I'm not sure if this is what you are looking for but you could try the following. It is not the best way but at least a possibility. You can still not manually select the subset of projects you want to show up, but this is for a good reason (names can change, another projects has the same name, etc...)Short form:you ca...
I have Jenkins running JUnit tests and creating code coverage with Cobertura. This is imported to SonarQube, which shows all JUnit pass/fail and well as code coverage.In addition to the full code coverage graphs report in SonarQube, I would like to include a timeline graph containing only a subset of the java classes f...
SonarQube: including a subset of test coverage classes in report
In Docker Desktop for Windows, you can go to Settings / Features in development / Experimental features, and uncheck Access experimental features, then Apply & restart. My guess is that on Mac you have the same setting.
With Docker 4.22 came a new "Resource Saver Mode". However, this is considerably slowing me down as it now takes several minutes to do any operations, such as running a container, when Docker is running in saver mode. So, is there a way to disable Resource Saver Mode? Or is the only option to downgrade Docker desktop?...
Is there any way to disable "resource saver mode" in Docker desktop?
The current workaround is to unsetGEM_PATHandGEM_HOMEvariables before launching the sonar webservice:unset GEM_PATH GEM_HOME ./sonar.sh consoleThis doesn't have to be done for the sonar-runner environment.The problem is caused due toconflict with Ruby local installation.
I have an instance of sonar running on my local machine at localhost:9000, and I'm able to go to and use the console. When I try to run sonar-runner from the command line for a project, I get a 500 error:Exception in thread "main" org.sonar.runner.RunnerException: org.picocontainer.PicoLifecycleException: PicoLifecycle...
Failure running sonar-runner locally
3 "I would recommend you manage container compute resources properly within your Kubernetes cluster. When creating a Pod, you can optionally specify how much CPU and memory (RAM) each Container needs to avoid OOM situations. When Containers have resource requests specified,...
Recently we've experienced issues with both Non-Production and Production clusters where the nodes encountered 'System OOM encountered' issue. The nodes within the Non-Production cluster don't seem to be sharing the pods. It seems like a given node is running all the pods and putting a load on the system. Also, the Po...
Kubernetes cluster seems to be unstable
1 A "pull request" is not a feature of git, it's a feature of certain git hosts like github or bitbucket. It sounds like your question is actually about merging, specifically if in this situation >-A---D---E-> \ / B---C where E is a merge commit, will the change...
I received a pull request into the development branch from the feature branch. the PR is not merged for 1 day, now I want to merge it but I can see other admins added a lot of new changes in the development branch. if I approve the PR now, will I lose the newly added changes in development?
can i approve the pull request after some days in github
in crontab*/15 * * * * /home/user/script.sh > /dev/null 2>&1in script.sh#!/bin/bash source /srv/python/virtualenvs/proj/bin/activate /srv/python/virtualenvs/proj/bin/python3.6 /srv/python/proj/Scripts/scheduling.py
I'm facing a weird issue.I need to write a crontab which will invoke a python script, but I need to activate a virtualenv first. This is the crontab I wrote:SHELL = /bin/bash MAILTO="[email protected]" */15 * * * * source /srv/python/virtualenvs/proj/bin/activate && /srv/python/virtualenvs/proj/bin/python3.6 /srv/pytho...
virtualenv not activated from crontab on Linux Centos
someone pushed to my branch on my fork. This means, mybranch on origin is ahead of my local mybranch by x commits.Then a simplegit pull --rebaseis enough: it will update your local branch with the remote ones, and replay any local commits (done on your local branch but not yet pushed) on top of those new commits.
I have a fork ("origin") of a project on github ("upstream"). I have a branch (mybranch), which I pushed to origin and created a pull request from.Now, someone pushed to my branch on my fork. This means,mybranchon origin is ahead of my localmybranchbyxcommits.How do I get those commits into my local branch, as single c...
How do I get commits from origin into my local branch?
According tothisdocCloud CDN uses HTTP(S) load balancing as the origin for cacheable content. You must use HTTP(S) load balancing as the origin of content cached by Cloud CDN.At the moment, it is not possible to use a TCP load balancer.You can file a feature requesthereto have this implemented. You should check to ...
When adding origin to Cloud CDN, only HTTP(S) Load Balancer appears in the options. While the TCP/UDP Load Balancer doesn't.Is it possible to set TCP/UDP Load Balancer as origin to Google Cloud CDN? How?In my case, I really need TCP/UDP origin since the LB is managed by nginx (K8S Nginx Ingress, not K8S GCE Ingress). T...
How to set TCP based Load Balancer as origin to Cloud CDN?
0 Github has been under DDOS attacks as of yesterday. Could this be the problem? Here is a link with more information. http://arstechnica.com/security/2015/03/github-battles-largest-ddos-in-sites-history-targeted-at-anti-censorship-tools/ Share Improve this answ...
I am trying to push my changes to existing Private GitHub. Commit was successful, push fails shows below error. it works for my other colleagues. Pull and commit works fine. only push fails. Git extension tool: GitExtensions-2.48.03-SetupComplete.msi "C:\Program Files (x86)\Git\bin\git.exe" push --progress "origin" r...
Could not push my changes to my private Git-Hub. it says remote: Repository not found
You can unset the JAVA_TOOL_OPTIONS variable and it will work example:unset JAVA_TOOL_OPTIONS && /sonar-scanner/bin/sonar-scanner XXX
Getting error "Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8" while publishing code metrics on SonarQube from VSTS Build machine through build definition.find below sonar-project.properties file,sonar.projectBaseDir=$(Build.SourcesDirectory)/app sonar.verbose=true sonar.analysis.mode=publish sonar.sourceEncoding=U...
Getting error "Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8" while publishing code metrics on SonarQube from VSTS Build machine
1 You can use .env files to store all your compose configuration. Just as you do cp docker-compose.local.yml docker-compose.yml; You do cp local.env .env; docker-compose up will automatically pick up the .env file. Taken from the docs Environment Variables in Compose ...
Is there a tool to dynamically set services, external_links, etc. for container orchestration, depending on an environment variable? Tool should have convenient syntax (Python/js/bash - any clearly readable), and support conditions (if). Now I have 3 files like docker-compose.local.yml, and edit them all. cp docker-co...
dynamic docker-compose config from env
You should usemulti-dimensional rules. These rules will let you use Math and Reduction operations on the queries instead of the Classic Conditions.For your specific need, make two queries, one returning the current value and one returning the max value. Reduce both of them (unless you already havenumeric data) and use ...
We are using Grafana and Prometheus for monitoring system metrics. We have been following static rules so far but now want to have some dynamic rules as well. Our requirement is to raise an alert if the current point is > 110% of max of last 24 points(2 hours). Can I express this kind of query in grafana+prometheus? Ca...
Grafana alert if last point is more than previous points
Use the--sourcesoption to avoid the default search path option to GitHub.Frompod spec lint --help:The sources from which to pull dependent pods (defaults to https://github.com/CocoaPods/Specs.git). Multiple sources must be comma-delimited.
I want to push a new version of a private repo. I have cloned this private repo usingpod cloneand the ssh address for the repo. I can pull and push to the repo successfully. However, If I try to runpod spec linton the repo, it asks for my login credentials.I have even tried adding an ssh key specifically to this repo b...
Needing Credentials of SSH Connection to Private Pod for `pod spec lint` even though Cloned SSH address
You can't match against the query string inside a rewrite rule or a redirect directive. You need to match against the%{QUERY_STRING}variable. Try:RewriteCond %{QUERY_STRING} (^|&)w=[0-9]+(&|$) RewriteRule ^(.*)$ http://sub.domain.com/$1 [L,R=301]Note that the query string gets automatically appended to the end of the r...
I have a client with an old website without 'pretty' URLs. So currently it looks like this:http://www.domain.com/?w=42&a=5&b=3The parameter values are numbers only.Now they want to move the old site to a subdomain and main (www) domain would be home to a new website (WP with SEO friendly URLs).Now what I would like to ...
.htaccess redirect only if GET parameter exists
I always default to ArrayList, and would in your case as well, except whenI need thread safety (in which case I start looking at List implementations in java.util.concurrent)I know I'm going to be doing lots of insertion and manipulation to the List or profiling reveals my usage of an ArrayList to be a problem (very ra...
In my program I often use collections to store lists of objects. Currently I use ArrayList to store objects. My question is: is this a best choice? May be its better to use LinkedList? Or something else?Criteria to consider are:Memory usagePerformanceOperations which I need are:Add element to collectionIterate through...
Which implementation of List to use?
We've defined a 'Scheduler' actor to model that scenario. The Scheduler usually has its own set of use cases which are batch jobs, or executables that need to run regularly, etc. For example, the Use Case can be written like "The Use Case begins when the current time is on the hour" for a job that runs 24 times a day...
Should a batch scheduled process (for example, a nightly process) be modeled as a Use Case? it is something the system should do, but there is not an Actor "using" the feature, because it is scheduled.Any suggestions? Thanks!
How would I make an Use Case Diagram without user interaction? [duplicate]
If/home/myuser/bin/runreportis a script, add the following two lines to the top:env set -xand change thecrontabline to:. /home/myuser/.bashrc ; /home/myuser/bin/runreport >/tmp/qq 2>&1Then, when it runs, you should have all the environment variables, and the commands that were run, in the/tmp/qqfile.If itisn'ta script,...
I'm trying to write a cron job that runs a report, and emails the result to an address defined in my user's ~/.bashrc file. I had this working perfectly on Fedora, but when I switched to Ubuntu, my solution no longer works. The command my cron job currently runs is:. /home/myuser/.bashrc; /home/myuser/bin/runreportIf I...
Writing a Cron Job That Can Access User Data
Is there some way to remove workspaces and build controller settings from TFS backup (before it will be restored to second server)? I'm fairly confident that the answer is, unfortunately, No. TFS backup (including backup to restore on another server) is at the database level, and that is where all the state is held....
There are two TFS servers. We need to move data from first server to second server. We need to move all data else workspaces and build controller settings. But if to do backup of first TFS server, then it contains these data too.... Is there some way to remove workspaces and build controller settings from TFS backup (...
Remove workspaces and build controller settings from TFS backup
Can I somehow deploy 1 set of pods in Fargate and 1 set of different pods in my other EC2 nodegroup if they all reside in alex-ns?Yes, you can also addlabelsto theFargate Profile selectorin addition to the namespacealex-ns.The EKS documentation has more info aboutFargate Profiles, an example selector for your case:"sel...
I have an AWS EKS Kubernetes cluster. I have a set of EC2 nodes and also have configured a Fargate profile to launch pods in Fargate compute. Say I am running an App in namespacealex-ns. Can I somehow deploy 1 set of pods in Fargate and 1 set of different pods in my other EC2 nodegroup if they all reside inalex-ns? It ...
AWS Kubernetes: Deploying set of pods in the same namespace to Fargate and others to EC2 node group?
I would run another query to find problems in the data:SELECT count(*) FROM "measurement" WHERE <time condition> GROUP BY time(1s)I would expect count 16k for every second if you have 16kHz sample rate. You can go even lower with time aggregation to have better granularity (e.g. 1ms)
I have a time series of data from a specific sensor, which has a sample rate of 16khz. Since I am noticing that my data in InfluxDB is kind of irregular (has sometimes time frames of 80 - 500ms with no data), I am looking for a proper way to query and plot the time differences between each single entry of a measurement...
How to query and plot the time difference between single measurements?
You can create a Lambda proxy function that will return a redirect link with a S3 pre-signed URL.Example JavaScript code that generating a pre-signed S3 URL:var s3Params = { Bucket: test-bucket, Key: file_name, ContentType: 'application/octet-stream', Expires: 10000 }; s3.getSignedUrl('putObject', s3Pa...
Followingthis AWS documentation, I was able to create a new endpoint on my API Gateway that is able to manipulate files on an S3 repository. The problem I'm having is the file size (AWS having a payload limitation of 10MB).I was wondering, without using a lambda work-around (this link would help with that), would it be...
API Gateway GET / PUT large files into S3
11 I occasionally need to clone docker images that clients are using as a backup when they want to try a new version. This provides them the option of easily reverting if needed. assuming your image is called best-ui and has the tag latest we will clone this with the tag ol...
Let's say I have an image with tag :latest. I'd like to duplicate the image on my PC and then give it another tag like :1.4.2 I do not want to build the image, just copy and retag it.
How to duplicate docker image with a new tag?
You need to git add ., then git commit -m "My commit message", then git push -u origin master. That will set the upstream to the origin/master. Moving forward, just git push shall suffice
Why am I unable to update my GitHub from my Mac? git status produces the following: On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: file.test Untracked files: (use "git add <file>..." to include in what will be committed) .DS_Store git push produces the...
Unable to update my GitHub from my Mac
Your container creation contains mistakes or inconsistency in the directory definition.RUN mkdir /models RUN gsutil cp gs://rim-models/model_1.pkl ./models/model_1.pklFirst line, you create the absolute path/models, in the seconds, you use the relative path./modelsYou can either use the full path, or the relative, but ...
I am trying to deploy my FastAPI app on Cloud Run, and in the Dockerfile I'd like to copy a file on my GCS Bucket and read it in the API. It somehow does not copy the file.This is the copy lines in my Dockerfile:FROM google/cloud-sdk AS gcloud RUN mkdir ./models RUN gsutil cp gs://rim-models/model_1.pkl ./models/model_...
gsutil cp in dockerfile does not copy file
This is a workaround if you are using Jenkins, that isn't perfect. It can be used to suppress a specific warning for an entire file (instead of just one function).In the Jenkins property file add something like:sonar.issue.ignore.multicriteria=e1 sonar.issue.ignore.multicriteria.e1.ruleKey=python:S107 sonar.issue.ignor...
In Python we can suppress all Sonarqube warnings at a particular line in the code by applying the# NOSONARcomment. This is not ideal. Is there a way to suppress a specific error, instead of supressing all errors?For example, you may have a function with two warnings:Function "foo" has 8 parameters, which is greater tha...
Sonarqube How to supress a specific warning in Python using # NOSONAR
Is it possible to do this without having to make a completely new variable inside the foo classnope. TypeScript doesn't havestatic function local variableswhich is effectively what you are asking for.Is it possible in typescript to combine same variable types into one? like in java, I can do something likeNot a part of...
If I have a getter like this:export class foo{ aaa: number; bbb: number; ccc: number; constructor(){ //whatever } get getHeight(f: number){ return (f + 16) * Math.ceil(Math.round(Math.tan(aaa) + bbb/2) * ccc); } }whereaaa,bbb, andcccis a constant that does not get changed d...
cache within getters/setters?
9 Now, if you use Kubernetes version 1.25 can use the field timeZone to specify a time zone for a CronJob. spec: timeZone: "Asia/Bangkok" schedule: "0 17 * * *" But if Kubernetes version < 1.25 and >= 1.21 you can fix the timezone in line with the schedule field. spec:...
I want to schedule kubernetes cronjob in my local timezone (GMT+7), currently when I schedule cronjob in k8s I need to schedule in UTC but I want to schedule in my local timezone, As specify in Kubernetes document, that I need to change timezone in kube-controller manager as follows All CronJob schedule: times are ba...
Kubernetes Cronjob schedule in local timezone (custom timezone) as it always UTC
There are several variants of how to solve this issue. But each of them related to copy-paste a part of the configuration.First variantYou may define separate location for each pathlocation ~ /some-path/file.name { alias ../../path/to/folder1/www; add_header 'Header' 'value'; } location ~ /some-path-2/file.nam...
I have an nginx setup with several folders with aliaseslocation /some-path { alias ../../path/to/folder1/www; } location /some-path-2 { alias ../../path/to/folder2/www; }Every folder has one specific file that I'd like to be served with a header.But when I try to add a r...
Nginx How to apply headers to a specific file without breaking the other rules
I belive you are looking for a WA for an knownissuewhich is still openStatefulSet will continue to wait for the broken Pod to become Ready (which never happens) before it will attempt to revert it back to the working configuration.In term of upgrade found this ongit hubbelow fromofficial docThe Pods in the StatefulSet ...
I have a stateful set of pods, and due to the stateful nature of them one of them cannot be recreated due to some state error that deleting it wouldn't help.Since it's a stateful set kubernetes will block creation of additional pods until it's able to get the stuck one running. Statefulsets has podManagementPolicy: "Pa...
Skipping a pod deployment in statefulset
3 You try to request url using http and proxy pass https, you'll need to add SSL configuration, when is done you have to put location /api/ before location / server { listen 80 default_server; # to remove, You will need to setup SSL listen [::]:80 defa...
I'm trying to proxy api requests to remote api server (https://api.domain.com) That's my nginx config server { listen 80 default_server; listen [::]:80 default_server; server_name dev.domain.com; root /var/www/html; index index.html index.htm index.nginx-debian.html; lo...
nginx no live upstreams while connecting to upstream https
Laravel provides different methods to store the files. One of the easiest way is to use storePublicly(): $photo_file_path = $request->file('image_file')->storePublicly( 'images/artworks/gallery-images/'.uniqid() );
I am developing a web application. In my application, I am implementing file uploaded feature. I store the uploaded file in the aws s3 bucket. I am uploading the file to the s3 bucket as follow. $photo_file_path = $request->file('image_file')->store( 'images/artworks/gallery-images/'.uniqid(), 's3' ...
Setting aws s3 file permission to public after upload in Laravel
1 This may come a year late however something like: function a = foobar(init,ub) coder.varsize('a',[1,Inf]); a = 1; for i = init:ub a = [a, ones(size(a))]; a = sin(a); a = a(a~=0); end >> codegen foobar -args {1,1} -report works for me in R2014a. When you are ...
I have some code like this in my matlab function: for i = init:end a= [a, char(zeros(size(a))] a= func(a) a = a(a~=0) end So, in each step of the loop, you first double the size of a, apply some random function to it, and then remove everything that is a zero. Now, I want to run coder on this to eventual...
Matlab coder reallocation
Shortly:Expiresis understand byHTTP/1.0agents, whereasCache-control: max-age=was introduced inHTTP/1.1.s-maxageis similar to max-age but it applies to proxies instead of clients.ShareFollowansweredNov 12, 2011 at 17:11dev-null-dwellerdev-null-dweller29.4k33 gold badges6767 silver badges8686 bronze badgesAdd a comment|
I have never usedHTTP Caching.I found those caching options onSymfony documentation page.I just wanted to know what's the difference betweenexpires,max-age, ands-maxageheaders?
What's the difference between expires, max-age, and shared max-age?
According to Wikipedia: Zero-Copy describes computer operations in which the CPU does not perform the task of copying data from one memory area to another. OS-level zero copy involves avoiding copying memory blocks from one location to another (typically from user space to kernel space) before sending data to the ha...
I found Netty documentation says they have "Transparent Zero Copy" feature in their build-in ByteBuffer. But after the reading, I notice it doesn't mention any kernel space and user space switching, only something about reuse the buffer. So I wonder is Netty's "Zero Copy" feature different from OS level "Zero Copy"(Wh...
Is Netty's Zero Copy different from OS level Zero Copy?
The remote write path allows for this, seehttps://www.robustperception.io/using-the-remote-write-path/for an example.
Is it possible to define a custom sink for Prometheus? Such afeatureis offered by Heapster, and I wonder if one can, for example, write collected time series data by Prometheus to stdout.
Custom sink for Prometheus
Indeed, AWS Lambda has issues deploying packages that are not pure Python but work with extension modules. You will have to make sure that your code is compiled for Linux. Perhaps the following guide can help you:https://markn.ca/2018/02/python-extension-modules-in-aws-lambda/
I am using fuzzywuzzy on Amazon Aws Lambda. I get the following error:warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')I don't have this problem on my local pc because I have: pip install python-LevenshteinBut how to do this on AWS Lambda?I know python-Levens...
Install python-Levenshtein on AWS (lambda) to speed up fuzzywuzzy
You can achieve that by adding a"skipDataQuery": trueentry intoplugin.json. This is how the built-in Text Panel does it.
I am new to Grafana and I am creating a plugin in react, with the help ofsimple-react-plugin.I want to remove datasource/metrics query panel (only need panel editor).I am just wonderinghow to remove it.As persimple-react-pluginI had imported:import { PanelPlugin } from ‘@grafana/data’;I was trying to change it to:impor...
Grafana Plugin - how to remove metric panel from react plugin
You should be able to deploy your image using a new task definition every time you deploy. The task definition lets you set the image version using the attribute "image""image":"my-acct-number.dkr.ecr.us-east-1.amazonaws.com/my-image-name:my-tag-v1"In case you want to use only one task definition, you will have to buil...
I’m new to both Amazon’s ECSanddocker, and I don’t know how to deploy new images.I currently create a new image in ECR withNAME_TAG=my-image-name:my-tag-v1 ECR=my-acct-number.dkr.ecr.us-east-1.amazonaws.com docker build -t $NAME_TAG . docker tag -f $NAME_TAG $ECR/$NAME_TAG $(aws ecr get-login --region us-east-1) #log ...
How to deploy docker container image updates from AWS ECR to ECS?
For anyone reading this in the future, the trick is to initialize the (public) repository with a readme and then it works as intended.ShareFollowansweredAug 1, 2018 at 14:43Tanmay PandeyTanmay Pandey6977 bronze badgesAdd a comment|
Created a (assuming public) repo on Github and when saving a file fromGoogle Colab, it shows a warning or error "Could not fetch branches."The repo is absolutely empty. Do I need to add anything to it?
Google Colaboratory shows error when saving a file to Github " Could not fetch branches. "
Nothing will be leaked, p1 is an autoreleased object, in that scenario, after you assign p2 to p1, both of them simply point to the same object. Original object that p1 was pointing to, is managed by autorelease pool and will be released when the pool is drained. ARC or not, there is no leak assuming that you release p...
I have the following code and wondering what will happen when iOS is recollecting the allocated memories. Will the memory p1 pointed to get autoreleased afterwards, although it's pointing to a different memory now? And also will the memory p2 pointed to get autoreleased as well, as p1 is semantically meant to point to ...
will reassign a pointer cause memory leak?
Check out Cognito Lambda Triggers. The pre sign-up trigger should meet your use case. You can create a custom lambda where you can define the logic of enforcing unique email address. You then register this lambda with Cognito, so it will get called before signup and give you the chance to deny signup if the email alre...
Amplify CLI authentication with Cognito user pools currently has two main modes, signin with username or with email. In the former case email uniqueness as a required user attribute is not being enforced. Cognito service by itself supports the "Also allow sign in with verified email address" option (AWS Console, User ...
Cognito authentication with username or unique email via AWS Amplify
You need a condition to skip existing files and directories from your rewrite.RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([A-Z0-9-]+)/?$ index.php?name=$1 [NC,QSA,L]ShareFollowansweredJun 27, 2014 at 15:57anubhavaanubhava771k6666 gold badges582582 silver badge...
So, i'm trying out the rewrite rule for the first time. And of cause i'm running in to trubles.When i type in www.mydomain.com/index.php?name=gallery it shows my gallery. With the rewriterule i'm able to make the url www.mydomain.com/gallery link to that file. Here's the code:RewriteEngine On RewriteRule ^([A-Za-z0-...
Rewrite rule only on top level
In the comments it turned out that there is probably aUSERinstruction in theDockerfileof the image. This user is not allowed to accessexamplesdue to file access permissions ofexamples.It is possible to supersedeUSERwith docker run option--user.A quick and dirty solution is to run with--user=rootto allow arbitrary acces...
I am trying to run a docker image bydocker run -it -v $PWD/examples:/home/user/examples imagewhich should make$PWD/examplesin the host accessible in the container. However when Ilsin the container, it keeps giving mels: cannot access 'examples': Permission deniedI have tried the answers for similar questions, thez/Zop...
Docker "permission denied" in container
Yes; it's safe to use CherryPy on its own.
I've been working on a python web app using cherrypy and read it'd be more "robust" to use it as a backend, so I gave it a try.Shortly put, running some benchmarks on a page doing some database operations and serving static & dynamic content has shown that plain cherrypy was twice as fast than nginx and memcached, and ...
Cherrypy : Do I really need to put it behind a frontend?
I try,It's work. public function actionDownload($filename = null) { $file = $filename; $this->updateMenuItems(); if (isset($file)) { $sqlFile = $this->path . basename($file); if (file_exists($sqlFile)) { Yii::$app->response->sendFile($sqlFile); } //throw new Ht...
In a Yii2 project I want to download file backup. I have setup the download button in my action column. My code doesn't work, when I click the download button, it load a blank page. I need someone to help me to download the file backup. my_controller: public function actionDownload($file = null) { $this->updateMen...
Yii2: How to download backup files using spanjeta/yii2-backup?
Change your cache store: the memory store just stores everything in the process's memory, so every instance of the application will have a separate cache. In particular the console won't see anything that is set from the running web application.You could use the file store (which stores data in temporary files in tmp) ...
I am unable to see anything in the cache from the console in either development or production.For development, I have turned on caching and set it to memory store, in production I use the dalli gem and Memcachier on Heroku.Every key I try comes back nil.However, in development, if I put in abinding.prybefore somewhere ...
Rails cache from the console returning nothing nil
Please try to perform the following steps: 1.Click Start, click Run, type regedit, and then click OK. 2.Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management 3.On the Edit menu, point to New, and then click DWORD Value. 4.In the New V...
When i try to access to a network share by typing: net use \\servername\sharename I get the error: System error 1450 has occurred. Insufficient system resources exist to complete the requested service. If I reboot the system the mount will work fine for a while, then the error appears again. I've already udpated my ...
System error 1450 has occurred. Insufficient system resources exist to complete the requested service
You could use ruby-prof, a wonderful ruby profiler that will tell you everything your code is doing, including memory allocation. The usage is really simple: require 'ruby-prof' # Profile the code result = RubyProf.profile do ... [code to profile] ... end # Print a flat profile to text printer = RubyProf::Flat...
I want to know how much memory is consumed if I create a ruby object. Does Ruby have any method to tell? Is there any difference for memory consumption in the following? users = User.where("created_at > ?", 2.months.ago) # select all fields users = User.select(:user_name).where("created_at > ?", 2.months.ago) # just...
How much memory is consumed if I create a ruby object?
You can use rule like this:RewriteEngine on RewriteRule ^((?!website/).*)$ /website/$1 [L,NC]ShareFollowansweredMar 7, 2014 at 16:56anubhavaanubhava771k6666 gold badges582582 silver badges649649 bronze badgesAdd a comment|
Hello I have a git repository that I clone into my document root. The problem is that it is creating directory. What I want is to write.htaccessfile to make sure that that folder will act like root.Example:/website=>/;/website/foo.html#somedata=3=>/foo.html#somedata=3.I've tried this code below but all it does is redir...
Rewrite folder to act like it's root
1 You can use the php_sapi_name() function to determine how PHP is running. On my web server, this returns "apache2handler." On the command line, it returns "cli." Share Follow answered Apr 13, 2...
I've secured my server using "mod_security2" and changed the "Server:" header to a different value. It says: "Server: exampleserver". I used the following mod_security options: ServerTokens Full SecServerSignature exampleserver A side effect is that $_SERVER["SERVER_SOFTWARE"] also equals "exampleserver". Therefore ...
How to determine the server type in PHP with obfuscated "SERVER_SOFTWARE"
This is basically dependent on the way you distribute the app. When distributing if the application identifier is the same it will refer to same app. If it different only it will install multiple times. Means if you have the same app id in both cases its enough to send one notification so that no matter how you distrib...
We have developed an iOS app that makes use of push notifications.Our client wants to distribute the app through their own MDM server. This means they'll compile and sign the app themselves and also have the appropriate APNS certificate, which we include in our server-side application. So far, so good.Now, the client a...
How should I handle push notifications with an app that's distributed through multiple channels?
You can userebase --ontoto do that.>>> git checkout test >>> git checkout -b test2 # [optional] in case you have already pushed the test branch to remote, you can use test2 branch instead >>> git rebase --onto <commit_id_of_1> <commit_id_of_5> <commit_id_of_7>Example:->>> git checkout test >>> git log --oneline c05a4a...
I have a branch mainline with commit history 1->2->3->4->5. I have created a local branch test from mainline usinggit checkout -b "test"I made some commits into test branch say 6->7.This is mapped from head of mainline which is commit no 5 (i.e 5->6->7).I want the test branch to map head of mainline from commit no 1. (...
Git change source of new branch to older commit of source branch
The problem is that historically the termslogical memory translationandvirtual memory translationhave been conflated. Logical memory involves the mapping of logical pages to physical page frames. Virtual memory involves the mapping of logical pages to both physical page frames and secondary storage on disk. In the days...
From this answer,https://stackoverflow.com/a/17478535/1727934,we could know that,Android doesn't support Virtual Memory.Then from wikipedia, we could know that:Paging is an important part of virtual memory implementationshttps://en.wikipedia.org/wiki/PagingBut according to the official document,we can see that:The Andr...
How to understand Paging and Memory-mapping in Android Memory Management
Check/etc/default/dockerto ensure it doesn't have the following line:DOCKER_OPTS="--iptables=false"Also check/etc/docker/daemon.jsonto ensure it doesn't have the following key:{ "iptables":false }We added this on one server to get UFW working with docker. We then changed to an external firewall. Spent ages looking for ...
I cannot reach external network from docker-compose containers.Consider the following docker-compose file:version: '2' services: nginx: image: nginxUsing the simpledocker run -it nginx bashI manage to reach external IPs or Internet IPs (ping www.google.com).On the other hand if I use docker-compose and attach...
no internet inside docker-compose service
This rule would match all packets originating at the local machine (since it's in the OUTPUT chain), destined to a locally hosted IP address which doesn't begin with 127.X.X.X. Such packets are handed over to the DOCKER chain for further processing. A locally hosted IP address which doesn't begin with 127.X.X.X matche...
i am trying to understand one of the rules in the iptables: $ sudo iptables -t nat --list -v ... Chain OUTPUT (policy ACCEPT 618 packets, 31267 bytes) pkts bytes target prot opt in out source destination 0 0 DOCKER all -- any any anywhere !127.0.0.0/8 ...
Docker's NAT table output chain rule
It's a bit unusual, but when using services like Openshift/Heroku etc, there is no A record for the domain in your DNS. This is because there is nosingleA record corresponding to your site or app on the service.If you've already set up the domain at your registrar using Cloudflare's nameservers (you need to do this!) t...
I am trying to set up DNS forwarding on CloudFlare, to my Openshift page (the-domain.rhcloud.com).But when I go into the CloudFlare DNS settings and try to change the A setting, I get this error:You entered 'the-domain.rhcloud.com' which is not a valid IP address.It seems to be asking for a static ip address. It seems ...
DNS Settings: OpenShift with CloudFlare / rhcloud
As far as I know there's no way to search for include files in subfolders. And it's obvious if this was possible it would not be relevant to do that as this will take more time to search them.But you can do one thing, when including files just add their relative path Such as#include "../src/header_file.h"
When cloning a repo on github, I have made with lots of subfolders (like src, include and then several sub-directories in those) on a new PC. But I get a heap of errors that it can't find the paths for the include files. How do I quickly let Visual Studio know to look for include files in those sub-directories and not ...
How to add all subdirectories in "Include directories" in Visual Studio?
5 GitHub has a very nice GitHub Desktop application that can download and sync your GitHub repositories. By default it places them in subdirectories within ~/Documents (your home folder's documents directory). My setup is to create a Git directory inside the home directory ...
here's a few newbie questions from someone who has spent 15+ year coding in Windows but is starting from scratch on Mac OS X. I have searched the web and this site and not found answers, but I think the answers will be useful to a lot of people. Very simply.... where should I store private code and projects in the f...
Where to store code and install applications on Mac OS X - switching from Windows
You can achieve this using the followingjqcommand:jq '.data |= with_entries(.value |= sub("K$"; "=")) | .metadata.labels."io.kompose.service" |= sub("POSTGRES_PASSWORD"; "ANY_PASSWORD") | .metadata.name |= sub("postgres-password"; "any-password")' input.jsonThis command does the following:Useswith_entriesto iterate ove...
Here is my json input{ "apiVersion": "v1", "data": { "POSTGRES_PASSWORD": "cXVhbGltYXJiJi0xZDYK" }, "kind": "Secret", "metadata": { "creationTimestamp": null, "labels": { "io.kompose.service": "POSTGRES_PASSWORD" }, "name": "postgres-password" }, "type": "Opaque" }I want the same...
changing the value of a json pair jq
Python assignment just copy the reference value to the target object. There is no data copying. Python variable is just the name in a Python system dictionary plus the value which is the reference value to the object. Actually, you should be careful with assignments. Any Python assignment means sharing the reference v...
The Hitchhiker’s Guide to Python states that it's good to reuse variable names. foo = Spam() bar = foo.eggs() And I agree w/ it. It makes code readable. What if the variable is 40 MB of data? Will it copy itself and have 80 MB at total? foo = buffer # 40 MB. bar = foo.resize((50, 50)) # +40? I know that memory wil...
Reusing names in Python to save memory
You can read about the python image in its documentation The interesting part is: This tag is based off of buildpack-deps. buildpack-deps is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. And buildpack-deps itself ca...
I just started leaning docker to apply it to my application. While I am doing, I have had question. Please understand it could be trivial question though. I am very new at docker. Intuitively using an OS(ubuntu) image as base seems more heavy than just pure python relatively. That has been why I always try to use just...
Python base image vs Ubuntu base image installing python separately in docker
If you run kubectl port-forward multiple times, and you have ipv6 enabled on your machine you will run on this quite often.There are two solutions:Runnetstat -nlp | grep 10000in order to know the PID of the process using that port. Then you can kill it withkill -9 PID_OF_PROCESSPermanent solution: disable ipv6echo "net...
I am running a k8s cluster on bare-metal RHEL7. I am trying to run the kubectl port-forward command and am getting a error.kubectl port-forward -p somepod 10000:8080 I0128 15:33:33.802226 70558 portforward.go:225] Forwarding from 127.0.0.1:10000 -> 8080 E0128 1...
kubectl port-forward failing
Make the plugins runnable for docker by creating a link:ln -s /usr/libexec/docker/cli-plugins/ ~/.docker/cli-pluginsThe command not being recognized by Docker is extra confusing because of the mismatch in commands,buildvsbuildx. This is becauseDocker Engine 23.0set Buildx and BuildKit as the default builder on Linux.do...
I'm runningUbuntu 20.04.5 LTSDocker version 23.0.1, build a5ee5b1Running the commanddocker build -t some:other DockerfileProduces the following output:unknown shorthand flag: 't' in -tAnddocker buildThe following:docker: 'buildx' is not a docker command.I installed Docker as recommended from the repo:instructionsOther ...
Docker plugins are not recognized as commands when running without sudo
The way to do that would be as different time series, with labels to differentiate them.Don't put varying latency amounts in labels, that's event logging rather than metrics. This will perform poorly, and you won't be able to usefully use the latency values.You may be interested to know that the next version of the bla...
I wanted to measure DNS Lookup, TCP Connection, TLS handshake, Time to First Byte and Content Transfer for the same route using Prometheus but I'm not sure how to do it. Should I put those values in different labels and then the value of the metric would hold the entire request time?
How to measure different time for a request using Prometheus
2 There's a Mylyn connector for Bitbucket at https://bitbucket.org/pplupo/bitbucket-mylyn-connector. Note: the Eclipse Update Site there (http://www.mylynbitbucketconnector.xpg.com.br/update) only worked for me when I unchecked "Group items by category" Share Impr...
Does anyone know if there are any stable connectors to integrate mylyn with Bitbucket and Github? For github.com I think I found one, but for bitbucket there is no information on the Eclipse Mylyn project page.
Mylyn connectors for GitHub and BitBucket
The ideal way to retrieve the secret key is to use "CognitoUserPoolClient.ClientSecret" in your cloudformation template.UserPoolClientIdSecret: Value: !GetAtt CognitoUserPoolClient.ClientSecretBut it is not supported as explainedhereand gives message as shown in the image:You can run below CLI command to retri...
I've been following the serverless tutorial athttps://serverless-stack.com/chapters/configure-cognito-user-pool-in-serverless.htmlI've got the following serverless yaml snippitResources: CognitoUserPool: Type: AWS::Cognito::UserPool Properties: # Generate a name based on the stage UserPoolName: ${...
AWS + Serverless - how to get at the secret key generated by cognito user pool
To list all the commits, starting from the current one, and then its child, and so on - basically standard git log, but going the other way in time, use something likegit log --reverse --ancestry-path 894e8b4e93d8f3^..masterwhere 894e8b4e93d8f3 is the first commit you want to show.N.b. When using a DOS command prompt, ...
ref^refers to the commit beforeref. What about getting the commitafterref?For example, if Igit checkout 12345, how do I check out the next commit?Yes, Git's aDAGnode pointer struct tree whatever.How do I find the commit after this one?
how to git checkout "next" commit [duplicate]
The short answer is yes, you can template out pipeline patterns and even automate the creation of pipelines.The longer answer of how to accomplish this is going to depend on the details of what you're trying to accomplish. On the simpler end, you can create a classic parent-child pipeline setup where a parent pipeline ...
I am building a new data pipeline for our team. This data pipeline would collect data from multiple sources and ingest them into a single table. I am looking into a couple of options within Azure to achieve this (Synapse being the main option). I was only able to create a pipeline using the Synapse Studio. In the futur...
Data Pipeline using Azure Data Factory or Azure Synapse
You achieve that with theGithub public apiand a little bit of bash and jq.The API is paginated so you need to get the total number of commits you have on github :curl \ ...
I've contributed to multiple repositories in GitHub. Now, I'm looking for one of them which I forgot its name. How can I find them as a list separately?The only way I know for this purpose isCustomize your pinsin profile in which all ofyour repositories,your forked repositories, andcontributed repositorieslocated toget...
How to see repositories where I am contributor in github?
I cannot reproduce your issue usinglatest JMeter 5.4.1InfluxDbBackendListenerClient with very default settingsJMeter project main pagehttps://jmeter.apache.org/as the test urlI clearly see that enabling embedded resources results in 10x times increasing of the response size.Do you have HTTP Cache Manager in your test p...
I have created Jmeter-Grafana-Influx Db in AWS as docker. There are 3 containers for running the whole process Jmeter Docker Image Influx db Image Grafana ImageI am trying to do a load test on a web application which does download a lor of embedded resources when requesting for example the home page.This is working fin...
Retrieve All Embedded resources not working in Jmeter-Grafana- Influx DB setup
0 try simple torch code like in this example from sentence transformers library: https://github.com/UKPLab/sentence-transformers/blob/master/sentence_transformers/util.py#L31 or just import the function. consider cuml library which uses CUDA acceleration https://docs.rapi...
So I have a huge tfidf matrix with more than a million records, I would like to find the cosine similarity of this matrix with itself. I am using colab to run the code, but I am not sure how to best make use of the gpu provided by colab. sequentially run code - tfidf_matrix = tf.fit_transform(df['categories']) cosine...
Fastest way to compute cosine similarity in a GPU
Your ssh account key does identify you, and allows you to interact with GitHub as you (meaning for instance; you can push to your own repo) Your ssh deploy key, as mentioned in "Read-only deploy keys" are keys with read-only access. It does not authenticate you. A deploy key is an SSH key that is stored on your serve...
Can someone please explain what is the difference between account ssh-key vs deployment ssh-key? I have made use of them frequently but never tried to learn how they differ.
difference between account ssh-key vs deployment ssh-key
You could write an on-start config file for Elastic Beanstalk's LoadBalancer/ReversProxy to forward the additional ports to its EC2 instance(s). an example fromBen Delarre:"Resources" : { "AWSEBLoadBalancerSecurityGroup": { "Type" : "AWS::EC2::SecurityGroup", "Properties" : { "GroupDescription" : "Enabl...
From reading the AWS documentation, it appears that when using Docker as the platform on Elastic Beanstalk (EB) (as opposed to Tomcat, etc.), only a single port can be exposed. I'm trying to understand why Amazon created this restriction -- seems that you now can't even serve both HTTP and HTTPS.I'd like to use Docker ...
Exposing multiple ports from Docker within Elastic Beanstalk
CronSequenceGenerator.next()gives you the next date in the cron job sequenceafterthe date passed in. So if you want a list of dates, just keep passing in the date it spits out until you reach the date you wish to stop at.List<Date> dates = new ArrayList<>(); Date start = new Date(); while (start.before(end)) { star...
I want to get all future date using cron expression between 2 dates(start and end dates). By using below code I can get the next date only. I want a list of future dates.CronSequenceGenerator cron = new CronSequenceGenerator("cron-expression"); cron.next(new Date())
Get all future date using cron expression between 2 dates
I'm having the same problem trying to launch a FastCGI application written using the fcgi_stdio library for use with nginx. If I launch the application normally it acts like normal CGI and exits immediately. I'm not sure what secret sauce is normally done to get the application to act like FastCGI instead of CGI by ...
I made a FCGI program in C using fastcgi.com's API. I've called FCGI_Accept like the docs say. When I run the resulting executable it just runs through like a CGI program, and exits. I need the API for web servers where it listens on a UNIX domain socket. I am using nginx which does not spawn FCGI programs on its own ...
C API for spawning a FCGI server?
You can add operands on Grafana, soitem_state_count{service="sub-add-service", state="imported"} + item_state_count{service="absolute-value-service",state="imported"}will do it.
I have 2 metrics from 2 micro services. One of them do add(+-1), other do set true absolute value each hour. I need merge 2 metrics. First service(sub-add-service) must add(+-1) to metric from second service(absolute-value-service) and second service must set absolute value. But now I have:item_state_count{service="sub...
How to group 2 metrics in prometheus
Use function pointers. Define the following pointers in the library: void* (*CustomMalloc)(size_t) = NULL; void (*CustomFree)(void*) = NULL; And prior to using of the library functions initialize these pointers to point to custom implementations of malloc() and free(). Or initialize them to point to the real malloc()...
I'm creating a cross platform library using C. I have a piece of code like the following, in which I'm using the libc memory management functions directly: myObject* myObjectCreate(void) { ... myObject *pObject = (myObject*)malloc(sizeof(*pObject)); ... } void myObjectDestroy(myObject *pObject) { ......
Use of memory management functions in cross platform library
Look at Project B/a.cs in SonarQube. The file header will show you the path as SonarQube understands it, e.g.:Use all or part of that path in your exclusion specification.
I'm using SonarQube (6.7 at the time of this writing) to analyze my C# solution. I'm now struggling with excluding files from duplication or full analysis.I can exclude files like:<Property Name="sonar.exclusions">**/*.Designer.cs</Property>or duplications like:<Property Name="sonar.cpd.exclusions">**/*.g.cs,Tests/UITe...
How to exclude a project specific file in SonarQube
The "Ready" column shows how many containers in a pod are considered ready.You can have some containers starting faster then others or having their readiness checks not yet fulfilled (or still in initial delay). In such cases there will be fewer containers ready in the pod than the total number (e.g. 1/2) hence the who...
kubectl get pod run-sh-1816639685-xejyk NAME READY STATUS RESTARTS AGE run-sh-1816639685-xejyk 2/2 Running 0 26mWhat's the meaning of "READY=2/2"? The same with "1/1"?
What's the meaning of "READY=2/2" output by command "kubectl get pod $yourpod"
This is a submodule: a link to a specific commit in another repository at a different URL. The repository will be cloned when git submodule update --init is run, and then the referenced commit (784fd39) will be checked out. You can create submodules using git submodule add <url> <directory>, which will add a submodul...
What does this green icon mean in Github? I know the commit link takes me to another repository. I need to do something similar. Is this a symlink? Or a submodule? Being still somewhat new to git, I'm wondering how I can replicate this myself. Once created, how do I update this external dependency?
What does this green icon mean in a github repository?
@Vasili Angapov is right -k8s_execmodule is probably the best solution in this case but I would like to add some useful notes.To usek8s_execwe need to know the exactPodname (we need to pass it aspodparameter in ansible task). As you wrote, I assume that yourPodsare managed byDeployment, so everyPodhas random string in ...
I am writing ansible scripts for deploying services using Kubernetes, I am stuck with a step that is for the post-deployment process:I have deployed a service having "replicas: 3", and all the replicas are up and running now my problem is to I have to do a migration for which I have to get into the container and run a ...
Need to a have a post deployment task on the pod of same deployment
I found the issue was that my browser had cached an older version of my .htaccess. Clearing my browsers cached data resolved the issue.My .htaccess file now looks like this in case anyone stumbles across this wondering how to remove file extension and force a trailing slash.#turn on rewrite engine RewriteEngine On Rewr...
On my website if I type in mydomain.org/services/service1 the address is rewritten to "mydomain.org/services/home/username/public_html/services/service1/". However if I type in mydomain.org/services/service1/ it will go to the proper page.My .htaccess file is as follows:RewriteEngine On RewriteBase / RewriteCond %{REQU...
.htaccess rewrite adding server directory
Prometheus Pushgatewayremembers only the last pushed sample per each time series by design. Seethese docs. If you want counting events when your app was available/unavailable, then take a look atstatsd_exporter.Side suggestion: it isn't recommended storing timestamps in metric labels, since every unique timestamp resul...
I use the push gateway from prometheus (https://prometheus.io/docs/practices/pushing/). And I push some metrics from a React UI very often like this:# HELP prom_react_app_availability_total Application availability counter # TYPE prom_react_app_availability_total counter prom_react_app_availability_total{owner="test", ...
Prometheus push gateway only returns the last value instead of all
1 Is it possible to refer to the project_id path parameter using these expressions? Yes and no. While you can't specifically target the path parameter, you can specify the route key which looks like the exact value of project_id to me in your example. In that case, use ...
I have an AWS API Gateway (v2/HTTP) set-up with a custom authoriser lambda. The route key for the gateway looks something like: ANY /{project_id}/{uri+} My authorizer lambda checks if the given user is entitled for permission for the provided project_id. Unfortunately this means I can't cache the result, as a user au...
Can you use a path parameter as an identity source for an AWS API Gateway?
9 We implemented the fanout pattern and found that the SQS queue inherting the SNS topic name was the best approach as it aides in development, debugging, and as you raised representing the domain knowledge. For example, if you have an application called StrawberryShaker....
In an ETL process we are implementing we will create an Amazon SNS topic which will send messages to an Amazon SQS queue. In the documentation we didn't see a particular spec regarding names so I was wondering if someone could recommend best practises regarding the naming conventions for SNS topics and the SQS queues....
Naming conventions for SNS / SQS
You can split your project into several YAML files, putting OS-independent stuff into one and dependent - into others. Your files will look like:docker-compose.yml -- common stuff lives here docker-compose-x64.yml -- lots of OS-dependent services for x64 docker-compose-arm.yml -- lots of OS-dependent service...
I am creating a PHP app, and using Docker + Docker Compose to run it.My problem is, I want users to be able to run my project on any OS with no hassle. However, the officialmysql:latestimage is not supported on ARM processors (such as the Raspberry Pi), and so has to be switched out tohypriot/rpi-mysql.Is it possible t...
Changing the image in Docker Compose based on the host OS