Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
The error message isNo configuration found in the configured sourcesThis means that you don't have any pipeline configuration in/etc/logstash/conf.dthat Logstash can run, so it stops. | I've succesfully been able to set up Elasticsearch, Kibana etc and when I run: 'sudo systemctl status elasticsearch' it is all running fine.However, when I execute 'sudo systemctl status logstash' this is the output:It fails to start logstash, I've read numerous articles online saying it's something to do with path or ... | Having problems setting up Logstash |
Wordpress uses wp-cron.php as a means for running scheduled tasks when the user doesn't have access to or want to setup cronjobs via Unix. This process looks at the scheduled jobs in the cron table in wp_options and if the specified time (or more) has elapsed then the job executes.wp-cron.php uses wp-includes/cron.php ... | We're running Wordpress in an environment that features a multi-master DB behind a load-balancer. The error log was filling up with a deadlock error when WP tried to update the cron table in wp_options. We disabled wp-cron altogether but are still seeing the error, so, two questions:1) What causes the cron table in wp_... | Wordpress Multi-Master DB Replication: Deadlock when updating cron table in wp_options |
6
From command line there is no option for setting "system wide" proxy, you must set variables in several files depeding on application user.
Almost all command line applications
Edit /etc/environment
http_proxy=http://user:password@proxy:port/
https_proxy=http://user:pass... |
I'm in an environment that uses complex proxy settings and uses .pac file to describe/resolve them. I want to setup some VM's and docker containers on this environment mainly based on ubuntu. The typical "system --> preferences --> network proxy --> apply system wide" answer doesn't help a lot because I don't have acc... | .pac files for ubuntu - command line |
Hi Newbie the following worked for meAWSTemplateFormatVersion: 2010-09-09
Resources:
WebACL:
Type: 'AWS::WAFv2::WebACL'
Properties:
Name: WebAclLimit100
Scope: "REGIONAL"
DefaultAction:
Allow:
Type: ALLOW
VisibilityConfig:
SampledRequests... | I am trying to create a WebACL with cloudformation in order to protect the application API from abuse, the idea is throttle the API access for a maximum of 100 request for ip in 5 minutes.For this purpose I have to use WAFv2 because the first version only seems to support:Static blacklistingByte matchSize constraintXSS... | Create a WebACL from WAFv2 with CloudFormation |
I don't know how people are uploading content to this folder, but you might want to use something lower-tech than monitoring the directory with inotify.
If the protocol is FTP and you have access to your FTP server's log, I suggest tailing that log to watch for successful uploads. This sort of event-triggered approac... |
I have a folder named images on my linux box.
This folder is connected to a website and the admin of the site has the ability to add pictures to this site. However, when a picture is added, I want a command to run resizing all of the pictures a directory.
In short, I want to know how I can make the server run a speci... | Run a shell command when a file is added |
I found the answer inthis issue thread. You need to look in.git/configand update the travis slug.[travis]
slug = jennybc/MAKE_SURE_THIS_REFLECTS_CURRENT_REPO_NAMEApparently this is NOT automatically updated when you rename a GitHub repo. | I am attempting to encrypt a file for use on Travis-CI, as I have successfully done before. However, at some point the associated GitHub repository was renamed. I now suspect -- but cannot confirm -- that the renaming occurredafterI last successfully added an encrypted file.The affected file contains an OAuth2 token th... | Encrypting a file on Travis for a GitHub repo that was renamed |
When passing Json try JObject from Newtonsoft.Json.LinqFunctionHandler(JObject eventStr, ILambdaContext context)and then you can Deseralize the response where SQSEvent is inherited from Amazon.Lambda.SQSEvents SDK Library.var result = eventStr.ToObject<SQSEvent>();ShareFollowansweredFeb 18, 2020 at 11:23Imran ArshadImr... | i use AWS Lambda (.NET Core 2.1 environment) + SQS as triggerThe problem is that my lambda cannot parse my SQS message.Error converting the Lambda event JSON payload to a string. JSON
strings must be quoted, for example "Hello World" in order to be
converted to a string: Unexpected character encountered while parsi... | AWS Lambda (.NET) + SQS: Error converting the Lambda event JSON payload to a string |
If your old username was XYZ, and your new one Jakeunderscore, then your old Github account would have been found athttps://github.com/XYZ, and your new one,https://github.com/Jakeunderscore. So, for each repository that you have that has a remote pointing to Github, simply run the following command:git remote set-url ... | I'm really new to github and don't know very much. I changed my username to be a easier to find for people that know me or meet me. It tells me to update my local repositories to point to the new location. I don't know how to do this or how to find my old url and new url? Is there any way to find step by step what I ne... | I changed my github username. How do I update local repository to point to the new location? |
You can use Prometheus to monitor K8S cluster. It gives you exact running time of every container and pod in miliseconds. You can easily find setup tutorial. | BackgroundI have Kubernetes cluster deployed on Google Cloud. This deployment has auto scaling feature activated (by CPU). At any time, I have between 2 to 100 pods.QuestionIs this possible to measure how many pods running hours I have in a given time range?For example, in the last 7 days the deployments has 500 workin... | Kubernetes deployment working hours analytics |
Minikube has a built-in sync mechanism that could deploy a desired /etc/hosts with the following example:
mkdir -p ~/.minikube/files/etc
echo 127.0.0.1 localhost > ~/.minikube/files/etc/hosts
minikube start
Then go and check if it's working:
minikube ssh
Once you are inside the container, you can view the contents o... |
I have the minikube environment as the following: -
Host OS: CentOS Linux release 7.7.1908 (Core)
Docker: Docker Engine - Community 20.10.7
minikube: minikube version: v1.20.0
I would like to add some additional host mapping (5+ IP and name) to the /etc/hosts inside the minikube container. Then I use the minikube s... | How to add host mapping to /etc/host of the minikube? |
Using the GitHub CLI, you can get the name and size in KB of the repos within the organization:gh repo list <my_org> --limit 999 --json name,diskUsage | I am admin of a Github Organization and my storage is higher than the limit.That's why I want to find the repositories that take the most storage and apply a fix.The only way I found was clicking my avatar (top right) => Settings => Repositories.
And here, I can see the size of them.However, this is only the repositori... | How to get the size of my organization repositories? |
You will need to tell Jenkins about your GitHub OAuth token, as described in the GitHub plugin manual; there is a dedicated section on that page for how to tell Jenkins to auto-add itself to the GitHub repos
|
How do I set up Jenkins so that every time a developer creates a new repo on Github within the organization, Jenkins is able to access it? So that the developer DOES NOT need to go into the repo's setting page on Github to find the right webhook, deploy keys, or integration & services.
For example, after a developer c... | How do I setup Jenkins to see all private GitHub repos within our organization? |
The time call is your shell. If you call /usr/bin/time, the program, you will get some knowledge of resident memory usage. Note however that it may not count memory-mapped files, shared memory and other details which you may need.
|
How can I measure the top (the maximum) memory usage of some programm?
It do a lot of malloc/free, and run rather fast, so I can't see the max memory in top.
I want smth like time utility:
$ time ./program
real xx sec
user xx sec
sys xx sec
and
$ mem_report ./program
max memory used xx mb
shared mem xx mb
| Measure top memory consumption (linux program) |
Anyone else having the same problem. The issue would be you had cloned the repo from Github of the owner(here Una's repo) and you are pushing that change directly to the repo. This is the not right way as you don't have permission to push changes to that repo.The right step would be:Fork the original repo so you get a ... | I have started to contribute to a public repository on GitHub, but after I have created a pull request it says remote: Permission when I am trying to push another code to my origin.remote: Permission to una/CSSgram.git denied to Pradhvan.fatal:
unable to access 'https://github.com/una/CSSgram.git/': The requested
U... | Remote permission denied in github while trying to push to origin |
That won't work, because kubernetes isn't aware of the local file's path. You can simulate it by doing something like this:kubectl create configmap --dry-run=client somename --from-file=./conf/nginx.conf --output yamlThe--dry-runflag will simply show your changes on stdout, and not make the changes on the server. This ... | how can I describe this command in yaml format?kubectl create configmap somename --from-file=./conf/nginx.confI'd expect to do something like the following yaml, but it doesn't workapiVersion: v1
kind: ConfigMap
metadata:
name: somename
namespace: default
fromfile: ./conf/nginx.confany idea? | kubernetes configmap set from-file in yaml configuration |
It's not very complicated from a conceptual point of view. I'll try to be clear but I have to do some simplification.The event based servers (likenginxandlighttpd) use a wrapper around an event monitoring system. For example. lighttpd useslibeventto abstract the more advanced high-speed event monitoring system (seelibe... | I'm trying to understand what makes Nginx so fast, and I have a few questions.As I understand it, Apache either spawns a new process to serve each request OR spawns a new thread to serve each request. Since each new thread shares virtual address space the memory usage keeps climbs if there are a number of concurrent re... | nginx : Its Multithreaded but uses multiple processes? |
Theideltafunction is what you want. | I have a gauge metrics that, for instance, gives me a result like this when queryingpanels_meters[30s]gives me this result:and a query like thisdelta(panels_meters[30s])gives me the differenze between the last value and the value at 30 seconds ago.BUT I want now the difference between the last two values, independently... | Prometheus - get delta between two last consecutive values |
I found the problem. Our Helm charts were explicitly setting the Ingress annotationnginx.ingress.kubernetes.io/connection-proxy-headertokeep-alive. Removed that and all is well. | I ran acrossan articlethat says that the NGINX Ingress supports websockets starting at version 1.3. Butthis changelogmentions websocket documentation back at version 0.9.I'm running with NGINX Ingress at version 0.23.0 and I cannot get the websocket client connection to work. It fails because the Connection header is... | What version of the Kubernetes NGINX Ingress supports websockets? |
I've figured out the error in my case. It's due to a WSGIPath error.The error occurred because I have the application.py in the app/ folder. But because I ran the git .init command in its parent folder, EB errors out because it cannot find application.py file.In short, the solution is to run "eb init" in the same loca... | I was able to deploy a sample flask app to AWS using the instructions from this documenthttp://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Python_flask.htmlthe status from "eb status" is GreenRetrieving status of environment "helloflask-env" shows========================================================... | successfully deployed flask app but getting a 404 when accessing the page |
You can do a simple rebase as follows:git fetch upstream # or whatever your remote is
git rebase upstream/masterThis might introduce conflicts you need to fix before pushing obviously.You can now submit your pull request. I'd suggest doing it from a named branch rather than master. You can do this when pushing to Githu... | I am working on open source plugin and I have made all the changes which were necessary. Currently, I am in master branch of my version of work. I want to rebase updates from the original work and then send a pull request. Could anyone please help what steps do I need to take for rebasing and then for pull request? Tha... | Rebasing and Pull request |
you can try the sleep command in while loop.command: ["/bin/sh"]
args: ["-c", "while true; do sleep 10;done"]ShareFollowansweredJan 27, 2021 at 4:21Emon46Emon461,54688 silver badges1515 bronze badges21I guess in the light of my learning, the question now is more, about what would be the less cpu consuming process. "whi... | I would like to start a container with bash only. In other words, a bash that does not stop, i guess an interactive bash or shell .So far when i put sommething like ["bash"] or ["bin/bash"] or simply bash, the container run and stop. Is there a way to start a bash that run continuously ?EDIT1So far the only way that wo... | Kubernetes Container Command to start an bash that does not stop |
You can iterate over a repository's issues events and store the last ETag header you're sent to then only get recent events. By doing so you can catch new issues, new comments on issues and how the state of those issues. The endpoint is describedhereand the data you'll receive is describedhere.This of course requires y... | I would like to forward (or better said, mirror) github issues (of an Open Source project) to the project's public mailing list.How can I do it?Are there any existing solutions using github's API?(Service hooks in repository settings only forward commits, not issues.) | How to forward github issues to mailing list? |
You can download plugins and install in your container if you create a Dockerfile for instance. This will allow you to have an image turning Kibana including the plugin.Kibana has this command to install plugins:kibana-plugin installFor instance, adding the plugin KNQL could be done this way:FROM kibana:5.6.6
ENV PATH... | I'd like to install the following plugin to Kibana running on container.https://github.com/istresearch/kibana-object-formatHowever, as I am new to Kibana, I don't know how to install it. Its readme page says I should refer the official guide page below, but it doesn't help me at all.https://www.elastic.co/guide/en/kiba... | How to install plugin on github to Kibana running on Container |
1
Use this with multi-line flag:
^(.*)(\/(?!no-trailing-slash)([^.\/])+)$
Replace any match with:
$1$2/
The pattern matches anything that after last / neither has . nor start with specific pattern and add / at the end of them.
check Demo
Share
Improve this answ... |
I'm trying to add redirects in nginx config file where if a user lands on any URL except a specific one, it will add a trailing slash after it. Also, it shouldn't add a trailing slash if there's a . in it.
Example:
www.site.com/foo => www.site.com/foo/
www.site.com/foo/baz => www.site.com/foo/baz/
www.site.com/foo.xm... | Nginx: How to add a trailing slash to URL except if it starts with certain name |
LinkedList is a doubly-linked list, so elements in the list are represented by nodes, and each node contains 3 references.
From Java 8:
private static class Node<E> {
E item;
Node<E> next;
Node<E> prev;
Node(Node<E> prev, E element, Node<E> next) {
this.item = element;
this.next = next... |
I created an ArrayList of 1 million MyItem objects and the memory consumed was 106mb(checked from Task Manager) But after adding the same list to two more list through addAll() method ,it takes 259mb. My question is I have added only the references to list , no new objects are created after that 1 million.why does the... | memory allocation in collection of 1 million references in java |
Unfortunately this is not possible. Here is what you can do:
Use 2 different tags for the images that you want to overwrite. I would recommend a tag with the version and another tag with a known prefix and something guaranteed unique e.g. 1.1.1 and SNAPSHOT-hash. The next time you push an image with the same version,... |
I'm pushing my images to AWS ECR via docker push ... command. The image is tagged with a specific version.
When I actually push two different images with the same tag, this results in two images on the AWS ECR registry, one which become untagged.
0.0.1 sha256:572219f8764b21e5a045bcc1c5eab399e2bc2370a37b23cb1ca9298ea3... | Docker force overwrite last tag and pushing on AWS ECR |
If your docker container is outside the kubernetes cluster, then it's not possible to access youClusterIPservice.As you could guess by its name,ClusterIPtype services are only accessiblefrom within the cluster.Bywithin the clusterI mean any resource managed by Kubernetes.A standalone docker container running inside a V... | I have a server that is orchestrated using k8s it's service looks like below➜ installations ✗ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
oxd-server ClusterIP 10.96.124.25 <none> 8444/TCP,8443/TCP 3h32... | Accessing a k8s service with cluster IP in default namespace from a docker container |
First of all, If youclonesome other repo, you can notpushit directly from your local machine. You need toforkthe project first. Then clone it throughgit clone urlafter that change some files and add them throughgit add .Put some commit status there usinggit commit -m "file changing message"then push it in your repogit ... | I really have no clue how to use Git and so far I've only used github.com to upload changes which is not practical.
I'm really confused on how to setup git with android studio and simply push the changes that I make through android studio. The project repo already exists and I cloned it. Then I need to push the modifie... | How to push modified files into github project repo |
We recommend you can use the conditions:condition: eq(variables['Build.SourceBranch'], 'refs/tags/test')And this means if you want the test job to run, then you need to push something to release with test tag. We cannot use the value "not(startsWith(variables['Build.SourceBranch'], 'refs/tags/hotfix'))"
On my test, if ... | My Azure DevOps pipeline has 3 jobs. One builds the project for production and the other builds it for testing and the last publish artifacts. When I push to release branch, it triggers all of 3 jobs, but they can take 10-15 minutes to finish. What I'm trying to achieve is exclude testing job if a tag is present on the... | Azure Devops exclude job if branch tag is present |
One command for it is simply use git restore --staged -p <path/to/file> to unstage changes in patches (unstaging 'hunk' as per this command), as is better commented already on your post in a series of comments by @Charles Duffy.
As for this background for this Git chunk undone with VS Code, there are a set of commands... |
This question already has answers here:
Reverting part of a commit with git
(6 answers)
Closed 6 months ago.
There is a feature in vscode that can help undo changes to a region of ... | How to undo a diff chunk in git with cli? [duplicate] |
Earlier I didn't update the server.xml with correct arguments and once I updated server.xml with genericJvmArguments="-Xms1024M -Xmx2048M" and InitialHeapSize="1024" maximumHeapSize="2048", I was able to start the server.
|
Tried to update server.xml, deleted dumps and temporary cache files from C:\Users\username\AppData\Local\javasharedresources
And still not able to start the server.
This is the following error message I get:
JVMDUMP010I Java dump written to C:\WAS8\profiles\AppSrv02\bin\javacore.20150210.094417.6468.0009.txt
JVMDUMP01... | Websphere Out of Memory Issue |
This linkgives some reasons why circular buffers offer better performance than synchronized access to a single, shared data structure.What hardware are you using, that only allows access to one memory location at a time?ShareFolloweditedAug 19, 2013 at 20:17answeredAug 19, 2013 at 18:54Joe DoyleJoe Doyle43233 silver ba... | Closed. This question needsdetails or clarity. It is not currently accepting answers.Want to improve this question?Add details and clarify the problem byediting this post.Closed10 years ago.Improve this questionIn theory memory circularBuffer sounds like a good idea... the setting and the getting are never at the same ... | How does a circularBuffer improve performance vs competing for a particular memory address(mutex suspends the other)? [closed] |
These mod_rewrite directives should go near the top of your.htaccessfile. The most specific redirects should go first (ie. Groups three and four), followed by groups One and Two. (Groups One and Two are really the same thing.)Groups Three and Four are standard redirects old URL to new URL, regardless of scheme/hostname... | I have around 500 links that the SEO person is requesting be updated after a site refresh. The main change is the use of https for everything, instead of http. I want to make the htaccess file as simple as possible. The links fall into the following 4 groups.Group One (site root)http://www.example.com->https://www.exam... | Redirect http to https and 301 redirect |
You're correct that you need to add the information toauthResponse.context. Once you do that, you can configure it as a URL Query String parameter, or Request Header, etc, via the "Integration Request" interface for your API Gateway method.Now the value which was generated in your authorizer is available to the upstrea... | Say, I have access to a certain value in custom authorizer, how do I pass it on to the api endpoint
what I read till now, is that we could use context in the policy Generator to do that . something like this -authResponse.context = {
"key": "this is the data sent from custom authorizer",
"numKey": 1,
... | how to send data from custom authorizer to api endpoint |
I resolved this via:
creating a service account user that has read-write access to repo
create a pat for that service account
add the service account to the bypass protection rules in the branch
create a repo secret that contains the PAT token
update the line 'GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}' with the new s... |
Looking to confirm this is correct way to deal with the problem and if someone has a better idea.
I have the master branch set with protection, so you have PR into it and have signed commits.
I want to automate semver and current use:
- name: Automated Version Bump
id: version-bump
uses: 'phips28... | Add GITHUB_TOKEN to Allow specified actors to bypass required pull requests or alternate solution |
The error message makes it look like it looks for config/client_session_key.aes at a relative path to the current working directory (CWD). Is it something as simple as specifying WORKDIR in the Dockerfile or working_dir in the compose YAML to /opt/server?
Information on WORKDIR for setting default CWD at image build t... |
Problem description
I'm creating a docker container to run haskell binary. The binary in question is a website built with yesod. When the container starts up it looks promising but then fails with:
config/client_session_key.aes: openBinaryFile: does not exist (No such file or directory)
Steps to recreate
The Dockerfi... | Where do yesod binaries expect to find the config folder? |
While this question has already been answered, it might be a good idea for future readers to consider using the Kinesis Client Library (KCL) for Python instead of using boto directly. It simplifies consuming from the stream when you have multiple consumer instances, and/or changing shard configurations.
https://aws.a... |
I cant seem to find a decent example that shows how can I consume an AWS Kinesis stream via Python. Can someone please provide me with some examples I could look into?
Best
| Consuming a kinesis stream in python |
You place the file called .gitignore in the main directory of your git repository.
To create the file you can use touch .gitignore as you said.
To add entries to the file you can open the file in a text editor, and add each file/folder on a separate line.
Your file may look like this:
/log
/tmp
/config/database.yml
T... |
I've looked through tons of posts, I've scoured google and stack overflow. Mind you that I am completely new to rails and git and stack, but all i'm looking to do is find out...
How do I make a .gitignore file on rails
How do I include specific files. For example database.yml?
Everyone likes to put just type "touch... | .gitignore from the beginning. How to add, how to edit. on Rails |
Thanks for the help guys, I did a bit of experimenting with NSURLConnection to see how it handled it (As you autorelease that and it will continue on with it's async operations).
Turns out at the beginning of every async step it internally bumps its retain count and at the end of every async step it internally release... |
I've had a look around but have been unable to find a definitive answer to this question.
If I have a class that performs an async operation, when and how do I release it?
-(void)main
{
AsyncObject *async = [[AsyncObject alloc] initWithDelegate:self];
[async goDoSomething];
}
-(void)didSomething:(Result*)... | Objective-c Async memory management |
You have two options. I don't know all of your requirements, so I list both.When a user initiates an action, an entity is saved to the Datastore (e.g. "ActionEntity"). A cron job periodically queries the datastore, and if an ActionEntity is present, creates a task to be performed. When a user cancels an action, ActionE... | I'm trying to figure out a way to schedule repeating actions (with a fairly short repeat time) with the initialization caused by some user action. Neither tasks nor cron seems to fit this quite right. Cron doesn't seem to appropriate for user initialized things and tasks don't seem to be appropriate for repeating sched... | App Engine - Scheduling repeating actions initiated by a user? |
The command (or the URL in it) to add the github repository as a remote isn't quite correct. If I understand your repository name correctly, it should be;git remote add demo_app '[email protected]:levelone/demo_app.git' | I'm still going through some guides on RoR and I'm stuck here atDeploying The Demo AppI followed instructions:With the completion of the Microposts resource, now is a good time to push the repository up to GitHub:$ git add .
$ git commit -a -m "Done with the demo app"
$ git pushWhat happened wrong here was the push par... | git push >> fatal: no configured push destination |
you declare string:job_params = "[string(name: 'app_one', value: '4.8.6'), string(name: 'app_three ', value: '1.2.4'), string(name: 'app_ten', value: '2.7.1')]"java.lang.ClassCastException: class org.jenkinsci.plugins.workflow.support.steps.build.BuildTriggerStep.setParameters() expects java.util.List<hudson.model.Para... | In jenkins pipeline I want to run "build job" using variables job_path and job_params.job_path = "long/path/to/different/jobs"job_params = [string(name: 'app_one', value: '4.8.6')]but more oftenjob_params = "[string(name: 'app_one', value: '4.8.6'), string(name: 'app_three ', value: '1.2.4'), string(name: 'app_ten', va... | Jenkins pipeline how to run build job with parameters from variables |
Specify your interpreter explicitly in the crontab entry. Usebash /path/zero_check.shrather than/path/zero_check.sh | Same problem asthis OP, but must be a seperate cause.The following script:#!/bin/sh
arr=("cat" "dog" "bird")Works interactively (debian) but fails when called by crontab with:/bin/sh: 2: /path/zero_check.sh: Syntax error: "(" unexpectedI've tried with#!/bin/bashshebang, and declaring array withdeclare -a arr=("cat" "do... | Error 'Syntax error: "(" unexpected' when declaring arrays in bash |
You caninclude your file in the Helm chart. You'd generally include that in a Kubernetes ConfigMap object, which can then bemounted in a Pod as a volume.You need to move the file to somewhere in the Helm chart directory; say it's incharts/mychart/files/custom-samples.json. You can create a ConfigMap in, say,charts/my... | I'm using a Helm chart to deploy an app in the Kubernetes. After deployment, I want to copy a file from the chart repository to the container.Currently I am doing this manually:kubectl cp custom-samples.json che-8467596d54-7c2hg:/data/templatesBut I want to make this step a part of the deployment that will be performed... | k8s: copy file to container after pod's deployment |
You can use something like belowout, err := cli.ContainerLogs(ctx, resp.ID, types.ContainerLogsOptions{ShowStdout: true})
if err != nil {
panic(err)
}
f, err := os.Create("/tmp/clogs")
io.Copy(f, out)But make sure to to do that after you have started the container, Create will only create the container an... | Using the docker golang sdk the following method can be used to create a container and bind it's output tostdout.resp, err := cli.ContainerCreate(ctx, &container.Config{
Image: "alpine",
Cmd: []string{"echo", "Hello World"},
AttachStdout: true,
}, nil, nil, "")How can I redir... | Docker Golang SDK - How to redirect container stdout to a file |
where does the 'GET' come? This is a barebones page with no other code influencing these rules.In this snippet of your rules, you have a backreference%1in yourRewriteRule. This references the last()match in the previousRewriteCond, which happens to be(GET|HEAD):RewriteCond %{QUERY_STRING} lang=([^&]+)
RewriteCond %{THE... | I have been doing some URL rewriting for a customer in a test environment that work fine in my environment but when I move to theirs I get different results and the rule fails.I am 301 redirecting legacy dynamic URLs in the following format:http://www.companyname.com/page.php?pagename=AboutCompany&lang=EN
to
http://www... | 301 Redirect Rule gives different results on different hosting environment |
you can create an initial step that does the clone, creates a tar and saves it as an artifact.all followup steps use clone.enabled=false and then unpack the tar as the first script command. | I have a setup where a monorepo runs some parallel steps and each step currently does a clone. Each steps adds up extra 1 min cloning time to build time as its repetitive and unencessary.As you can see the build setup takes around 1 minutes to clone the repo. Is there a way we can reuse the already cloned code in next ... | Skipping cloning again between steps bitbucket pipelines |
If you're being prompted for a username and password, it's possible that you're trying to use the HTTPS protocol instead of SSH. You can see what the URL looks like by usinggit remote -v. If you want to change to use the SSH protocol, you'd use something likegit remote set-url origin[email protected]:git/git.git(wher... | I want to connect to github using SSH protocol in my WSL, i followed every single step from the github documentationhere.
The key was generated, I've tested my connection, but it still doesn't work. I still have to put username or password everytime i push my code to github. Can anyone help me on this?I also did this.#... | Problem connecting to Github with SSH in WSL |
You can pull his branch into your local git repo, and then push it up to your GitHub hosted repo.
First, add a remote to this other users's GitHub page
git remote add other-user http://github.com/otheruser/repo
Then make a local checkout of that branch in your repo.
git checkout -b B4 other-user/B4
Finally, push th... |
Suppose there's an official repo maintained called O with branches B1, B2 & B3.
One user, who has forked it onto his Github account, made another branch for himself called B4 and is publicly available.
I've also forked the same official repo but I want to fork that user's B4 branch also without affecting my original c... | Forking only a specific branch from Github repository |
Solved with this:from django.http import HttpResponsePermanentRedirect
class WWWRedirectMiddleware(object):
def process_request(self, request):
if request.META['HTTP_HOST'].startswith('www.'):
return HttpResponsePermanentRedirect('http://example.com') | I need to redirect all requests coming fromwww.mysite.comtomysite.comI have found thesolution in rails, but how can I do that in Django/Python?The only solution I could find, which was posted by a moderator on GoDaddy was the above. Seems like I cannot resolve this kind of problem through the DNS Manager of GoDaddy. | Redirect all requests for www. to root domain |
import math
BLOCKSIZE = 1024**2
# For numerical stability. The closer this is to mean(arr), the better.
PIVOT = arr[0]
n = len(arr)
sum_ = 0.
sum_sq = 0.
for block_start in xrange(0, n, BLOCKSIZE):
block_data = arr[block_start:block_start + BLOCKSIZE]
block_data -= PIVOT
sum_ += math.fsum(block_data)
... |
I have a huge (30GB) ndarray memory-mapped:
arr = numpy.memmap(afile, dtype=numpy.float32, mode="w+", shape=(n, n,))
After filling it in with some values (which goes very fine - max memory usage is below 1GB) I want to calculate standard deviation:
print('stdev: {0:4.4f}\n'.format(numpy.std(arr)))
This line fails mise... | numpy.std on memmapped ndarray fails with MemoryError |
Unlogged tables are always included in dumps (pg_dump) unless you explicitly specify the--no-unlogged-table-datacommand line option.Unlogged tables are also included in file-system level backups taken when the databases server is stopped after a clean shutdown.Unlogged tables are never included inpg_basebackup, streami... | I'm trying to understand if it's possible to include in database backup also unlogged table.http://www.postgresql.org/docs/9.3/static/sql-createtable.htmlHere it's explained that on crash table is truncated (as expected), but no reference to backuping or take a daily "screenshot".Someone have some experience?I'm using ... | Backup data unlogged table |
Flux has an experimental (but quite mature) garbage collection feature that can be enabled by setting the--sync-garbage-collectionflag as an argument on the Flux daemon deployment (or by settingsyncGarbageCollection.enabledtotruein yourvalues.yamlin case you are deploying Flux using the Helm chart).With the garbage col... | Flux sync git state with cluster state but If I want to delete a resource from Kubernetes in a scenerio where all resources are managed through git, what is the best way to delete a resource (deplyment, service, ingress etc) with flux ? | Deleting Resource from Kubernetes Using Weaveworks Flux |
Here's a basic Nginx config to service static content and pass
everything else to a Node.js app:location / {
try_files $uri $uri/ @backend;
}
location @backend {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $... | Quick question about the correct server infrastructure for a Node application I'm building. The application has a web frontend built with Angular that uses the API I built in Node. This API will also be eventually accessed by a mobile application. In terms of server infrastructure, what is the fastest/cleanest way to d... | How to serve static content for a Node.js application? |
As your error message what did you get, you are mixing callback style withasync/awaitstyle, then it throws a warning.I prefer useasync/await. This mean, handler function always is a async function (with async keyword), then instead of callcallbackfunction, just return the result, and you no needcallbackparameter in han... | I created an API Gateway + lambda forsignUpwithamazon-cognito-identity-js.Then I implemented a Cognito trigger function for preSignUp with TypescriptI use Serverless framework to pack and deploy. The runtime is Node 12+++++++const wrapperHandler: Handler<CognitoUserPoolEvent> = async (
event,
context,
callb... | Why would this AWS lambda cause error: WARNING: Callback/response already delivered |
The ARM templates support to conditionally deploy resources that have defined in the template json files.You need to update the template json files by adding the conditions to conditionally deploy the resources based on the value of a parameter.For more details, you can see "Conditional deployment in ARM templates".To ... | I have three datafactories across the environments under my subscription. And all the datafactories are in sync with the same code. I am trying to test my preprod datafactory. I have a preprod yml file and I have two pipelines in my datafactory. I am trying to exclude one pipeline from my preprod datafactory. Is it pos... | Is it possible to exclude a pipeline in datafactory using yaml script in AZ DevOps |
I get the same problem withAgglomerativeClusteringand to resolve this, I use Wrapper like this:class AgglomerativeClusteringWrapper(AgglomerativeClustering):
def predict(self,X):
return self.labels_.astype(int)So you can change to DBSCAN and all will work. | I am usingscikit-learnlibrary and building apipelinefrom it.This is the last (and main) part of pipeline that I build:preprocessor_steps = [('data_transformer', data_transformer),
('reduce_dim', TruncatedSVD())]
preprocessor = Pipeline(steps=preprocessor_steps)
clustering_steps = [('preprocessor'... | 'DBSCAN' object has no attribute 'predict' using GridSearchCV & Pipeline |
Use the regexlocationsyntax with thengx.var.VARIABLEAPI:location ~ ^/resource/(?<state>[^/]+)/?$ {
content_by_lua_block {
ngx.say(ngx.var.state)
}
}Note: nginx uses thePCRE2library for regex support. Check thedocumentationfor the syntax.ShareFolloweditedMay 3, 2021 at 15:00answeredMay 3, 2021 at 14:52Dm... | I want to create a Location in my Nginx with such route/resource/{{state}}though the {{state}} is a place holder for a variable that must pass to my Lua script and according to this variable I want to process some resources.I cannot find any documentation or guideline for creating such a route in Nginx and passing path... | How can I pass Path parameters to lua code by nginx? |
1
I don't know of a way to exclude with current events CLI, but you could use grep to exclude:
docker events | grep -v "container exec_"
Share
Follow
answered Nov 26, 2018 at 18:56
Bret Fishe... |
I discovered that there is a docker events command which lists all events happening on the docker host.
I would like to use this on my CI to see any developer actions which will help me troubleshoot. Unfortunately each of my services has a healthcheck and each execution of the healthcheck is considered an event like t... | docker events filter healthchecks |
3
You can do this with
pip install git+https://github.com/shamanu4/dal_admin_filters.git@refs/pull/23/head
or more generally, pip install git+https://github.com/<USERNAME>/<REPO>@refs/pull/<PR>/head
Share
Improve this answer
Follow
... |
Can't figure out how to install this pull request:
https://github.com/shamanu4/dal_admin_filters/pull/23
I tried to find last commit:
https://github.com/shamanu4/dal_admin_filters/pull/23/commits/43f33db7c57058613a5410776575ce5f0f78357b
and run:
pip install git+https://github.com/shamanu4/dal_admin_filters/pull/23/c... | How to install pull request using pip? |
There are several options depending on price and efforts needed:Simplest but a bit more expensive solution is to useEFS+NFS Persistent Volumes. However, EFS has serious throughput limitations, readherefor details.You can create pod with NFS-server inside and again mount NFS Persistent Volumes into pods. See examplehere... | I have the following:2 pod replicas, load balanced.
Each replica having 2 containers sharing network.What I am looking for is a shared volume...I am looking for a solution where the 2 pods and each of the containers in the pods can share a directory with read+write access. So if a one container from pod 1 writes to it,... | Kubernetes AWS shared persistent volume |
If you have recently upgrade your Smarty to version 3.x.x
some method names are changed
in your case "clear_assign" is changed to "clearAssign"
for more information get offline documentation of "Smarty 3.0.x" from HERE
or online documentation from HERE
|
I need to remove the cache when a user change language, but I get an error message.
$smarty = new Smarty;
//$smarty->force_compile = true;
$smarty->debugging = true;
$smarty->caching = false;
$smarty->cache_lifetime = 120;
if (isset($_COOKIE['country']))
{
$country = $_COOKIE['country'];
$language = "en... | function call 'clear_all_cache' and 'clear_assign' is unknown or deprecated. error in smarty? |
I've found solution on the webpagehttps://pomeroy.me/2020/09/solved-first-time-login-problems-when-enforcing-mfa-with-aws/Summary. You have to add those two permissions to allowed without MFA."iam:ChangePassword",
"iam:CreateLoginProfile"That will create - small - risk that attacker can change a password without MFA us... | How do you force the use of MFA for AWS IAM users but allow them to change their password when they log in for the first time?If you followAWS Docs, and force MFA, new users cannot change password when they first get their accounts.I know you can eitherforce MFAornotand allow users to manage their own password and cred... | AWS IAM force MFA but allows change password the first time |
Neither option is wrong, but using CloudFront in front of ALB does provide some advantanges even for non-cacheable, dynamic content -- including faster TLS negotiation for viewers who are more distant from the ALB and optimized routing of requests, globally on the AWS Edge Network, from an edge location near the viewe... |
I want to build a web/application server in AWS and I want to use CloudFront to deliver content with low latency and Application Load Balancer (ALB) to balance traffic between servers. If there are some contents needed to be cached, using CloudFront in front of ALB should benefit, however if not is it still recommende... | Is it better to locate CloudFront in front of ALB regardless of content type a user access? |
2
Kubernetes hasn't mechanism like docker-compose to share some folder as volume. But you can create Persistent Volume (PV) and Persistent Volume Claim (PVC) and share your data between containers.
It is described in documentation
Examples from Docs:
YAML for creating PV
... |
In kubernetes we try to have a immutable deployment of our PHP code by deploying the php code in a prepackaged container.
By nature kubernetes volume replace the directory with an empty volume, but I would like to keep the data of the php container so we can share that with the nginx container which has a vhost config... | kubernetes php nginx deployment share volume |
Can you or a DBA monitor temp lob usage from another session using V$TEMPORARY_LOBS. If the number of lobs is increasing then the session is not freeing them correctly and this will lead increasing PGA usage (Note this is not a leak).The most common scenario is when processing a statement that returns one or more temp... | I have jobs in Oracle that can run for hours doing a lot of calculations involving (but not limited to) XmlTransform. I have noticed that the PGA memory is increasing (and the performance degrading) gradually until at some point the job fails with an out of memory (PGA) message. We have applied some fixes, but they don... | How to workaround a memory leak in Oracle |
As you've figured out its some sort of memory leak. If you haven't already, make sure you aren't just accumulating bitmaps in a cache without ever clearing it. Other likely (and more subtle) issues include having a long running task(s) that have references to activities or contexts, or activities registering listeners... |
I have big issues in tracing down 'bitmap size exceeds VM budget' error. I looked at other questions, and tried all sugesstions (deallocating resources, using bitmap.recycle() and setting variables, bitmaps, canvases to null when activity is destroyed or views are detached from window https://stackoverflow.com/a/67794... | Can allocation tracker or heap analyzer help in tracing 'bitmap size exceeds VM budget' error? |
The java client should be able to find the pod's service account and authenticate itself within a cluster, and use a kubeconfig file to authenticate when outside cluster. The default location to look for a kubeconfig file isHOME/.kube/configWhen outside the cluster, thegcloud container clusters get-credentials ...comm... | I am retrieving a list of Clusters from GKE usingGKE Rest API. Next, I need to retrieve containers information fromKubernetes API Serverfor a particular GKE cluster. There are two authentication methods known to me which can be used to authenticate a cluster with Kubernetes API. First One is Basic Authentication and th... | How to Authenticate GKE Cluster on Kubernetes API Server using its Java client library |
You can add a volumeMounts inside your container:containers:
- name: increase-fd-ulimit
volumeMounts:
- name: data
mountPath: /usr/share/elasticsearch/dataand add a volumeClaimTemplates inside your sts:spec:
volumeClaimTemplates:
- kind: PersistentVolumeClaim
apiVersion: v1
metada... | Below is my YAML for volume mounting:initContainers:
- name: fix-permissions
image: busybox
command: ["sh", "-c", "chown -R 1000:1000 /usr/share/elasticsearch/data"]
securityContext:
privileged: true
volumeMounts:
- name: data
mountPath: /usr/share/elasticsearch/data
- name: increas... | MountVolume.SetUp failed for volume "data" : hostPath type check failed: /usr/share/elasticsearch/data is not a directory |
Please have a look at theSimple Web Service CDK Pattern. It helps you create a simple end-to-end service using API Gateway, a Lambda function, and access to a DynamoDB table with just a few lines of code. It is available in multiple programming languages.As a general note: Whenever you want to provide dynamic content, ... | I have a system which uses AWS IoT to send data to a DynamoDB table. This is simple weather data and stores time, temperature, humidity and pressure. So far that side is working well.
I want to display data from this table on a webpage hosted on S3. In its most simple form this would just display the latest row of d... | How to display data from DynamoDB on an AWS S3 hosted static webpage |
If you have python tests, you can use coverage.py, it provides python code coverage that can be imported in SonarQube using SonarPython:Python Coverage Results Import.If you have java tests, you can use JaCoCo, it provides java code coverage that can be imported in SonarQube using SonarJava:Usage of JaCoCo with Java Pl... | Devlopment stack is in Python (flask) and our automation suite(API) is coded in Java .
So which is the best library can be used for code coverage | How to cover java test using Coverage.py library |
1
Following Stefan Golubovic's comments I realize that this question is probably unrelated to kotlin or java and more likely to be related to the implementation of volumes in Docker for Desktop.
Therefore I submitted a more focused question here and I will close this one.... |
This question already exists:
Listing the contents of a directory in a shared volume with 200K files from within a ubuntu container hosted in windows gets stuck
Closed 3 years ago.
Background
I am running a Spring Boot application in a docker... | "ls" in a container within a volume shared with Windows host gets stuck when there are many files in a directory [duplicate] |
This is already answered onself signed certificate in certificate chain on github copilot.The accepted answer seems to work for Windows users, although there's anotheranswersuitable to Mac OS users. | Im behind a corporate proxy but the strange thing is that i can use Copilot extension without any problem but not the Copilot labs.I've tried following:installed win-ca extension and set inject to appendtried disabling: "Http: System Certificates"tried disabling: "Http: Proxy Strict SSL"Nothing works and now im stuck. ... | How do i fix Something went wrong checking access: self signed certificate in certificate chain when using Copilot labs |
You have to force-push by doing this:git push --force-with-lease | I made some changes and pushed them to remote master. I now want to go back to a previous version. I tried doing:git reset --hard a3b40f2d1c764But after doing that, while it moved the local HEAD, it won't let me push that to remote master. How do I make that the current remote master? | I made changes but want to undo them. When i checkout a previous revision, git won't let me commit or push it. Says there's no changes |
I think you have the arguments in the wrong order.
If you're on linux, /usr/bin/time is very convenient for measuring peak memory use. You are running this command:
$ /usr/bin/time -f %M:%e \
convert \
5500kb-image.jpg \
-limit memory 5MiB -limit map 10MiB \
-resize 400 5500kb-image-resized... |
It seems the -limit option is ignored when resizing JPGs with ImageMagick.
The following command uses docker to simulate running ImageMagick on a machine with limited free memory (100MB): the ImageMagick command is passed a 4958 × 6198 JPEG (original file size: 5.5MB) to resize, with -limit memory 5MiB.
The result is ... | How can I prevent OOMs when resizing JPGs with ImageMagick (without increasing memory)? |
Yes it's possible.Basically in your DNS you have to allow *.site.com to be hosted on a single machine.
This way, no matter what subdomain you type the machine will be the same.an example dns record:* A 10.0.0.1Then in the virtual host declaration you have to put<VirtualHost *>
DocumentRoot /var/www/path_to_... | I am building a portal which will have different cities content..When someone comes to the website i want them to choose the city and then proceedtohttp://city1.site.comorhttp://city2.site.comcan this be done using a single database and installation of cakephp ? | How to have cakephp Deliver content on different subdomain? |
Try this :RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-zA-Z0-9_-]+)/?$ mock_profile.php?user_name=$1 [L]Explaination:The following Condition tells the server to stop rewriting if the Request is for an existing directory.RewriteCond %{REQUEST_FIL... | My url is like:http://www.example.com/mock_profile.php?user_name=Yasinbut I want an seo friendly url like:http://www.example.com/YasinI am using the below url RewriteRule in my httaccess but it is not workingRewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ mock_profile.php?user_name=Yasin
RewriteRule ^([a-zA-Z0-9_-]+)... | url not rewriting i am using below code and mod_rewrite is also on |
Ok got a solution. I changed the information in header function & placed the file corresponding to the given information in.htaccessfile. Here are the codes,PHP Scriptif ($row > 0 && $row[5] == 1) {
header('Location: AdminPanel'); // Instead of adminpanel.php
}.htaccessRewriteRule ^AdminPanel/?$ adminpanel.php... | I'm trying to hide the php page name in url which redirects after login by header function. So far I can hide the index file but can't hide the file which redirects after login. Here are my codes,PHP script for after login events$sql_login = mysql_query("SELECT * FROM sms_people WHERE username='$username' AND password=... | Hide php page name of header function in url |
I found the solution. I accessed the firewall web interface from a firefox installed in the dedicated server behind the firewall (the web interface is not accessible from outside), then I made two steps:I added a rule on which I permit the access to the target port. I made this using the "Service" tab in the Security->... | I'm using a dedicated server on aruba with ZyWall firewall. I have two ports listening in the server, using telnet from inside I can connect to both the ports. If I try to telnet from outside I can access only to one of them.I have not internal firewall, and I don't understand how I can see if the ZyWall is blocking th... | I can't access port from outside |
I find a solution. I have to give to my .sh file the permission to be executable.Just add :
chmod +x /home/pi/backupdb.sh | I'm trying to backup a database on my Raspberry via a CRON task every day at midnight but it doesn't work at all.I edit the file /etc/crontab to add my task :59 23 * * * root /home/pi/backupdb.shAnd my backupdb.sh is :mysqldump --user USER --password=PASS areadb > backupdb.txtIf anyone can give some help ? The mysqldum... | Backup a database with CRON on Raspberry |
3
You probably have some basic algorithm errors, creating large data structures, re-building data as other structures, too much large string manipulations, loading whole files into memory, re-fetching data from storage instead of re-using what was retrieved last time, tha... |
I'm getting the 'out of memory' error in php. I know it can be fixed with the likes of ini_set("memory_limit","64M"), but I don't want to, because that much memory for a script is abnormal. I have a few reports that are so huge that I pretty much need that memory, but normally don't.
The problem is: I don't even know ... | Allowed memory size of * bytes exhausted, in php |
Fisheye can be used as "WebSvn" tool and is needed to use for example Crucible for code reviews. In FishEye you can see the commits clearer than in Jira, and you can read the code much easier because of the really good code highlighting | What is the difference between integrating GitHub with AtlassianJIRA Studioand doing it through Atlassian Jira Studio pluginFishEye?Pros/Cons? | Difference between integrating GitHub with Atlassian JIRA Studio and doing it through FishEye? |
You need to make sure you package actually exports the functions you want to use. This is a package development issue - not an issue with install_github.
Note that your NAMESPACE file is empty: https://github.com/hansthompson/pdfHarvester/blob/master/NAMESPACE
It looks like you're using roxygen for your .R files. If... |
I can see my package is installed with library(), but when I load the package from the library, I can't call any of the functions.
> install_github("pdfHarvester", "hansthompson")
> library(pdfHarvester)
> Convert
Error: object 'Convert' not found
> Parse_Tables
Error: object 'Convert' not found
| install_github install package but I can't call the functions |
--onelineis a standard (and very handy) shortcut format, but for anything more specific, you can rely on--prettyand build your output.Try thispretty format(doc)git log --pretty=format:"%h %d %s%<(1,trunc)% b%-"%hshows the short-form hash;%dshows the decorations (branches, tags, andHEAD);%sshows the subject;%<(1,trunc)t... | If you view commit history in Github, eg, it will indicate using ellipsis which commit message have additional lines of content beyond their subject line:When using:git log --onelinein the terminal, is there any way to get a similar "more content" indicator? | "More content" indicator for commit messages in git log --online? |
In case a wildcard certificate is installed on a domain, the browser only check the certificate validity and wildcard rule. As long as this rule is true the certificate id trusted and no warning appears. | I've been using an online SSL checker to check certificate validity for several sites.One thing I noticed is that many websites have wildcard certificates - especially those hosted on common web hosting sites, such as goDaddy:*.onlinestore.godaddy.comBut those sites have custom domains and so when validating the SSL ce... | When is an SSL certificate 'valid' - altnames |
Yes. A couple of ways.The easiest is if the playground is already stored as a zip file on github. For example, there are a few here:https://github.com/erica/swiftslowly/tree/master/Playground%20Secrets%20and%20Power%20TipsYou can click on the download link for a particular playground and choose copy to playgrounds. If ... | Without using macOS at all, is it possible to get a playground file from GitHub into the iOS Playgrounds app? | How do I get a Playground file from GitHub into the iOS Plagrounds app? |
The name does not matter that much: what matters is that your program is able somehow to display the exact commit from which it was built, which in turn allows you to find the exact sources.
In term of naming convention, see for instance semver.org and add a build metadata after 1.1.9.
You need to make a branch to rec... |
So here is an example from someone else's Repo that raises the question nicely.
https://github.com/cfry/dde/releases
Development on this program is progressing well, new releases being put out. A major change from 1.x to 2.x breaks some functionality that a few users depend upon. They are stuck at version 1.1.9. (1.1.... | How do we release a patch to a prior version of our code on GitHub? |
Sinatra was binding to the wrong interface.
Fixed by adding the-oswitch.CMD ruby hei.rb -p 4567 -o 0.0.0.0 | Updating the post with all files required to recreate the setup. – Still the same problem. Not able to access service running in container.FROM python:3
RUN apt-get update
RUN apt-get install -y ruby rubygems
RUN gem install sinatra
WORKDIR /app
ADD . /app/
EXPOSE 4567
CMD ruby hei.rb -p 4567hei.rbrequire 'sinatra'
... | App running in Docker container on port 4567 can't be accessed from the outside |
I found the answers.Although control plane components run as pods but nodes that runs the control plane
components are not registered in the the cluster as node. That is the reason, Kube API server does not have information about these nodes. | Kubectl get cs -o ymalreturns the healthy status for the control plane, but due some some reason,kubectl get pods --all-namespacesdoes not show any control plane pods like api-server, schedular, controller manager etc.I can also see the manifest file at /etc/kubernetes/manifests location as well.Please help what am I m... | Kubectl get pods does not return control plane pods |
When you run belowdocker run --privileged -d --name inner-docker docker:dind --storage-driver=overlay2You are passingdocker:dindarguments--storage-driver=overlay2and not passing an option todocker run. So use belowapp-docker:
container_name: inner-docker
image: docker:dind
privileged: true
command: --storage-dr... | I need to run the DinD docker image with overlay2 drivers, so I'd normally execute (as explained indind Hub page):docker run --privileged -d --name inner-docker docker:dind --storage-driver=overlay2Is there a way to setstorage-driveroption in docker-compose.yml?e.g.app-docker:
container_name: inner-docker
image: do... | Set storage-driver in Docker Compose file |
While not really intended for this kind of thing you could use admission controllers (https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/) to achieve something like that.Due to it's nature the admission controller is called before the namespace exists and you would need to wait until its crea... | I am trying to find a way? If I create a new namespace then I want it to create a RBAC rule for that serviceaccount automatically.I know one way is to create an operator so, that there is an event that is traced by reconciler / api server and it creates the resources based on CRD's. Is there any other way? | Automatically creating resources/objects with creation of namespace in Kubernetes |
Not sure when it got added (other answer may have been right at the time), but now there's a way to export a Lightsail snapshot to EC2 ; select manage on the instance, then create snapshot; on the list of snapshots, click on the 3-vertical-dot menu, and then export to EC2ShareFollowansweredJan 6, 2019 at 21:48okaramoka... | We spun up a box on LightSail because of its simplicity but now we're looking to do some more complicated things. Is there a way to take a snapshot from LightSail and spin up an ec2 instance with a LightSail image.Our end goal is to just get an ec2 image up with the image we worked with under LightSail.The API docs for... | Can you convert a LightSail Instance / Snapshot to EC2 |
I don't think there is way you can debug a lambda function remotely. Your best bet is to download the code on local machine, setup the env variables as you have set up on your lambda function and take it from there.Remember at the end of the day lambda is just a container which is running the code for you. AWS doesn't ... | We are taking over a whole application from another company, and they have built the whole pipeline for deploying, but we still don't have access to it. What we know, that there's a lambda function is running triggered by certain SNS messages, and all the code is in Node.js, and the development is in VS Code. We also h... | How is it possible to debug an AWS Lambda function from remote? |
Here is the example mentioned, how to create third party resource on kubernetes using kubernetes python client.https://github.com/kubernetes-client/python/blob/master/examples/create_thirdparty_resource.mdHope this helps.ShareFolloweditedJun 20, 2020 at 9:12CommunityBot111 silver badgeansweredFeb 14, 2019 at 10:26Prafu... | I'd like to submit aSparkApplicationto a Kubernetes cluster programmatically from python.A job definitionjob.yamllike thisapiVersion: sparkoperator.k8s.io/v1beta1
kind: SparkApplication
metadata:
name: my-test
namespace: default
spec:
sparkVersion: "2.4.0"
type: Python
...runs without problems usingkubectl appl... | How to control a SparkApplication programatically using the python kubernetes client? |
There are a few rules implemented in SonarJava that check the proper use of SQL-related Java objects, specificallyS2695- "PreparedStatement" and "ResultSet" methods should be called with valid indiciesS2232- "ResultSet.isLast()" should not be usedS2077- SQL binding mechanisms should be usedBut there are no rules that c... | I have native queries in java files and i want to scan that queries for using sonarQube server.Is there any way to do that? | Scan Native query in JPA using SonarQube |
You can try with this file:RewriteEngine on
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !^/checkout/
RewriteCond %{REQUEST_URI} !^/customer/
RewriteCond %{REQUEST_URI} !^/cart/
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | We'd like to redirect all https to http with 301 using htaccess mod_rewrite except for certain urls that contain these substrings./checkout/, /customer/, /cart/There are plenty examples for global redirects. But how can this achieved in combination with some exceptions from the rule? | How globally redirect all https to http with 301 except for certain urls |
5
AppSync recently added support for AWS WAF, allowing you to create rate-based rules: https://aws.amazon.com/blogs/mobile/appsync-waf/
Share
Improve this answer
Follow
answered Oct 13, 2020 a... |
Is there a way to rate limit clients easily with AWS AppSync? API Gateway has this, and they're pretty similar services. I'd like to be able to throttle individual clients - so one user can't sit there and bang on the API too hard.
Probably not on the top of my wishlist, but would certainly be nice to have.
| AWS AppSync - rate limiting? |
sonar.web.host=127.0.0.1I think this is the problematic line in your conf. This line indicates which IP address the Web Server will bind to. If you set it to127.0.0.1, then Server will only respond if you reach to it through the IP127.0.0.1, that is, you'll only be able to access it fromlocalhost, thoughIPv4. (Your bro... | I am trying to access Sonar through web browser. I already started it on my terminal but when I try to access it on web browser through , it shows nothing. However, the status shows Sonar is running. How can I make it running on the web browser ?The configuration for Sonar web is:sonar.web.host=127.0.0.1
sonar.web.con... | SONAR not working on Web Browser |
As Thomas Moulard mentioned in the comments, if you have local, uncommitted changes in your working directory, and you pull/merge changes in that do not touch those files, then the local changes in that file stay as they are (otherwise, you would actually get an error).So if you pulled something, and there was no confl... | I had a very weird experience with Git today. My project has a database dump on GitHub. Today there were some changes made to the dump repo on GitHub on the develop branch. I pulled the changes (git pull origin develop) and updated my local database with the changes. For some reason I still had the previous version of ... | Git pull not working correctly? |
Why are you using nohup? nohup is a command that tells the running terminal to ignore the hangup signal. cron, however, has no hangup signal, because it is not linked to a terminal session.
In this case, instead of:
nohup scrapy crawl first &
You probably want:
scrapy crawl first > first.txt &
The last example also ... |
i have start.sh bash script that is running though CRON JOB on ubuntu server
start.sh contains bellow mentioned lines of code
path of start.sh is /home/ubuntu/folder1/folder2/start.sh
#!/bin/bash
crawlers(){
nohup scrapy crawl first &
nohup scrapy crawl 2nd &
wait $!
nohup scrapy crawl 3rd &
noh... | cron job doesn't output to nohup.out |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.