Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
There is a diffrence,In Amazon EC2, Elastic Load Balancing provides a special Amazon EC2 source security group that you can use to ensure that a back-end Amazon EC2 instance receives traffic only from the ELB load balancers.Regarding your other question,
You cannot (as far as I know) direct ELB to VPC.
ELB can only be ... | I have created CNAME using Route 53 for a ELB (2 VPC instances added with it). Verified CNAME withhttp://mxtoolbox.com. It looks fine. Alsonslookup -q= CNAME.MYDOMAINshows my CNAME and address fine.My problem is, CNAME.MYDOMAIN is not loading in web browser. Where as the same setup works for ELB (with EC2-Classic insta... | CNAME for ELB (with VPC instance) is not working |
I installed docker machine today on my Windows 7 machine and run the command without any problem.Did you use boot2docker before on your machine? If you did, it might be related as mine is a clean machine without any pre-existing docker installations. | I am trying to setupdocker-machinelocally on my Windows machine and I followed the install instructions at theDocker Machine Page.Per the instructions, I ran the following commands in my bash terminalTo install Docker client binary$curl -L https://github.com/docker/machine/releases/download/v0.3.0/docker-machine_window... | docker-machine install fails due to 'Couldn't read CA cert' error |
At first you should check what username and email you have configured your git client with.To check email:git config user.emailTo check name:git config user.nameIf both show you the new desired values, then you you should be aware of the fact that you push using new account does not mean that the commits were created b... | I am trying to push files into repository using different username and password but it keeps on showing previous profile's username everytime I pushSeeartistic-developersis the previous username and it should be replace with current username.What should I do? | How to change the username in gitbash |
TL;DR;It is not possible to re-use the same user in multiple stages of thedockerbuild without re-creating the user (sameUIDandGIDat least) in each stage as eachFROMis starting from a clean slateFROM imagein which a userUID=42000andGID=42000is unlikely to already exist.I am not aware of any recommendation against buildi... | As you know, for security reasons, isn't good to use root user execept if you need it. I have this Dockerfile that I use with multi-stage stepsFROM golang:latest AS base
WORKDIR /usr/src/app
# Create User and working dir
RUN addgroup --gid 42000 app
RUN useradd --create-home --uid 42000 --gid app app
RUN chown -R app... | Reuse user in multi-stage Dockerfile |
There isn't one simple answer here, it depends on how you configured things. Postgres doesn't support multiple instances sharing the same underlying volume without massive corruption so if you did set things up that way, it's definitely a mistake. More common would be to use the volumeClaimTemplate system so each pod g... | After making 2 replicas of PostgreSQL StatefulSet pods in k8s, are the the same database?
If they do, why I created DB and user in one pod, and can not find the value in the other.
If they not, is there no point of creating replicas? | If I declare 2 replicas of PostgreSQL StatefulSet pods in k8s, are they the same database or they just share the volume? |
Assuming that your remote repository is referred to by the remoteorigin, and you're interested in the branchmaster, you can do:git fetch originAnd then compare the output of:git rev-parse master... and:git rev-parse origin/masterIf the object names that are output by those two commands are the same, then yourmasterand ... | I have a local git repo, and I have a remote git repo. What is a simple command to see what commit the remote repo is, and what commit the local repo is, so I can simple see if I'm up to date?This is going to be automated in a program, so I don't want lots of complicated stuff that I would have to parse. Preferably it ... | How to see if local git repo and remote repo are same commit? |
Yes, there is:
p <- ggplot(iris, (aes(x = Species, y = Sepal.Length))) +
geom_boxplot()
g <- ggplotGrob(p)
library(grid)
grid.newpage()
grid.draw(g)
system.time(print(p))
#user system elapsed
#0.11 0.00 0.11
system.time({
grid.newpage()
grid.draw(g)
})
#user system elapsed
#0.03 0.00 0.03... |
Working with ggplot and shiny, and plotting a lot of data to generate some interactive plots.
I have some performance problems, so I've checked with benchplot() my plotting time, and some of the big plot's are slow. For example, this is the time that it took me to plot one of those plots-
step user.self sys.sel... | A way to cache a ggplot2 plot |
My question is: If I follow the article, and perform these codes in step2 , do I miss this codeNo, the author is correct.When callingmodel.predict(), the author is using the Pipeline class functionpredict(), andas you can see in the docs...Apply transforms to the data, and predict with the final estimatorSo the X_test ... | I saw on an articlehttps://towardsdatascience.com/multi-class-text-classification-with-sklearn-and-nltk-in-python-a-software-engineering-use-case-779d4a28ba5X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=0.25)Step1: instead of doing these steps one at a time, we can use a pipeline to complete them ... | Why dont we transform X_test when using pipeline |
Updated: This will run at the desired intervals.$schedule->call(function () {
$datetime = date('Y-m-d H:i:s');
echo $datetime;
})->everyMinute()->when(function() {
$now = new \DateTime();
# don't run on Sundays
if ($now->format('l') == 'Sunday') {
return false;
... | I have to run a cronjob in particular times:First one: weekdays between 9:00 - 18:00 every 2 minutesSecond one: saturdays between 10:00 - 18:00 every 2 minutesThe farthest I could get is this:$schedule->call(function () {
(new SendSMS())->run();
})->weekdays()->between('9:00', '18:00');I don't know how to add the e... | Scheduling jobs every N minutes at different days |
Both Amazon SNS and Amazon Pinpoint, supports sending push notification to Amazon devices (e.g Amazon fire tablet) through ADM (Amazon Device Messaging).The major difference between Amazon SNS & Amazon Pinpoint is that : with Amazon SNS you have to set up your application to manage each message's audience, content, and... | I have a use case where i want to send a notification to user on an Amazon fire tablet App and upon tapping on the Notification I show him the features of App.I want to schedule this Notification from cloud. I saw that we have two services Amazon pinpoint and SNS in doing so. But lot of their features seems overlapping... | Amazon Pinpoint vs SNS vs ADM |
You can use the condition for your checkout step and the following steps:
- name: Checkout
uses: actions/checkout@v2
if: steps.check.outputs.triggered == 'true'
- name: Following step1
if: steps.check.outputs.triggered == 'true'
...
Alternatively, you can create a new job and use that if condition once:
jobs... |
My use case is, to trigger docs build when there is a trigger word in Pull Request Comments.
I am using pull-request-comment-trigger to know if a Trigger word is present in the code.
After knowing Action is triggered, I want to run some commands inside the repo. So, I have to use actions/checkout for that.
My doubt is... | If condition in Github Actions for another Job |
I got an answer from github support that they have fixed that issue :)Hi Mark,
Sorry about the delay in getting back to you! I've been working through some tickets that were left on-hold.This issue has now been fixed!You can't usehttps://maven.pkg.github.com/ORG, but you can use the following URL for normal and SNAPSHO... | I'm trying to use Github packages as a maven repository.When I point directly to a repo like this :repositories {
maven {
url = uri("https://maven.pkg.github.com/ORG/REPO")
credentials {
username = 'some-user'
password = 'github-token-with-repo-scope'
}
}
}And pul... | Github Maven Packages can't be found in ORG |
1
So here is the code for the 1st thing:
import pandas as pd
import itertools as it
df = pd.DataFrame({'Car' : ['BMW_1', 'BMW_2', 'BMW_3', 'WW_1','WW_2','Fiat_1', 'Fiat_2'],
'Distance' : [10,25,22,24,37,33,49]})
cars = df['Car'].tolist()
combos =... |
I had a data frame and function like that:
df = pandas.DataFrame({'Car' : ['BMW_1', 'BMW_2', 'BMW_3', 'WW_1','WW_2','Fiat_1', 'Fiat_2'],
'distance' : [10,25,22,24,37,33,49]})
def my_func(x,y):
z = 2x + 3y
return z
I wanted to get pairwise combinations of the distances covered by the ca... | python alternative solution scipy spatial distance, current solution returns MemoryError |
As David Maze pointed out, order does matter for the docker cmd command.
The -dp option needs to come before the image name.
So using
docker container run -dp 5000:5000 -t test_tag
works like a charm.
|
Setup first:
Windows 10 without WSL2 - old Hyper-V Backend
Docker for Windows - Linux containers.
I have a small python script:
from flask import Flask
server = Flask(__name__)
@server.route("/ping")
def hello():
return "Hello World!"
if __name__ == "__main__":
server.run(host='0.0.0.0')
When I run it local... | Cannot reach docker container - port not bound |
1
BeanstalkApp has a free plan, and you can use either SVN or Git. If it's open source, you can use Google Project Hosting.
EDIT: Forgot to mention, but Beanstalk's free plan does limit you to one user, but you could always share the user creds, if that's acceptable.
... |
Apart from the obvious choice of GitHub, $7 a month, i was looking for a free simple way for two developers to work on the same file and to make independent changes without overwriting the others changes. I went for dropbox but this creates a second "copy" file, which is just not ideal.
Has anyone had any free, tried ... | Allow two developers to work on the same file at one time |
Just add :rewrite (.*)/$ $1/index.html last;
rewrite (.*)/..$ $1/../index.html last;Should works | Using nginx as a reverse proxy, I'd like to mimic theindexdirective withproxy_pass. Therefore I'd like nginx to query/index.htmlinstead of/,/sub/index.htmlinstead of/sub/.What would be the best approach to do this ?Not sure if it's relevant, but the proxied server does answerHTTP 200on/, but I'd still like to rewrite i... | nginx rewrite all trailing / to /index.html with proxy pass |
Thedocumentationis extensive and helpful.SeeinstallationIf you have Docker, you can simply run:docker run \
--interactive --tty --rm \
--publish=9090:9090 \
prom/prometheusAnd then browse:http://localhost:9090.The default config is set to scrapeitself.You can list thesemetrics.And graphprometheus_http_requests_totalthe... | I'm pretty new to Prometheus and according to my understanding, there are many metrics already available in Prometheus. But I'm not able to see "http_requests_total" which is used in many examples in the list. Do we need to configure anything in order to avail these HTTP metrics?My requirement is to calculate the no: o... | Prometheus metrics Configuration |
Cloudflare might be an easy way to do this, they support multiple TXT records in the root of the domain, or atleast, I haven't had any problems with it. There are also other alternatives like ClouDNS or deSec.Almost any DNS provider should support multiple TXT records in @. | I am not good at DNS configuration. I did some research on this topic. but it seems am unable to find the best way to set up the multiple TXT records using the host as @ in my domain DNS configuration. I was able to add aws TXT record but now I am trying to add Facebook and Google domain verification code in the TXT re... | How can we add multiple TXT record using host as @ in Domain Dns? |
Your allocation fails:
=9318== Address 0x8 is not stack'd, malloc'd or (recently) free'd
...which kind of makes sense since you're trying allocate, 600851475143 * 4 / 2, or 1201702950288 bytes, or 1.2TB.
primes is therefore NULL and you're trying to dereference it when doing primes[i], causing undefined behavior.
F... |
Here is the code in question:
long number = atol(argv[1]);
long prime_limit = number / 2;
int * primes = malloc(sizeof(int) * prime_limit);
long i;
for (i = 2; i <= prime_limit; i++) {
primes[i] = 1; # This is line 16
}
Here are the errors:
==9318== Invalid write of size 4
==9318== at 0x40065B: main (003.c:16)... | Invalid write size of 4 |
I never run Nginx on Windows, but the official documentation says how:http://nginx.org/en/docs/windows.html.To run two node applications with Nginx, it's necessary to create a proxy. This is an example of how to alter thenginx.conffile for this:worker_processes 1;
events {
worker_connections 1024;
}
http {
... | I want to install Nginx on Windows, and to run two node application. How can I do this?I've tried to download Nginx 1.6.3, but I don't find something relevant about how to run on Windows. Just for Linux. I think there should be some modules for node.Any advice will be useful! | How to run Nginx with Node.js on Windows? |
I'd like to add this answer for anyone who is having a similar problem. So this is how I resolved this issue.I moved my DNS to Cloudflare and added an A record for naked domain. This worked for me because later my DNS was being managed on cpanel and it doesn't provide any option to add an ANAME. | I have a standard SSL from godaddy for my domain teamrla.com. This works perfect forhttps://www.teamrla.combut not forhttps://teamrla.comWhile IP address of both domains are same, how do I fix it? | Rails - SSL not working for naked domain |
Problem solved. The trick was to use the following lines
FastCGIExternalServer /var/www/fast-cgi-fake-handler -host 127.0.0.1:9000
AddType application/x-httpd-fastphp5 .php
Action application/x-httpd-fastphp5 /fast-cgi-fake-handler
The relative path in Action + the full path in FastCGIExternalServer did it!
|
I've been running most of my PHP apps on my website on a fastcgi backend, served by NGINX. I have a new application which seems pretty well integrated with Apache; it's heavily dependent on dynamically written .htaccess files, for example. I'm working on modifying it to work natively with NGINX, but that's not yet rea... | Sharing PHP-CGI between Apache and NGINX |
Prometheus reloads file_sd_configs automatically using file watches according to the documentation:It reads a set of files containing a list of zero or more <static_config>s. Changes to all defined files are detected via disk watches and applied immediately. Files may be provided in YAML or JSON format. Only changes re... | I tried file based service discovery ,But everytime when I change the configmap(which contains static target), I am deleting prometheus pod manually to get config changes. Is there any way that prometheus can get config changes automatically without deleting the prometheus pod? any help on this issue?I am installing pr... | Prometheus file based service discovery |
1
The CODEOWNERS docs have an example file, with this relevant bit:
# The `docs/*` pattern will match files like
# `docs/getting-started.md` but not further nested files like
# `docs/build-app/troubleshooting.md`.
docs/* [email protected]
So, to assign the root directory,... |
I have the following structure:
.github/
CODEOWNERS
A/
files
B/
files
example.py
example2.py
I want code owners to have a specific owners on all files in the main directory.
I can do:
example.py @owner
example2.py @owner
But that means list them manually which is something I dont want t... | Set CODEOWNERS on files but not directories? |
You can installmod_geoipon your server, which enables database-based geolocation lookup directly inside Apache. Look at the examples for exactly the scenario you talk about.The advantage would be much better performance, since the lookup will be done locally using a database, instead of needing to call an external web ... | I am writing a small script in which it redirects to country specific landing pages(example: if you come from Germany you will be re-directed toxyz.com/de/) this redirection happens using index.php which connects to web service returns the country the user is accessing the website from then I redirect the user using 30... | IP Geo location with Mod_Rewrite & PHP |
Use the AWS STS command get-caller-identity.
Returns details about the IAM identity whose credentials are used to call the API.
$ aws sts get-caller-identity
{
"UserId": "AIDAxxx",
"Account": "xxx",
"Arn": "arn:aws:iam::xxx:user/Tyrone321"
}
You can then take the role name, and query IAM for the role de... |
I'm on an EC2 instance that has an IAM role attached to it, and would like to be able to verify that I am indeed using this role from the AWS CLI.
I'm imagining being able to call something like this (but can't find anything like it in the CLI docs):
$ aws get-current-role-details
Does this functionality exist?
| Find role being used on server from AWS CLI |
When logged in as the user that Jenkins runs as, use putty to manually connect to the destination and accept the request to put the key in putty's cache. If Jenkins is running as a service, go to Services and check the "Log On" tab in the Properties dialog to see who it's running as.If you want to add the key to putty'... | I'm doing a integration with jenkins and github, and after it compiles the project i want to push the .exe file to github.I already did the configurarions of SSH on my console (i'm using windows with putty to manage the ssh keys)but when the jenkins will run the post build console command it returns me this :If you tru... | How to auto approve console request on Jenkins |
I don't know if this can be done with vanilla kubernetes. But what you are requesting sounds an awful lot like Istio.io "Egress Gateway" Feature.https://istio.io/docs/tasks/traffic-management/egress/egress-gateway/Though theoretically, you could program your application to always contact your proxy and then block egres... | I am trying to proxy all outbound traffic coming from a Kube cluster. Presumably, the topology would look something like this:Preferably, I'm looking for a lightweight solution that doesn't require the installation of additional components, sidecars or a ton of configuration but I'm not entirely sure what the solution... | Proxy Outbound/Egress Traffic Within Kubernetes |
I have experienced the similar problem before; to resolve it, I changed the origin's TLS from TLS1 to TLS1.2 and moved from http to https. | I have used AWS application load balancer for my domain and it is serving properly. However, I want to add caching layer for my website, but when I try to use Cloudfront for the same it gives me502 error. I have followed aws blogs but unable to resolve the issue.
please find attached images for my cloudfront distributi... | Cloudfront with Application Load balancer |
The solution found at the bottom of this "crawlable application" post on senior-java-developer.com shows how to address the issue by rewriting to another location that handles the proxy_pass as follows:
if ($args ~ "_escaped_fragment_=(.*)") {
rewrite ^ /snapshot${uri};
}
location /snapshot {
proxy_pass http:... |
I am attempting to redirect to a phantomJS instance running on port 8888. However it is failing. The regular page loads, but when I change the #! for the ?_escaped_fragment_= it just gives me the regular page still...
Excerpt from the nginx file
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
... | Nginx redirect to PhantomJS |
This is because you use git clone https://github.com/A/repo.git in your local folder, and then changes the remote origin to A and add remote B in your local folder. So all the local branches belongs to repo A.
If you want you local branch based on B/master, you can use git checkout -b master1 B/master, and then replac... |
I have to remote repos in one folder, after writing git remote -v I obtain:
A https://github.com/A/repo.git (fetch)
A https://github.com/A/repo.git (push)
B https://github.com/B/repo.git (fetch)
B https://github.com/B/repo.git (push)
Currently I'm on branch master of A, but I would like to swap to master bran... | Git: Swap between repos |
You have two paths defined for/socket.iowith different backend services. However, Ingress only matches the first path that satisfies the conditions. So, the connections would always be routed to thespectrogram-ms-backend-serviceat port8080.You can modify the config to something like this:paths:
- path: /socket.io/{serv... | I have an Angular frontend that I need to communicate with 2 microservices via websocket, using the same path (/socket.io), but different ports.I have defined this ingress:apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Values.name }}
labels:
name: {{ .Values.name }}
spec:
rules:
- host: ... | Kubernetes Ingress - same path but with multiple ports possible? |
If you look at the Python output that you get from theonline parser, you can see that you get'ports': '-"9000:9000"'which doesn't look like a list of port numbers.A sequence element is indicated by a dash followed by a space, and if you input that space after the dash followingports:ports: - "9000:9000"You actually do ... | Problem: the below content returns "service 'image' must be a mapping not a string."
I tried using YAML Parser(http://yaml-online-parser.appspot.com/), but it returned no error.version:
"2.0"
services:
blog:
image:
abc/defg
environment:
APPLICATION_SECRET:
82xxxxxxx
ports: -"9000:9000"working ve... | docker-compose.yml content - How can i avoid "must be a mapping not a string" error message? |
does that mean within a container (pod) in the cluster? or even from the nodes themselvesYou can access the ClusterIP from KubeNode and pods. This IP is a virtual IP, and It only works within the cluster. One way it works is ( apart from CNI), Using Linux kernel'siptables/IPVSfeature it rewrites the packet with Pod IP ... | I have a Kubernetes cluster with the followings:A deployment of some demo web serverA ClusterIP service that exposes this deployment podsNow, I have the cluster IP of the service:NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 5d3... | What does "within the cluster" mean in the context of ClusterIP service? |
How's that?RewriteCond %{REQUEST_URI} /catalog/
RewriteRule .* / [L,R=301]
RewriteRule ^/?$ catalog/index.php [L]Ifcatalogis part of the browser request, a 301 will correctlyredirectto /, which in turn willrewriteto catalog/index.php. | We have an online shop with a welcome page. Our SEO company has asked us to get rid of the welcome page with a rewrite as follows. i am struggling to get this to work. Can you help please?rewrite www.domain.co.uk/catalog/index.php to become www.domain.co.uk, then 301 from www.domain.co.uk/catalog/index.php to www.domai... | Rewrite rule causing a loop |
1
As @bobbear suggested and is actually mentioned in the official doc one of the prerequisites is:
Version 3.10 or higher of the Linux kernel. The latest version of the kernel available for you platform is recommended.
After having checked my Kernel version:
$ uname -a
Li... |
Just installed Docker CE following official instructions with the repository in Ubuntu 14.04
Installation went successfully, the daemon is running
$ ps aux | grep docker
[...] /usr/bin/dockerd --raw-logs [...]
My user is in the docker group:
$ groups
[...] docker
The cli can't seem to communicate (same with sudo)
$ ... | Failed to connect to containerd: failed to dial |
2014: One workaround would be to do a code search, with:
q: a word than you know is in the file you are looking for
filename: the name of the file you are looking for (see "Search by filename")
For instance, if you are looking for classes.js in the repo jquery/jquery, which you know has to contain the word 'addClass... |
With Github's search API, i can search for repository's name or user's name.
How can i search the file name in the specific Github repository?
I mean how can i do that: in repo jquery/jquery, i search for "selector" keyword, i will have selector.js, selector-sizzle.js, selector-native.js and selector-folder
Thank you
| How can i search file name in specific Github repository |
Have a look here:https://github.com/webdevops/azure-devops-exporterThis is an Prometheus exporter for Azure DevOps. It scrapes projects, builds, build times (elapsed and queue wait time), agent pool utilization and active pull requests.ShareFollowansweredMar 23, 2021 at 19:40PepperPepper20311 silver badge1212 bronze ba... | is it possible to publish Azure DevOps pipeline metrics/logs into Grafana. I'm looking to build Grafana dashboard to display success/failire of Azure Build & Release pipeline.I don't want metrics from the applications deployed via the pipeline (which can be done by plugging-in grafana to Azure Monitor) | AzureDevOps Pipleline Metrics/Logs in Grafana |
For anyone seeing this question in the future,Remember you must remove the files and then commit with the.gitignorepresent for the.gitignoreto actually ignore the files.Not deleting the files manually will result in the existing files staying in the repo, but new files that are added will be ignored.ShareFollowanswered... | I have removed my file using git rm --cached and git reset HEAD. But when I try to push it to my repo, it still adds that file? How can I completely remove that file? | File removed using git rm --cached, but git still pushes it to my repo? |
I have found the solution for this. It is needed to enable SSL in nginx in order to achieve http2. I tried it and it's working well. I found the answer from this link.How To Set Up Nginx with HTTP/2 Support on Ubuntu 16.04Now my config file as below.server {
listen 443 ssl http2;
server_name localhost;
ssl_cert... | I am working on enabling http2 in nginx docker. I am getting this error when I calling to localhost. My nginx configuration file as below.server {
listen 2020 http2;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html;
ind... | localhost sent an invalid response. ERR_INVALID_HTTP_RESPONSE |
There is nothing "virtual" about them. The agent talks to docker and manages one docker daemon, which is the entire machine. Running multiple does not make sense for a variety of reasons, such as when you type "docker run ..." on the machine, which agent is supposed to pick up that container? And they are not reall... |
I'm getting in habit with rancher and docker and I'm now trying to figure out if it is possible to create multiple local custom hosts on the same physical machine. I'm running RancherOS in a local computer. Through the Rancher Web UI I'm able to create a local custom host and add containers to it.
When I try to add a... | Rancher: Multiple hosts in the same physical machine |
Your--publishoption is backwards: it's-p :, so for your setup you'd want--publish 8018:5000.Startup issues aside, you do need the option to cause the container to listen on 0.0.0.0 (or ::0, if IPv6 works). If it binds to localhost it will be unreachable from outside its container, including from other containers and f... | I created an image for .NET core:FROM microsoft/dotnet:2.1-sdk AS build-env
WORKDIR /app
EXPOSE 80 443 5000 5001 5010 5011 7000 22676
#ENTRYPOINT [ "bash"]
CMD ["bash"]I run a container from itdocker container run -it --publish 5000:8018 --name versie3001 -v //c/tijd/mount:/app michel03What goes well is that I see th... | dotnet core docker container - Unable to bind to https://localhost:5001 on the IPv6 loopback interface |
I fixed it! I set the server name in different server blocks in nginx config. Remember to use docker port, not host port.server {
listen 80;
server_name game2048;
location / {
proxy_pass "http://game2048:8080";
}
}
server {
listen 80;
server_name game;
location / {
# Remember to refer to doc... | I'm trying to have a docker container with nginx work as reverse proxy to other docker containers and I keep getting "Bad Gateway" on locations other other than the base location '/'.I have the following server block:server {
listen 80;
location / {
proxy_pass "http://game2048:8080";
}
location /game {
... | Docker nginx reverse proxy gives "502 Bad Gateway" |
Only public repositories are supported at the moment (this might change soon).
|
I have a GitHub repo that I want Azure to monitor for changes and get latest when it is updated. I am at the point in the Deployments tab where I can "Associate a GitHub Repository". When I click the "Authorize Windows Azure" link, a dialog pops and some of my repos are available, but the repo I want to publish is n... | GitHub push to Azure website |
You need to check if you have a personal access token set in your environment. For example, when I have a Git project, I set a personal access token. However, I set this in the project environment, so that it isn't any issues outside of that environment.
To see if there is one assigned:
Sys.getenv("GITHUB_PAT")
If th... |
I am trying to install the ggpattern package from GitHub (https://www.rdocumentation.org/packages/ggpattern/versions/0.2.0)
I've reinstalled R, followed the all steps according to the site, also tried
remotes::install_github("coolbutuseless/ggpattern", force = TRUE)
But I still get:
Error: Failed to install 'unknown p... | Failed to install 'unknown package' from GitHub |
From documentation,
you need to create ReplicationGroup instead of CacheCluster and set NumNodeGroups to 1 and AutomaticFailoverEnabled tofalse.
Both values are the default, so you can omit them.
TheAPI Documentationhas more details on the parameter values for single node. | I used this earlier to get a redis instance up successfully through cloudformation:"RedisCache": {
"Type": "AWS::ElastiCache::CacheCluster",
"Properties": {
"ClusterName": {
"Fn::Join": ["-", [ {
"Ref": "EnvType"
}, {
... | AWS::ElastiCache::CacheCluster vs AWS::ElastiCache::ReplicationGroup |
1
Good news everyone, the latest mono alpha version (mono 4.3.2, available here: http://www.mono-project.com/download/alpha/ ) now supports ServicePointManager.DnsRefreshTimeout!
Share
Improve this answer
Follow
... |
I'm developing a software with C# + Mono in Ubuntu which makes use of network classes like WebRequest or Dns. During development phase, I used my code to connect to a local webserver 192.168.1.101 and after a while I had to move it to 102.168.1.20, and I used a local DNS server giving the mentioned IPs readable names ... | Resetting DNS cache in C# + Mono |
The destination user (destUserName) goes off the primary username (regardless of audit.mydomain.com or mydomain.com). If audit.mydomain.com was added as a subdomain to mydomain.com and[email protected]was his primary email address it will work with the input:name='destUserName' value='test' | Copied from thisdocument, can the source user for example[email protected]and the destination user be[email protected]?Types of users in a monitored email scenarioA monitored email scenario includes three types of users:Administrator — Any domain administrator can create, retrieve, update, and delete an email monitor u... | Auditing Google App for Work E-Mail |
Docs. It requires a Perl expression, not a file name.In fact, I suspect that executing a file (which could be done usingdo) would be bad, since I suspect it would pollute a namespace that's reused.You should move your code into a module, then you use useMyModule::mysubin the config file to callmysubof the module.(Remem... | I have an nginx block like this where I want to run a perl script on a hello/world request. The whole set up is inside docker.My nginx.conf:http {
perl_modules perl/lib;
server {
listen 80;
location /hello/world {
perl rewrite.pl;
}
}My docker-compose has this:nginx:
image: nginx:pe... | Invoking perl from nginx |
You should install it from herehttp://code.google.com/p/git-osx-installer/downloads/list?can=3 | I installed GitHub on mac but I don't have installed git on terminal. When I type git on terminal it prints command not found.George-Kankavas-MacBook-Pro:~ georgekankava$ git-bash: git: command not found | github installation on mac |
If you want to do any pull request, you have to do so in a dedicated branch.If the files appear "completely changed" when making a pull request within your own repo, this is typical of the core.autocrlf setting: if set to true, Git would change on checkout the end of lines characters automatically to CRLF.A simplegit c... | I was facing serious problem earlier. Problem is that GitHub Pull Request showing files changes rewritten all files except the some changes made in existing file.I am using Visual Studio 2015 for commit and fetch changes,
and using Command window for git pull.
If anything need more clarity, please let me know.Steps fol... | Git file Showing All file rewritten |
I have found the answer. I had to put: Location = OutputCacheLocation.Server, in another case it caches on the client side which is wrong.
So the outputcache attribute should look like this:
[OutputCache(Duration = 600, VaryByParam = "*", VaryByCustom = "User", Location = OutputCacheLocation.Server)]
public ActionResu... |
I spend whole day to figure out the problem but I couldn't:
Here is the problem:
On the action I have output cache attribute:
[OutputCache(Duration = 600, VaryByParam = "*", VaryByCustom = "User")]
Also I've rewritten the Global.asax like this:
public override string GetVaryByCustomString(HttpContext context, string ... | Is VaryByCustom not working when I use it in Output cache or cached it wrong? |
Hibernate does also iterate over the result set so only one row is kept in memory. This is the default. If it to load greedily, you must tell it so.
Reasons to use Hibernate:
"Someone" was "creative" with the column names (PRXFC0315.XXFZZCC12)
The DB design is still in flux and/or you want one place where column name... |
I have a daily batch process that involves selecting out a large number of records and formatting up a file to send to an external system. I also need to mark these records as sent so they are not transmitted again tomorrow.
In my naive JDBC way, I would prepare and execute a statement and then begin to loop through ... | Is Hibernate good for batch processing? What about memory usage? |
If you want specific allocation behaviour, write your own allocator. VirtualAlloc etc are there to help you do it. Using a compiler and CRT which is still in support would help too.
|
When the VC6 C runtime on XP can't serve an allocation request within an existing heap segment, it reserves a new segment. The size of these new segments increase by factors of 2 (until there are not large enough free areas to do that, at which point it falls down to smaller segments.)
In any case, is there any way to... | Can you tune C runtime heap segment reservation size on XP? |
nginx always buffers request bodies before opening a connection to an upstream. I believe the difference between the native behavior and the module you found is that with the native behavior, the file contents will be sent over the connection to the backend, and the upload module only sends the filename to the backen... |
I am writing a ruby on rails application that has large file uploads. (20-100MB).
I have looked into ways to do this without tying up the rails processes. I have come across an nginx module that does specifically this. (http://www.grid.net.ru/nginx/upload.en.html)
However, It seems to me while watching logs and my se... | Does the current NGINX have some kind of buffer support for uploading large files? |
This may happen when there is not enough swap space. Try with small number ofnum_workers.Hope this helps! | The cifar 10 tutorial for pytorch can be found here:https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html#sphx-glr-beginner-blitz-cifar10-tutorial-pyThe tutorial goes through how to use pytorch to make a simple convolutional neural network for the CIFAR 10 dataset. Near the end, it slightly goes through ho... | How to add GPU computation for the CIFAR 10 pytorch Tutorial? |
How can I allocate memory for it and insert a GraphObject?
It doesn't want to be a pointer at all; just make the map itself a member of the class and memory allocation will happen automatically.
Correctly inserting an object is rather fiddly, since you're storing pointers there too. If it doesn't need to be a pointe... |
I have a private field
std::map<std::string, std::multiset<GraphObject*>>* the_Map;
How can I allocate memory for it and insert a GraphObject?
Do I have to use the new operator?
the_Map = new map<string,multiset<GraphObject*>>;
And how can I insert a new GraphObject?
It's part of a datastructure and I really need a ... | How to use STL map? |
Add the following to the project's Gemfileadd gem "jekyll-assets", "~> 2.3.2"This post was helpful for me.https://dylanbeattie.net/2019/12/12/shaving-the-jekyll-yak.html | I've been trying to customize my GitHub User page and followed the provided (below) directions precisely.https://github.com/github/personal-websiteThe website is running, but I selected the "jekyll-theme-minimal" theme and added the appropriate lines in the "_config.yml" and "index.md" pages. I even copied over the "in... | GitHub User Page New Themes and Changes Not Updating |
You may not usescreenfor running things in background in a script. Use ampersand (&) to background a process andnohupso it won't be killed when cron script exits. Also remember a subprocess PID in a file.Something like this:kill -- "$(cat mybot.pid)"
now="$(date +%Y%m%d%H%M%S)"
nohup node mybot.js >> "logi/logi_$now.tx... | I want to run the script every 30 minutes with cron but I have problem with my code.
In every 30 min I have to kill old script and run it again. I have somethink like this, but it is not working:cd /var/www/scripts
pkill -f bot
now="$(date +%Y%m%d%H%M%S)"
screen -S bot
node mybot.js >> logi/logi_$now.t... | run the script every 30 minutes bash |
I don't know of a way to defer shutdown until the job finishes naturally. Usually people try to stop the running jobs and then restart them later. If you can determine which jobs are running in this server, then you could issue a stop for those jobs and wait for them to complete (by checking job status), before allow... | I'm having a WebSphere Liberty batch job running on Kubernetes cluster, scaled up to 10 pods. Each pod has the same code base and each has multiple JSR batch jobs. I wanted to do rolling update and zero downtime.As per the docs(https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/andhttps://cloud.go... | Kubernetes Rolling updates for JSR 352 WebSphere Liberty batch |
) You should add location that will be redirecting all traffic from Server-2 to Server-1, e.g.:server {
listen 80;
server_name Server-2.com;
location / {
proxy_pass http://Server-1.com/;
}
}2) Try loadhttp://Server-2.compage and if everything fine, you will get response from your a... | I have one server Server-1 where my app server is running.In Server-2 I want to set up my Nginx to act as a reverse proxy for my app server.how do I set up Nginx(in Server-2) which forwards traffic to Server-1how do I check that everything is working fine, Nginx(Server-2) is acting as a reverse proxy for my app server(... | How to set nginx reverse proxy in remote server |
It's legal in a domain name, and required for internationalised domain names (IDNs) which when converted from Unicode to ASCII end up prefixed withxn-- | I looked up couple of questions on SO, which seem to suggest that two continuous hyphens (e.g. my--website.com) are not allowed but when I search for same domain name onhttp://www.register.com/index.rcmx, it gladly accepts the name while rejects non valid domain names like my#website.com.Validation for URL/Domain using... | Can domain name have two continuous hyphens |
This is likely because $MYENV is not available for envsubst when you run the image.
Each RUN command runs on its own shell.
From the Docker documentations:
RUN (the command is run in a shell - /bin/sh -c - shell form)
You need to source your profile as well, for example if the $MYENV environment variable is availabl... |
I have a requirement that before an application runs, some part of it needs to read the environmental variable. For this I have the following docker file
FROM nodesource/jessie:0.12.7
# install gettext for envsubst
RUN apt-get update
RUN apt-get install -y gettext-base
# cache package.json and node_modules to speed... | envsubst command getting stuck in a container |
From your code snippet, you don't get any more updates because you have fallen through your loop, sinceupload.isDone()is true. If you add:System.out.println("upload prog " + upload.getProgress().getPercentTransfered() + " state " + upload.getState());after the end of your loop, you will see theCompletedmessage. You p... | I'm using Amazon's providedHigh-Level APIto upload files to Amazon S3. I use a lightly-modified version of the example provided:public Upload uploadFile() {
transferManager = new TransferManager(new BasicAWSCredentials("KEY", "SECRETKEY"));
upload = transferManager.upload(existingBucketName, keyName, new File(... | Amazon S3 Upload hangs on 100% |
0
Although I cannot test this myself, I think you could do that using Invoke-Command like below:
$servers = "SRV1", "SRV2", "SRV3"
# set the credentials for admin access on the servers
$cred = Get-Credential 'Please enter your admin credentials'
$result = Invoke-Comman... |
I have script that checks every 24 hours locally on server the status of all backup jobs along more details.
I want that script to check all my servers, lets say: "SRV1", "SRV2", "SRV3"
How can i manage that?
Here's the script:
$date = (Get-Date).AddHours(-24)
$sessions = Get-VBRComputerBackupJobSession
foreach ($PBac... | How to check Veeam Backup Jobs Status in ALL servers |
Reuse
In the same thread those objects can and should be reused. For example you can use the DocumentBuilder to parse multiple documents.
Thread Safety
DocumentBuilderFactory used to explicity state it was not thread safe, I believe this is still true:
An implementation of the
DocumentBuilderFactory class is NOT
... |
I'd like to know which objects can be reused (in the same or different document) when using the Java API for XML processing, JAXP:
DocumentBuilderFactory
DocumentBuilder
XPath
Node
ErrorHandler (EDIT: I forgot that this has to be implemented in my own code, sorry)
Is it recommended to cache those objects or do the... | Java and XML (JAXP) - What about caching and thread-safety? |
Maybe you can also use User instead of HttpUser because HttpUser is thought to keep session betweek tasks.using User instead of HttpUser you need to import requests and instance it, but it doesn't keep session by default. if you want to keep session create a session object and make calls with it.for exampleclass Login(... | I'm doing a load test with python Locust package on an service API that's running on Kubernetes.I saw in the source code that theHttpUserusesrequests.session.request()to send the requests. By defaultrequests.sessionkeeps the connection alive (which causes all the requests going to one pod instead of getting distributed... | How to close TCP connection in python locust (requests.session) |
I was facing the same problem, but the following JSON response finally worked for me:
{
"requestId": requestId,
"status": "failure",
"fragment": value,
"errorMessage": customErrorMessage // String value
}
|
I have a custom AWS::CloudFormation::Transform which is attached to a Lambda function. On successful responses, as mentioned in the documentation, I'm returning the following:
{
"requestId": requestId, //pulled from the event
"status": "success",
"fragment": value //string value
}
This works fine. However, on... | AWS CloudFormation Transform - How do I properly return an error message? |
4
+25
Your processor has multiple cores, which are recognized as Compute Units. Run following code snippet & check that number of CU is as expected:
cl_device_id device;
cl_uint max_compute_units;
cl_int ret = clGetDeviceInfo(device, CL_DEV... |
I'm writing an openCL program on a mid 2012 13" macbook pro with the following specs:
Processor: 2.9 GHz Intel Core i7
Graphics: Intel HD Graphics 4000
In my program I do the following to check how many devices I have access to:
// get first platform
cl_platform_id platform;
err = clGetPlatformIDs(1, &platform, NULL)... | # of OpenCL devices on 2012 Macbook pro |
You can achieve this by creating a new virtual switch in Hyper-V Manager for Minikube.Open the Hyper-V Manager (simple Windows search will find it)Select 'Virtual Switch Manager'Select 'New virtual network switch' and choose network type 'External'Create the virtual switch (take note of the name you save it with)Then w... | I want to work on minikube . I installed it successfully but I learned that in Windows 10 , I need to disable Hyper-v .
Now , when I try to install docker , it needs Hyper-v enabled .I need both for work .Please suggest a way to make this happen .Appreciate your help . :) | How to install minikube and docker in Windows 10? |
Found the issue. It was due to the fact I had not configured the Nginx controller for the Ingress. | I'm trying to create an Ingress for my Kubernetes cluster on Google Compute Engine. It was working fine while I was using thegkecontroller class. But I had to change it tonginxcontroller to be able to specify the back end timeout. The problem is that my Ingress is not being provided with an external IP address.This is ... | Kubernetes: Nginx Ingress not providing external IP address |
Your GitHub password won't work if you have activated the two-factor authentication.You need to generate a Personal Access Token, as I explain in "Configure Git clients, like GitHub for Windows, to not ask for authentication".That long (40 characters) password will work as your GitHub passwordwithoutrequiring a second ... | I know SSH in GitHub causes no problem (no username/password to type everytime i.e.), but I need to use HTTPS for a repo of mine.Now, Igit inited the repo, I committed, I did agit remote add origin https://github.com/user/repo.gitas suggested by GitHub.I was about to do agit push -u origin master: first it promped me ... | GitHub, HTTPS and Mac application |
1
Adding the below somehow made envoy recognize and update the destination policy
httpDetectionInterval: 1s
sleepWindow: 3m
httpMaxEjectionPercent: 100
Share
Follow
answered Feb 15, 2018 at ... |
I seem to be hitting a limit on maximum no of websocket connection within a container with istio proxy
It seems to run out at 1024 (which seems like default)
I also tried increasing my --default-ulimit for nofiles to 102400:102400 but am suspecting its limited by istio
I also tried adding DestinationPolicy but that di... | maximum no of websocket connection with a container running with istio envoy proxy |
Read this:http://docs.celeryproject.org/en/latest/userguide/workers.html#concurrencyIt sounds like you have one worker per celeryd. That seems wrong. You should have dozens of workers per celeryd. Keep raising the number of workers (and lowering the number of celeryd's) until your system is very busy and very slow. | We have ~300 celeryd processes running under Ubuntu 10.4 64-bit , in idle every process takes ~19mb RES, ~174mb VIRT, thus - it's around 6GB of RAM in idle for all processes.
In active state - process takes up to 100mb of RES and ~300mb VIRTEvery process uses minidom(xml files are < 500kb, simple structure) and urllib.... | Celery - minimize memory consumption |
I faced a similar issue some time back. It is most likely caused by the health checks you have configured on the ELB. Try changing the health check to port 22 and see if it goes away. In my case, opening up the health check port in the EC2 security groups fixed it. Hope this works for you. | I am trying to use a load balancer with AWS ECS on AWS. For some reason, the graph always looks likeThis happens even when there is no request coming to the load balancer at all. I cannot find this in logs either. What do this mean and what cause it? | Constant Backend Connection Errors in AWS Load Balancer |
Every time you have to deal with some "distribution" issue, you could be better off considering aDistributedVersion Control System (DVCS).With Git, for instance, you could organize your packages assubmoduleswithin a main emacs configuration project, itself referenced as a submodule within your own project.That way, you... | I currently use subversion to track my configuration changes of Emacs and to sync my '.emacs.d' directory to different platforms.A lot of packages like Ido, Muse or Org-mode are part of Emacs distributions which come with Debian or Carbon Emacs (osx). But other packages which I'm also using are not part of those distri... | Which version control system or platform is the best one for tracking and distributing personal Emacs configurations? |
It shows you what you need to do.Go to the config file > remove the dashboard there > delete it. Usually this file is found in:/usr/local/etc/grafana/grafana.ini | I already added Grafana JSON file in my project and added Grafana Dashboard (UI) in my Grafana account.Today I decided to eliminate that, so I deleted the JSON file in my project, but when I wanted to delete it within Grafana UI, I had this error:This dashboard is managed by Grafanas provisioning and cannot be deleted.... | delete Grafana Dashboard |
I remember reading about it a while ago in the documentation. I had a look and I found:
For interactive processes (like a shell), you must use -i -t together
in order to allocate a tty for the container process. -i -t is often
written -it as you’ll see in later examples. Specifying -t is
forbidden when the clie... |
This post fleshes most of this out: Confused about Docker -t option to Allocate a pseudo-TTY
But if "-i" gives me a stdin stream and -t gives me a whole terminal driver isn't -i redundant if I use them together? Or is it that with just -t I can only access it via ssh but if I add -i I can also pipe it input directly ... | wouldn't specifying -t with -i be redundant for docker run? |
This is not currently possible with SonarQube 5.4. We may later add this feature but this is not our top priority. | Is it possible to run SonarQube in "Incremental" analysis mode and get not only code quality issues on the current branch but also other metrics, especially Code Coverage? (We are really interested to see how code coverage changed in the feature branch, comparing with the "develop" branch)
How this can be configured?so... | SonarQube incremental analysis for the Code Coverage |
Just focus on the device maximum Work Item/Group limits.
Compute units is just for device fision functionalities.The limits in work group size are given by:Device maximum Work Group Size = 512This is the maximum amount of work items in a work group. And it matches with the limit in the HW.Then, you have to add an extra... | I have the following system parameters:CL_DEVICE_TYPE_GPU
Device maximum compute units = 20
Device maximum Work Item Dimensions = 3
Device maximum Work Item Sizes = 512 x 512 x 512
Device maximum Work Group Size = 512As I understand, if Item Dimensions = 1 -- there is an one-dimensional array of work-items in a work gr... | Maximum number of work items, work groups within NDRange |
Try something like this -apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: canary
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/canary: "true"
nginx.ingress.kubernetes.io/canary-weight: "50"
spec:
tls:
- hosts:
- example.com
rules:
- host: example.com... | I have 2 services in my cluster exposed as NodePort, and I have one Nginx Ingress Controller that routes the request to each of them depending on the request URL.Here is my ingress definition file:apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: my-ingress
annotations:
kubernetes.io/ingress.c... | K8 - round-robin load balancing between two services using nginx ingress controller |
You can now setup SSH keys under pipeline settings so that you do not need to use environment variables and copy to certain locations in the container. The private key is not shown at all.UnderSettings -> Pipelines -> SSH keysYou would need to get the public key to the production containers known_hosts file.ShareFollo... | Here is the workflow I want to achieve:commit codebitbucket pipeline run test on my public docker imagebitbucket pipeline executes ansible script to deploy on my public docker imageThe first 2 steps working fine, but here is the problem:
How/Where should I store my private keys to allow ansible to ssh to my remote serv... | Bitbucket Pipeline how to setup ssh agent to deploy on a remote server |
This is a SonarQube bug, it doesn't handle SpringBootApplication properly. You should report it here :https://community.sonarsource.com/c/bug | 'ABCService' is not reachable by @ComponentsScan or @SpringBootApplication. Either move it to a package configured in @ComponentsScan or update your @ComponentsScan configuration.This the error message I get in 9 critical bugs in Sonarqube analysis, one for each Service and Controller.Though @Autowire and dependency in... | Spring boot configuration issues with sonar |
This is a common project growth challenge. The most common solution is multiple repositories with shared or independent release names that tie them together; see for example theSpring Frameworkproject's relationship to theSpring Bootproject.Note: my preference is make these independent repositories, but accessible to a... | We have what I believe is a typical architecture these days, comprising an iOS client, Android client, and a J2EE backend. These look like this in the file system:myProjectCodeclient_iOSclient_androidserver_J2EEdbCreativeOtherWhile I was working on my own and coding the entire stack, I had everything in the same git re... | How to structure Git repo for multi-tier architecture |
The Docker Hubbusyboximage is an extremely minimal image containing onlyBusyBox, a single-static-binary application that contains a minimum set of standard Unix tools. It contains an implementation of the Bourne shell/bin/shthat conforms tothe POSIX specification, but it does not contain GNU bash.In practice, you shou... | I have aConfigMapholding ashell scriptfor me:apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Chart.Name }}-script
labels:
app: {{ .Chart.Name }}
data:
backup.sh: |
#!/bin/bash
rolling_backup() {
echo "Found at least 3 backups. Starting rolling backup."
...
rolling_backup
fiThen... | Script mounted from ConfigMap not found inside Kubernetes container |
2
I know it hard to locate the problem but you can start with locate the query that cause a deadlocks using:
SHOW FULL PROCESSLIST
MYSQL Reference
Hope this will help you to start
Share
Improve this answer
Follow
... |
I'm getting an increasing number of "Deadlock" and "Lock timeout" issues on my MySQL database (an Amazon RDS instance). The database was working very well until a couple of days ago. No changes to the server code (that executes the queries) were made for more than a week. I know what the exceptions are, but I'm at a ... | Debugging MySQL Deadlocks on Amazon RDS |
Hope this helps:
Utilization Report: Measures the amount of the savings plan you are using. If it's less than 100% it means that you reserved more than you need.
Coverage Report: Measures the percentage of your costs covered by the savings plan. If it's less than 100%, you can increase your savings plan to optimize co... |
AWS SAVINGS PLAN:
I cannot differentiate between the Coverage Report and a Utilization Report.
However, I can see a difference in the report of both of these in my Billing account.
Utilization Report:
100% used in Savings Plan
Coverage Report:
68% used in Savings Plan
Queries:
What is the difference Between AWS SA... | Difference Between AWS SAVING PLAN Coverage Report vs Utilization Report |
In short its a caching profile that you can set in the web.config instead of having to apply the settings to every Action or Controller you want to use the cache settings with:
In web.config you specify options for the cache profile:
<system.web>
<compilation debug="true" targetFramework="4.5.1" />
<httpRunt... |
I encountered with it while I was reading this article from MSDN documentation. I am pretty newbie about caching, in fact, one of the first articles that I read about caching. Can you explain me simply?
| What is cache profile? |
First, the link you provided is the SDK for Ruby v1, which is very outdated. I would recommend thev3 docsinstead. As you will see, these docs suggest you do not need to construct a PresignedPost yourself and should try out theBucket#presigned_postandObject#presigned_postfirst.When you create the request for a pre-signe... | referring to this:http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/S3/PresignedPost.htmlWhen having users upload directly to S3 from browser. You can specify the URL that user must post the resource to.You can also use ${filename} to have the path based on the file name of the object in question.However, we just want t... | How to specify filename with extension using AWS S3 presigned post? |
16
Here's a variation on the ethtool trick mentioned above, without actually using ethtool:
function veth_interface_for_container() {
# Get the process ID for the container named ${1}:
local pid=$(docker inspect -f '{{.State.Pid}}' "${1}")
# Make the container's netw... |
i have 2 containers by docker, and bridge like this:
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ef99087167cb images.docker.sae.sina.com.cn/ubuntu:latest /bin/bash -c /home/c 2 d... | docker: how to get veth bridge interface pair easily? |
Turned out that in order for typescript to find the Blob, File etc. names I had to add the dom entry to the lib in my tsconfig.json. Here my final tsconfig, which allow me to build the project correctly
{
"compilerOptions": {
"target":"ES2020",
"module": "commonjs",
"lib": ["es2020", "dom"],
"outDir"... |
I'm trying to build my project that uses the AWS Javascript SDK v3. Here my tsconfig.json
{
"compilerOptions": {
"target":"ES2020",
"module": "commonjs",
"lib": ["es2020"],
"outDir": "dist",
"resolveJsonModule": true,
},
"exclude": [
"coverage",
"node_modules",
"dist",
"tests"... | AWS Javascript SDK v3 - Typescript doesn't compile due to error TS2304: Cannot find name 'ReadableStream' |
From Running aws-cli Commands Inside An AWS Lambda Function:
import subprocess
command = ["./aws", "s3", "sync", "--acl", "public-read", "--delete",
source_dir + "/", "s3://" + to_bucket + "/"]
print(subprocess.check_output(command, stderr=subprocess.STDOUT))
The AWS CLI isn't installed by default on Lambd... |
I would like to call the aws s3 sync command from within an AWS Lambda function with a runtime version of Python 3.6. How can I do this?
Why don't you just use the included boto3 SDK?
boto3 does not have an equivalent to the sync command
boto3 does not automatically find MIME types ("If you do not provide anything ... | How can I run the aws-cli in an AWS Lambda Python 3.6 environment? |
According to anold poston the Squid proxy mailing list:The length parameter to If-Modified-Since is a Netscape extension of
HTTP/1.0, meant to improve the accuracy of If-Modified-Since in case
a document is updated twice in the same second.HTTP/1.1 solved the
same problem in a better way via the ETag header an... | Please clarify this weirdIf-Modified-Sinceheader passed by IE9In my ASP.NET 4.0 web app, I've got a generic handler (.ashx) that serves images stored in the DB. In the interest of efficiency, I'm handling some caching-related headers and passing cache information.I'm getting DateTime parse errors moderately frequently... | If-Modified-Since HTTP header passed by IE9 includes length? |
I had the same problem. This fixed it for me.!pip install taming-transformers-rom1504Credit to:https://www.reddit.com/r/StableDiffusion/comments/x8h3xd/how_to_fix_cannot_import_name_vectorquantizer2/ | I have a problem with the import of a libraries from a github.First, I install the github with this:!pip install git+https://github.com/CompVis/taming-transformersThen I want to import the cond_transformer module from \taming\models\cond_transformer.py with this:from taming.models import cond_transformer, vqganBut he d... | I have a problem with the import of modules from github to python |
Configure Ping https website in NewRelic Synthetics :Create ping synthticClick on advanced option and check validate ssl if ssl handshake needed.Select monitoring locationsSet the scheduleProvide email or existing alert policy to get notified | I am planning on using new relic to get alerts when my service is down. And when i read about it I got to know we can go it using new relic synthetics by adding a new monitor with the type of ping. Inorder to access my web services a SSL certificate needs to be configured.Does any one know how I can configure it? I cou... | New Relic Synthetics configuring SSL |
I don't think you can skip FROM command. Build should start from somewhere, even if it is scratch.
While for trying to create a dynamic dockerfile, you can create the dockerfile using a shell script. I came across one such script at parity-deploy.sh, which dynamically creates a docker-compose.yml file on the basis of ... |
Attempting to make a dynamic docker file, where the final image may need one of two previous images based on user input.
| Is it possible to skip a FROM command in a multistage dockerfile? |
Use SQL Server's Generate Scripts commendright click on the database; Tasks -> Generate Scriptsselect your tables, click Nextclick the Advanced buttonfind Types of data to script - chooseSchema and Data.you can then choose to save to file, or put in new query window.results inCREATEandINSERTstatements for all table dat... | In "Back UP" I only get a bak file, but I would like to create .sql file | How to backup Sql Server to sql file? |
I believe the wildcard cannot be in the end of the domain - you can't getmypage.*- so you will need to buy a separate certificate for each domain, and have the server select the correct certificate depending on the domain accessed by the request. A SAN certificate, which specifies the domain as a Subject Alternative N... | I have a site available under three national domains, let's say:www.mypage.nowww.mypage.sewww.mypage.dkThey use the same IP address.
I would like to secure it witha an SSL cerificate. I wonder wherher SAN certificate is the best choice for me? Let's assume I would use other subdomains in the future.Here's an example of... | Is SSL SAN certificate the right choice? |
15
-XX:OnOutOfMemoryError="cmd args;cmd args"
From: http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html#DebuggingOptions
Share
Improve this answer
Follow
edited May 7, 2019 at 18:04
... |
I have a program that sometimes throw OOME,
I understand that there is a flag in the JVM options that I can set and whenever a certain Error/Exception appears (such as OOME) it calls a script I wrote.
The script will give the user a notification and will call a the program with a different argument so it won't get OO... | How to catch OutOfMemoryError in JVM and run a script if it's caught? |
This rule should be place on your root folder:Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{DOCUMENT_ROOT}/images/$1 -d [OR]
RewriteCond %{DOCUMENT_ROOT}/images/$1 -f
RewriteRule ^img/(.*) /images/$1 [R=302,NC,L]This rule will redirect only existent files or folders existent onhttp... | I've currently updated our site, and the image folder name has changed from/img/to/images/.I'm still getting 404 errors in my apache error log from bots etc trying to access the old/imgfolder.I'm trying to write a mod_rewrite rule to redirect any attempts to access/img/to refer to/images/.This is what I've got so far:R... | mod_rewrite remapping folder |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.