Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
What you need to do is create a CloudFront Origin, then update the DNS for your website to point a CNAME record to your CloudFront origin instead of your Heroku application.So, right now, let's say your Heroku app is called: my-app.This means that if you view your app on Heroku, you will go tohttp://my-app.herokuapp.co... | I am having a github repository auto deployed to Heroku. Basically what I want to do is to serve all the static files in the repository using Amazon Cloudfront CDN.. Do I need to pull my github repository to Amazon S3 and how to achieve the CDN served files while my repository being auto-deployed to Heroku..Right now a... | How to make JS files stored in Github repository deployed to Heroku served via Amazon CDN |
I think that$_SESSIONshould be left when running from a web server, not command line.I would store last activity time in a file. If cron finishes its work normally, you delete the file.When cron script runs, check the file. If file doesn't exist, or, last activity is older than a certain time span, you continue to exec... | I have a cron script that would spider a website for new content and save the entries I need into the database. Entries are md5 hashed and validated, to prevent dupes. However I have noticed that there are sometimes two occurrences running at the same time, and the hashing method is failing at this point as I get two o... | Prevent PHP scripts from running concurrently |
You can not prevent creation of these, but you can overwrite them with your own values by setting them explicitly in your deployments pod template. So, if you ie. expect the default value of FLOWER_PORT to be say80instead oftcp://..., all you need to do is putenv:
- name: FLOWER_PORT
value: "80"and that's it. | When launching my Kubernetes deployment for Flower (Celery monitoring service), the following environment variables are generated in the Flower pod by Kubernetes:FLOWER_PORT=tcp://10.67.97.89:5555
FLOWER_PORT_5555_TCP=tcp://10.67.97.89:5555
FLOWER_PORT_5555_TCP_ADDR=10.67.97.89
FLOWER_PORT_5555_TCP_PORT=5555
FLOWER_POR... | How can I unset an environment variable in Kubernetes? |
It worked for me after adding :sonar.java.binaries=[YOUR_BUILD_DIR] (target/classes)Refer this Github link for more information :https://github.com/SonarQubeCommunity/sonar-findbugs/issues/49 | I am really struggling from months. We are trying to scan SCALA code with SonarQube in Azure Devops which is in Databricks. We were getting around 30 error. But now we work around our self and still getting 7-6 errors. Also our source code is fully complied in databricks itself.still getting few errors : Please help u... | sonarQube Findbug error and ##[error]java.lang.IllegalStateException: Can not execute Findbugs |
There are two obvious problems in this script: in yourifline you're not invokingtest(1) but instead are directly trying to run each file; and thetest(1)==operator only does exact string comparisons and not glob or regex matches.You could use the shellcasestatement to match a variable against a glob:case "$f" in
*/val... | Running an image based alpine with busybox and ash:/mnt/builddir/code/src/main/helm # busybox | head -1
BusyBox v1.31.1 () multi-call binary.I wrote an sh script that prints file's names only if they start with prefix "values", but something with the "if" condition does not work well. This is my script:for f in ./*
do
... | shell script (busybox) doesn't work as expected on docker container |
As mentioned by Jake, setSecureContext() do the magic.
Seems it can update certificate without breaking current connections.
Something like:setTimeout(function () {server.setSecureContext({
ca: fs.readFileSync('chain.pem'),
cert: fs.readFileSync('cert.pem', 'utf8'),//fullchain
key: fs.readFileSync('privkey.pem', ... | I'd like to update ssl certificates on node.js http2 server without restarting (to avoid any downtime). Also I don't want to use any 3rd party modules for this work. Only pure nodejs.
Is it possible?Right now when certificate about to expire, i just restarting the script.const https = require('http2');
const server = h... | Is it posible to update ssl cert without server restarting? |
$username = 'login';
$password = 'pass';
//...
curl_setopt($handle, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($handle, CURLOPT_USERPWD, $username . ":" . $password);
curl_exec($handle); | I want to protect my domain with a password because I just use it to test scripts, but I need to allow curl HTTP POST request. Is this possible?current .htaccess:#AuthUserFile /home/domain/.htpasswds/.htpasswd
#AuthType Basic
#AuthName "Protected Domain"
#Require valid-userPHP curl request$handle = curl_init('http://ww... | .htaccess password auth but allow post request |
Addindex index.php;In the server block, if it doesn't work then you need to remove the$uri/because you don't want to do aautoindex onEDIT: Just noticed that you already figured out your problem, so I'll add the reasoning behind it, the reason why you neededautoindex on;is because without it nginx will follow thetry_fil... | I'm setting up my blog on a new EC2 instance because one of the sites on the server that's currently hosting it is being DDoSed.
I'm having some trouble with nginx, because I can either see all the pages fine but 403 on the index, or see the index but 404 on the pages (depending on the config I'm using)Here's my nginx... | 403 forbidden on wordpress index with nginx, the rest of the pages work fine |
I was able to reproduce problematic behavior on a supported config (CUDA 6.5, CentOS 6.2, K40).
When I switched from CUDA 6.5 to CUDA 7 RC, the problem went away.
The problem also did not appear to be reproducible on an older config (CUDA 5.5, CentOS 6.2, M2070)
I suggest switching to CUDA 7 RC to address this issue. ... |
I'm trying to run this code on nvidia GPU and it returns strange values. It consist of two modules main.cu and exmodul.cu (listed bellow). For building I'm using:
nvcc -dc -arch sm_35 main.cu
nvcc -dc -arch sm_35 exmodul.cu
nvcc -arch sm_35 -lcudart -o main main.o exmodul.o
If I run that I obtained strange last l... | Cuda returns wrong value from __device__ function when cos is used |
Considering the situation as described, I suspect that your IIS hosted client is not able to load the Verisign root certificate. And it is always a bit unclear to me under which account such IIS based client is trying to access the certificate store. It might be your domain service account user, it might be the ASP.NET... | We have a wcf client, which calls an external webservice. The service is accessed over SSL. The certificate is not a self signed cert. It is issued by Verisign.The client is hosted in IIS 6 and the application pool's identity is a domain service user.Every time we want our client to access the remote service we get the... | WCF client only works after accessing URL with IE |
Depending on your OS, this might work for getting the free and available memory size:java.lang.management.OperatingSystemMXBean mxbean = java.lang.management.ManagementFactory.getOperatingSystemMXBean();
com.sun.management.OperatingSystemMXBean sunmxbean = (com.sun.management.OperatingSystemMXBean) mxbean;
long freeMem... | My Java application runs another Java application, by running the process "java -jar j.jar". J.jar is known to use a LOT of memory depending on the dataset it is given, and often gets an OutOfMemoryError heap. So I want to use -Xmx on it, so that I can allocate as much memory as possible (or close to). I was thinking o... | Java -Xmx, Max memory on system |
The answers to questions 1 and 2 are the same: eacheval "$(ssh-agent -s)"is starting a new ssh agent each time. Theevalexecutes the text outputted at that point as shell commands, causing it to define new environment variables that tellssh-addandsshhow to use the new ssh agent (which also removes the information about... | Big picture: Trying to connect GitHub to Jenkins.
Jenkins is running on Ubuntu under user Jenkins.(I log in as Pierre, then change to user Jenkins)I'm followingThis Guideto connect the two.
I'm trying to generate keys from Jenkins commandline.
I usedssh-keygen -t rsa -C '[email protected]'to generate the key and used... | Why does user-agent keep changing PID and losing my keys? |
After a bit of research I found out that the WordPress container sets it's ports once since it needs to save the URLs(localhost:7006) in the db because I am persisting the db data.I ran thedocker-compose uponce with the default port80:80configuration which caused thelocalhost:80orlocalhostto be saved in the db. So when... | I want to map some random port on my computer e.g.localhost:7006to my WordPress docker container'sport 80.When I change the port of WordPress from80:80to7006:80it's not only stops working onlocalhost(port 80)but also don't respond onlocalhost:7006.docker-compose.ymlfile looks like this:version: '3'
services:
... | Docker: I can't map ports other than 80 to my WordPress container |
I have previously faced same issue and I solved by adding this line at the top of my.htaccessthat is at the root directorySetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0 | This is my.htaccessfile:RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.phpEven though I have added below line to my.htaccessfile I cannot access$_SERVER['HTTP_AUTHORIZATION'].RewriteRule .* - [... | $_SERVER['HTTP_AUTHORIZATION'] is missing |
You just need to escape the double quotes that are inside the JSON as the query$ curl -i -H 'Content-Type: application/json' -H "Authorization: bearer myGithubAccessToken" -X POST -d '{"query": "query {repository(owner: \"wso2\", name: \"product-is\") {description}}"}' https://api.github.com/graphqlShareFolloweditedFeb... | After referring thisguideI needed to access the githubgraphqlby usingcurlfor a testing purpose. I tried this simple commandcurl -i -H "Authorization: bearer myGithubAccessToken" -X POST -d '{"query": "query {repository(owner: "wso2", name: "product-is") {description}}"}' https://api.github.com/graphqlbut it gives mepro... | How to use curl to access the github graphql API |
You need to make sure that the "root" defined in the server section matches what you want. Or define "root" under your regex locationlocation ~* \.(jpg|jpeg|png|gif|swf|svg|ico|mp4|eot|ttf|otf|woff|woff2|css|js)$. Without a root defined there nginx may be reverting to global definition under the server section. | I have the following configuration to run an angular.js app, which works fine.location / {
root /usr/share/nginx/html;
index index.html;
expires -1;
add_header Pragma "no-cache";
add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
try_files $uri $uri/ /i... | Nginx configuration to cache angular app files |
You can separate the try_files and rewrite by replacing the location / block with the following two location blocks:
location / {
try_files $uri $uri/ @rewriterules;
}
location @rewriterules {
rewrite ^/(.+)$ /$1.php last;
}
That way try_files goes first, and if no file is found there is a rewrite and .php ... |
If I will add the following line to my nginx configuration it will break my website and will run without CSS:
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|svg|xml)$ {
access_log off;
expires 30d;
}
location / {
try_files $uri $uri/ $uri.php =404;
rewrite ^/(.+)$ /$1.php last;
}
location... | nginx CSS break after adding rewrite from $ to $.php |
What @FvD said. But additionally, bear in mind that there's shinyapps.io if you want someone else to host your application in a scalable way, or Shiny Server Pro if you want to back a Shiny application with multiple R processes.
Shiny Server itself can certainly handle plenty of requests (we've seen a single Shiny Se... |
I have built a quiz system using Shiny Server on Amazon Web Services. The system runs reliably when I tested it on one or two devices at home. However when I used it in the classroom with more than 10 students the system broke down. The questions and widgets loaded correctly, but when the students tried to submit thei... | Shiny app unstable at many simultaneous requests |
In the case ofVkDescriptorSetLayoutBinding::descriptorCount. The spec says:descriptorCount is the number of descriptors contained in the binding,
accessed in a shader as an array, except if descriptorType is
VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK in which case descriptorCount
is the size in bytes of the inline uniform... | what's the difference between .descriptorCount in VkDescriptorPoolSize and in VkDescriptorSetLayoutBinding(VkDescriptorSetLayoutCreateInfo)?
how to set them when there are many shaders, how to set them correctly?eg.layout(binding = 0) uniform Buffers {
uint x[];
} buffers[5];then:VkDescriptorSetLayoutBinding.descri... | what's the difference between .descriptorCount in VkDescriptorPoolSize and in VkDescriptorSetLayoutBinding(VkDescriptorSetLayoutCreateInfo)? how set? |
a) because it is not your exe but the WCF daemon process taking inbound calls, by specifying any process, you are saying "any process" that would listen on port XXX will be added to exception list. Thus, the deamon process is added to exception list.b)you can either add wcf daemon process to exception list , or add you... | I have a self hosted WCF service running in my .net App.The service works fine when the firewall is configured correctly. However, the default rules added when the app first runs are not configured correctly and require changes by the user. When the app first runs on a machine it presents a "Windows Security Alert" d... | Win7 self hosted WCF .net app makes incorrect firewall rule |
You will want to read up a little bit on the 'crontab' command but basically you will do this.From a linux command prompt run the crontab command.Then add this entry:* * * * * php yourscript/pathYou can set what time by modifying the * values. See this URL for information on that:http://adminschoice.com/crontab-quick-... | I have a Linux server and in this I want to execute a cron job for sending birthday mail to all my friend with a PHP program. I want to create a php program that read data from database and send the mail.I want to know the command of cron job to execute the program on every day automatically. I have no knowledge of Lin... | Cron job to execute a PHP program |
Thetoolssection is expecting you to provide theNameto a specific item in yourGlobal Tool Configuration(https://JENKINS_HOME/configureTools, orManage Jenkins->Configure Global Tools).On that page, when you click on theJDK installations...button, it will give you a list of all of the JDKs that are configured. Your pipeli... | I have local copy of Git java code.I want a pipeline job script in Jenkins that can compile and build the code locally and show success or failure .I need a script which use only Java JDK not the maven (as the source code is developed using eclipse java project).The os i am using is windows.pipeline {
agent any
... | How to compile and build Java eclipse code through Jenkins pipeline? |
1
You can set the default shell for simha at user creation by providing useradd the -s /usr/bin/zsh argument.
Example:
FROM amazon/aws-cli:latest
RUN yum -y update && yum install shadow-utils.x86_64 zsh util-linux-user -y
# explanation of above packages
# shadow-utils.x86... |
I have the following Dockerfile. The aim is to install zsh and add a non root user and change its shell
FROM amazon/aws-cli:latest
RUN yum -y update && yum install shadow-utils.x86_64 zsh util-linux-user -y
# explanation of above packages
# shadow-utils.x86_64 required to get addgroup / adduser
# util-linux-user re... | Dockerfile: How to run chsh for non root user |
You need to specify the namespace on theport-forwardcommand too.kubectl port-forward -n delivery screenshot-history-7f76489574-wntkf 8000:8000ShareFollowansweredDec 18, 2019 at 5:38coderangercoderanger53.1k44 gold badges5454 silver badges7777 bronze badgesAdd a comment| | when I runkubectl get podsit shows pod existing and ready, but when runkubectl port-forwardI getpod not fouderror. what's going on here?(base):~ zwang$ k get pods -n delivery
NAME READY STATUS RESTARTS AGE
screenshot-history-7f76489574-wntkf 1/1 Running 86 7h18m
(... | pod shows existing but get pod not found error when running port-forward |
You can't. What you can do is add a "router" in front of your images (a third image) which does routing (proxy passing) based on the host name.Apache or Nginx are often used for these kinds of things.e.g. with apache serverhttps://httpd.apache.org/docs/2.4/howto/reverse_proxy.html<VirtualHost *:80>
ServerName app-1... | Summary: 2 separate applications, both using docker-compose, how can I havehttp://app-1.testandhttp://app-2.testavailable at the same time?Description:
I feel like I've missed something super-simple. I have 2 php-fpm (via nginx) applications, both run by similar docker-compose setups, somewhat like:# docker-compose.yam... | Use different hostname / url than localhost for docker-compose web application |
MySQL can handle this many rows, and there are several techniques to scale when you are starting to hit the wall.Partioningandreplicationare the main solutions for this scenario.You can also check additional scaling techniques for MySQL ina question I previously askedhere on stackoverflow. | I'm working on a problem that requires caching paginated "search" results:Paginating very large datasetsThe search works as follows: given an item_id, I find the matching item_ids and their rank.I'm willing to concede not showing my users any results past, say, 500. After 500, I'm going to assume they're not going to ... | Big MySQL Tables |
This will run the command sunday every minute:protected function schedule(Schedule $schedule)
{
$schedule->command('test:cron')->cron('* * * * SUN');
}Check itherePS: I don't think you can use cron to go lower than "every minute". | So i would like to accomplish the a command which runs every sunday but also every 7 seconds on that sunday.The following is from the docs but I don't have an idea on how to achieve this. Anyone able to direct me in the right direction?protected function schedule(Schedule $schedule)
{
$schedule->command('test:cron'... | laravel run command / cron every 7 seconds on sunday |
You have two options in my view.
Option 1: Bob is CLI tools which does not require a endpoint, so you can deploy this as kubernetes batch job. It is super easy and you can use corn expression to schedule it.
Here is a linkhttps://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/Alice is a service so you can ... | I have two services one is http(s) based while the other is cli which exists in a separate deployment (not on the same host as the first one). Lets name these services as Alice and Bob.Alice is a http server while bob is cli tool that is used to put some data into Alice on demand.What have I done so far ?Bob exists as... | What is the best way to host my cli application in k8s? |
First, you don't have to use git checkout anymore. Since Git 2.23 (Aug. 2019), there is git switch
Second, you only have to use --track to set the upstream branch for a local branch, if the name of the upstream branch differs from the local one.
That assumes your local repo, in which you are creating a local branch:
... |
I have two branches in GitHub, master & testbranch. When ever I am creating a new branch, I type following git command to create a new branch git checkout -b testbranchnew. So in what scenario should I use git checkout --track origin/testbranchnew ? Could someone please advise ?
`
Branches
master
testbranch
| When do we need to use --track command in git |
Simply adding git-lfs configuration to an existing repository will not retroactively convert your large files to LFS support. Those large files will remain in your history and GitHub will refuse your pushes.You need to rewrite your history to introduce git-lfs to your existing commits. I recommend the BFG repo cleane... | I have some csv files that are larger than github's file size limit of 100.00 MB. I have been trying to use the Git Large File Storage extension.https://git-lfs.github.com/From LFS -"Large file versioning- Version large files—even those as large as a couple GB in size—with Git."I have applied the following on the folde... | Push Error: remote: error: File target/file.war is 146.41 MB; this exceeds GitHub's file size limit of 100.00 MB [duplicate] |
If you need to show custom xpath based rule violations in intellij, you can use the SonarQube IntelliJ Community Plugin. It can show results from any rule set including xpath based rules.see also:https://github.com/sonar-intellij-plugin/sonar-intellij-plugin | Can QAPlug for IntelliJ import custom XPath expressions?Also, what is the setting underFile>Settings>QAPlug>Checkstyle>User checkstyle rulesgood for? Has it anything to do with that?I have had a look at an internal wiki page where an intern explains how to set up sonar rules in IntelliJ using QAPlug, and he left a not... | Can QAPlug for IntelliJ import custom XPath expressions? |
Nginx has two methods of changing configuration:HUPsignal to the master process results in "reload". Nginx starts a bunch of new workers and lets the old workers to shutdown gracefully, i.e. they finish existing requests. There isnointerruption of service. This method of configuration change is very lightweight and qui... | Suppose we have several identical nodes which are the application servers of some n-tier service. And suppose we use Apache ZooKeeper to keep all the config's of our distributed application. Plus we have an nginx as a load balancer and reverse proxy in front of this application.So let's say we perform a command which c... | Is there any way to configure nginx (or other quick reverse proxy) dynamically? |
I don't think you can do it directly in the cron time specification. I would do it by running a command every Sunday (52 days before a Wednesday is a Sunday) and then check if the date 52 days into the future is between 8 and 13, inclusive:0 0 * * 7 DATE=$(date --date='now+52 days' +\%-d); [ $DATE -ge 8 -a $DATE -le 1... | I'm not very well versed in Cron expressions and struggling to find out whether something is feasible. Is it possible to create an expression for every 2nd Wednesday of the month minus 52 days?The 2nd Wednesday of the month our known starting point and then want to subtract off it to run that on an ongoing basis. May... | Cron Expression - Subtraction or Date Offset |
Yes you can. Please take a look at the sections inhttps://azure.microsoft.com/documentation/articles/iot-hub-sas-tokens/that discuss using X.509 certificates with IoT Hub. | I am working with Azure IOT HUB. Can I authorize a device using SSL certificate to send data to IOT HUB. While sending events to IOT Hub using IOT REST APIs, I can only see Authorization header accepting SAS token. I have already provisioned my device with thumbprint of SSL certificate on IOT Hub but not sure how to se... | How to authorize IOT Hub events using SSL certificate? |
Git LFS will, by default, only download the data that you need in order to check out a commit. When it does download data, it downloads it from the location you see in Endpoint to a subdirectory of the LfsStorageDir. New objects you create are also stored in that same subdirectory of LfsStorageDir until you push them.... |
I think I get the mechanics of lfs and its method of tracking the binary files via pointers and only cloning data as needed but I cannot get a solid confirmation where lfs is storing the bulk data. In my case I suspect lfs is keeping the data local because my github repository is tiny (175KB!) relative to the project ... | Difference between git-lfs env Endpoint and LfsStorageDir? |
4
I'm not familiar with AAD, but if you already have a client authorised within your environment then the Nginx auth request module is a very simple way of delegating authentication for upstream services to your existing authorisation server.
Example directives in Nginx:
... |
I need to have comfortable way to allow auth for specific users from AAD to upstream application with Nginx.
I found some information:
AAD does not support LDAP -> its overkill anyway. So ldap is last solution for me
Oauth2_proxy by bitly works OK, only for specific list of user which
has to be edited in file (in pla... | How to authenticate with Nginx and Microsoft Azure AD? |
By default, root only has access from the localhost, 127.0.0.1 & ::1, you need to specifically allow access from 192.168.99.1 or from anywhere using '%' in the user setup : see herehttp://dev.mysql.com/doc/refman/5.5/en/default-privileges.html | I'm usinghttps://github.com/sameersbn/docker-mysqlto run a mysql container usingdocker-machinein OSX with virtualbox.I created a new machinedocker-machine create --driver virtualbox mytestThe IP isdocker-machine ip mytest
192.168.99.103I run the container like this:docker run -p 3306:3306 --name mysql -d \
-v /opt/my... | How to connect to mysql running in container from host machine |
Add "repo1" as a remote and merge it into "repo2"
You can just added the repo1 as a new remote and them merge it into your local repository:
Clone the fork https://github.com/Stophface/react-native-maps
git clone https://github.com/Stophface/react-native-maps && cd react-native-maps
Add a new remote to your local re... |
I cloned and forked a repository from here source: https://github.com/react-community/react-native-maps resulting in two different repositories.
Clone Repo: https://github.com/Stophface/react-native-maps-0.20.1 (repo 1)
Fork Repo: https://github.com/Stophface/react-native-maps (repo 2)
Now I want to merge the Clone Re... | Merge two different repositories into one and preserving the history |
3
For anyone else having the same problem. This is what I did according to this article at http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html
Once I did this, the permission issue is sorted and I don't get the 500 errors anymore.
Procedure To Se... |
I installed git on my VPS and I am able to clone a github repo to my web directory (I did it as the user, not as root but I tried with root before and same problem). But When I go to the url it gives me 500 internal server error but only in php files. If I upload the files manually it works fine. I have read it could ... | Git pull from github only php files giving 500 internal server error |
7
My problem was that I was starting the server on 127.0.0.1 and the port mapping was not pointing to this interface. Starting it on all interfaces (0.0.0.0) worked for me:
addr := fmt.Sprintf("0.0.0.0:%v", settings.Port)
server := &http.Server{
Addr: addr,
... |
I just finished working on a Go REST API and I would like to move my code into a container. I already accomplished this, but I am unable to hit my endpoints through postman since the error: Error: socket hang up is thrown.
According to this SO thread, this could be caused by my firewall, after running ufw status I not... | Containerized API socket hangs up |
It's fine to do this - I have done it myself, but not on OSX.
The Dropbox client will index the files that it finds on your computer and compare them to the ones which are already in your account (on the server). I believe that it uses some kind of hash function to do this - the client creates a small hash value for ... |
I am about to install Maverick and before I do that I am going to reformat my macbook air. I use dropbox and have about 15gb of (small) files on it (mainly documents/ebooks).
My question is: Is it possible to backup my Dropbox folder now, reformat my SSD and and install dropbox again. After wish I replace the dropbox... | Replacing a empty dropbox's (fresh install) folder with a previously (uptodate) dropbox folder. Is it possible? |
Turns out doing the dump according to this made the import take about 2 minutes:http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.SmallExisting.html | I'm trying to import a 55 meg .sql file in to an AWS RDS instance. The dump file was generated with this command:mysqldump -u root -ppassword dbname > dbname.sqlI'm running the import with this command:mysql -u root -ppassword --host=x.rds.amazonaws.com dbname < dbname.sqlThe import was running for about 20 minutes, s... | How to speed up import of .sql dump file in to AWS RDS instance? |
According to the link you mentioned, there is a way to set image name likeshlink_shlink_php:latestfor example.What you need to do is to addentrypoint.shin your own image and based on envrionment variable you may enable or disable the debugging mode for example:export DEBUG="${DEBUG:-on}"
if [ "$DEBUG" == "off" ]; then
... | I configured PhpStorm according to this tutorial:PHPUnit for PhpStormI can run my PHPUnit test successfully, so this is working.The problem is, in my docker container I have enabled Xdebug which I need sometimes. Normally, Idocker execinto the container and run the tests there. Xdebug slows down the tests heavily, so I... | Disable Xdebug in docker container before running PHPUnit via PhpStorm |
You have to create and passIAM RolenotIAM UserFrom the docs:--role :Services (AWS) resources. The Amazon Resource Name (ARN) of the IAM role that Lambda assumes
when it executes your function to access any other Amazon Web | I'm trying in a number of different ways to push my .zip to AWS Lambda. All of the methods I've tried (grunt, gulp, and cli) are throwing an error despite having copied my ARN straight from the IAM console.I'm running the following in the CLIaws lambda create-function --function-name myFunctionName --runtime nodejs4.3 ... | Why does the AWS cli reject my IAM ARN for not matching the regex/pattern? |
Nothing in particular, the way we do it is the controller exposes info like the IP or hostname on the Status sub-struct of the subordinate object, and then copy that into the Status of the root object, and then we read from that and inject it into a config file.https://github.com/Ridecell/ridecell-operator/blob/39344f4... | I want to refer a property of an object created by a CRD.Here is my example. I create a Cloud SQL instance using the CRD fromhttps://github.com/GoogleCloudPlatform/k8s-config-connector.This generates an instance with an IP.
I want to reference the IP address in another resource.Is there something similar to the downst... | Kube object reference |
Your ssl certificate is propably self-signed, try using curl with the-k(--insecure) option which disables ssl verification. | When I try to make up a.htaccessfile to redirect my www to non-www, I get some issues.RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]This is the.htaccessfile I've used, after using:curl -I https://wwwI get:curl: (51) Unable to communicate securely with ... | Curl: (51) error when trying to check whether or not my website redirects correctly |
Not only change in/etc/grafana/grafana.iniyou have to change in/usr/share/grafana/conf/defaults.iniand/usr/share/grafana/conf/sample.inifiles. Just search3000port(which is default port for grafana) in these three files and replace it with your preferred port. | I currently have InfluxDB feeding dashboards in Grafana. I will eventually be deploying this stack on a server.However, the default port for Grafana is 80. I must change this port, but I don't know how. Can anyone help out?Thanks. | Changing Grafana port |
Amazingly enough in my case it was that the directory didn't exists!! :|
Is the error message a bug?... or it's me. Tempted for the latter. | I am trying to copy a file to remote server in a certain folder.Its an adrive backup plan. But it comes with scp. I can copy the file if I don't select directory. Even if I put a directory that doesn't exist it says its a directory.root@host1 [/usr/src]# scp ftpdelete.sh user@[email protected]:/mysql-only/
scp: /mysql-... | scp not working saying its a directory error |
Finally I found the solution.The default operator of query_string isORthats why it only display the search result of first prefix. To get the result of prefixes useANDoperatorsource :query_string | I have a working wild card search but it dont accept whitespace. I already triedmatch_phrasebut it only search for exact words. This is the search result that I wantProjects:"Project One Sample", Project Two Sample"input:"ect One"result:"Project One Sample"Here's my working codeGET <index_name>/_search
{
"query": {
... | Search wild card phrases in elasticsearch |
This problem is solved.When opening wp-admin/edit.php of hierarchical custom post type, wordpress get all records.So I set hierarchical=false in setting of custom post type.We didn't need hierarchical=true in setting of custom post type. | I had a error of"Allowed memory size"in list page of custom post type.It was solved by adding more memory of php./wp-admin/edit.php?post_type=productsFatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /wp-includes/taxonomy.php on line 1858It is strange because this problem doe... | Wordpress: List page of custom post type in wp-admin return "Allowed memory size Error" |
2
Nginx already supports $cookie_-style syntax for accessing individual cookies.
However, a better way to do what you're trying to do would be through a map or two.
Share
Improve this answer
Follow
edited Fe... |
I am trying to get cookie value by name in nginx.
My code is:
if ($request_uri ~* /id/(.*)\?x){
set $id $1;
set $my_cookiename id-$id;
}
if ($http_cookie ~* $my_cookiename"=([a-z0-9]+)(?:;|$)") {
set $my_cookievalue $1;
}
location /id {
default_type 'text/plain';
echo $my_cookievalue;
}
| How to get nginx cookie value by cookie name |
What you should do is maintain ablacklist, which will contain a set of keywords which you do not want in the submitted domain names. Then you use any of php's string search functions to check if these words exist in the name.These includestrpos,strstrOf course regex are the more powerful way to go, but I am thinking th... | I have a site that allows people to submit their domains to be added to a database. How can I block domains if certain domains contain a negative keyword (ex. porn, xxx, etc.)?I know there is something like "regular expressions" that can do this but how do I create a .htaccess file that allows this? Or is there a bette... | Block domains from being submitted and added to a database |
The byte[] gets cleaned up when two conditions are both satisfied:
There are no references to that memory block
The garbage collector decides to collect that memory block
The GC runs at non-deterministic times based on a variety of factors.
|
I'm noticing a lot of byte[] getting stuck in memory when profiling my program. I did some digging and found the majority of the instances created in some manner like this:
public byte[] CreateBytes(byte[] bytes)
{
using (var start = new MemoryStream())
{
using (var memStr = new MemoryStream(bytes))
... | Returning disposable object from within using block |
Try:
git show HEAD
This shows the content of the commit from your current head
|
I was working on some feature development using Git. In between I have got some urgent bug, so needed to switch on develop branch from feature/2.8.0. So to do that I run following commands (from shell history):
2002 git status
2003 git stash
2004 git checkout develop
2005 git status
2006 git pull
2007 ... | How to check what I'm going to commit? |
When you create a codebuild you can pass environment variables.
{
"name": "sample-docker-project",
"source": {
"type": "S3",
"location": "codebuild-region-ID-account-ID-input-bucket/DockerSample.zip"
},
"artifacts": {
"type": "NO_ARTIFACTS"
},
"environment": {
"type": "LINUX_CONTAINER",
... |
I have the following command in my buildspec.yml file in my gatsby site root directory.
version: 0.2
phases:
install:
commands:
- npm i npm@latest -g
- npm install --global gatsby-cli
- npm install
- pip install --upgrade pip
- pip install --upgrade awscli
build:
commands:
... | How to pass environment variable to the buildspec.yml for AWS codebuild |
There was no firewall cinfigured in the server. I set up a firewall by following the instructions from this site "https://oracle-base.com/articles/linux/linux-firewall"There are two GUI options but none of them worked for me so better stick to the CLI.then, using the following command i granted access to my local machi... | I am having trouble accessing the weblogic console from a different machine in the same network.I installed weblogic on a server from a different machine by ssh. The weblogic is up and running, but now I can't access the console on a browser from my machine. Both machines are part of the same network.I am able to SSH i... | Can not access weblogic console from a different machine |
This security issue is mainly irrelevant tonode-sasssince it never sees any exposure to your live code.node-sassruns on hosts normally used for development and usually are not visible in a public network.You normally will usenode-sassto pre-compile SCSS into CSS and vulnerabilities will not impact the resulting CSS cod... | I have projects to maintain that use node-sass npm module.Since node 10.x, there is a tool (callednpm audit) that is run every time we do anpm install. This seems to be a good tool for preventing vulnerability issues.My problem is that the node-sass module has vulnerabilities. I saw that the maintainers of the project ... | node-sass vulnerability and npm audit |
I am not using REST but as far as I read the information there is no easy way to get an acknowledge and avoid duplicate POST.As with other high level API frameworks you are tied to what the API offers and it looks like the designers did not think about connection aborts.The easiest way to workaround this seems to use a... | We haveIntermec CK71 mobile devices(WiFi). There will always be a scenario in which the device sends a request (GET, PUT, or POST), then loses connection. What methods can we use to prevent duplicate PUTs or POSTs? How does the client device know whether or not the server processed its request before losing the connect... | How to prevent duplicate http requests? |
From what I've read, Slow Down is a very infrequent error. However, after posting this question I received an email from AWS that said the had capped my LIST requests to 10 requests per second because I had too many going to a specific bucket.
I had been using a custom queuing script for the project I am working on, ... |
I'm using AWS to run some data processing. I have 400 spot instances in EC2 with 4 processes each, all of them writing to a single bucket in S3. I've started to get a (apparently uncommon) error saying:
503: Slow Down
Does anyone know what the actual request limit is for an S3 bucket? I cannot find any AWS documenta... | Amazon Web Services S3 Request Limit |
Here is a guide that may work. You're basically setting up a git repo on the server and pushing to it. The better way is in the article listed. The hacky way that I've done is to simply clone the repo on the machine and pull changes from a production branch. Terrible idea.
|
Before I state my question, I'd like to point out that I may be going about my goal entirely wrong, so please let me know if I am.
What I'm trying to do is to have my personal website pull in code from a github repo that I'm going to set up for an HTML5/JavaScript game. Whenever I commit to the repo, I'd like for the ... | Pull from git to website on commit |
This should work:RewriteEngine On
RewriteCond %{THE_REQUEST} ^.*(wp-content)|(phpMyAdmin)|(mp4:).* [NC]
RewriteRule ^(.*)$ - [F,L]Then a Forbidden message will be displayed for urls containing such string. e.g.:You don't have permission to access /foomp4:bar/ on this server.ShareFolloweditedOct 30, 2013 at 13:58answere... | I would like to block a couple of URLs if they match a regular expression in the htaccess file.These are the URLs I want to block in htaccess.Anything that contains the following in the URL pattern:mp4:wp-contentphpMyAdminAll case insensitive, please note that the "mp4:" must include the colon to match the expression.H... | Block URLs in .htaccess using regular expression |
The SonarQube Eclipse plugin lets you associate (and locally analyze) projects that have already been analyzed by other means (maven target, ant task, SonarQube runner). It is not meant as a way to launch persisted (shared) analyses.So if you want to use the SonarQube Eclipse integration, please do a first analysis of ... | I am trying to integrate sonarqube with eclipse to analyse simple java project.
But it is not happing. When we right click on simple java project and hit Configure-> Associate SonarQube, the window appear where field appear like Project and SonarQube project.
Project field is autopopulated with the java project you rig... | SonarQube Integration with Eclipse: Associate with SonarQube option not working for simple java project |
1
So as I figured there was (is) something wrong with readability and maybe permissions. I could narrow down the problem to the certificate file being existent but not readable. I moved it to my server with filezilla via ftp.
I could solve my problem by creating a new .pe... |
I want to connect to a remote (AWS) mysql server using ssl in PHP.
My script works when I execute it via command line, but doesn't when I call it from the browser.
$con=mysqli_init();
mysqli_ssl_set($con,NULL,NULL,"path/to/cacert.pem",NULL,NULL);
$link = mysqli_real_connect($con, "host", "username", "password");
I am... | PHP connection to remote mysql with ssl works via command but not in browser |
The docker containers are managed by Yarn on EMR:https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-spark-docker.htmlIn client mode, your Spark driver doesn't run in a docker container because that process is not managed by Yarn, it is directly executed on the node that runs thespark-submitcommand.
In cluster mode... | I am deploying a spark job in AWS EMR and packaging all my dependencies using docker. My pythonized spark submit command looks like this...
cmd = (
f"spark-submit --deploy-mode cluster "
f"spark-submit --deploy-mode {deploy_mode} "
f"--conf spark.executorEnv.YARN_CONTAINER_RUNTIM... | EMR Spark deploy mode when using Docker |
1
Nginx locations match in order of definition. location / is basically a wildcard location, so it will match everything, and nothing will reach the second location. Reverse the order of the two definitions, and it should work. But actually, now that I look at it more close... |
I'm trying to set nginx location that will handle various paths and proxy them to my webapp.
Here is my conf:
server {
listen 80;
server_name www.example.org;
#this works fine
location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $h... | How to point many paths to proxy server in nginx |
The only files from .idea folder that you should not push are workspace.xml and tasks.xml.
First you should untrack those files with:git rm --cached .idea/workspace.xml
git rm --cached .idea/tasks.xmlNext add them to .gitignore:.idea/workspace.xml
.idea/tasks.xmlNow simply remove .idea folder and reopen the project fol... | My coworker and I started working on the same project using GitHub and RubyMine.Our original sin was to push .idea folder (created and updated automatically by RubyMine) in my local repository to GitHub.
This folder creates conflict with my co-worker's local repository every time he pulls from remote.To fix this issue,... | RubyMine project directory disappears after git pull |
0
I know this is old, but this might still help.
What worked for me was a combination of my Express container and NGINX running as a reverse proxy on the host machine.
For the NGINX, I added the following settings:
proxy_pass http://localhost:9461; # <-- p... |
I have a node express app running in a Docker container and through the app i'm trying to log the IP address of the incoming request. Since i'm running everything behind a firewall i used something like this "req.headers['x-forwarded-for'] || req.connection.remoteAddress" but it logs the same IP address each time irre... | get IP address of node app running in docker container |
0
Running NPM install twice would only slows your deployment and would not cause any other problems if you don't copy node_modules into your Docker container.
Make sure you copy only the source code to the docker container and leave node_modules out. You can add a .docker... |
I am very new to CICD.
I have an Azure web app running a Docker container built from an Express Nodejs image.
My current flow is minimalistic. I have an Azure-pipelines.yml file that looks like
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
- task: AzureCLI@1
inputs:
azureSubscription: 'xxxxxx'
s... | Running mocha test with Azure pipelines and Docker |
Yes you can do this in only one commit with:
git mv Dir1 Dir2
git mv Dir2/file11 Dir2/file21
git mv Dir2/file11 Dir2/file22
commit and push
You can also do this in two commits and squash them using git rebase -i HEAD~3 if you prefer.
|
This question already has answers here:
In a Git repository, how to properly rename a directory?
(13 answers)
Closed 4 years ago.
I want to a move folder and files in it to a new f... | how to git move folder and files to new folder and keep history? [duplicate] |
You haven't indicated which gitlab image you're using:
https://registry.hub.docker.com/search?q=gitlab
The most common container image already has instructions included with details on how to enable SSL:
https://registry.hub.docker.com/u/sameersbn/gitlab/
|
I have a working installation of GitLab via the official GitLab Package on my Synology NAS (DSM 5.2) in a Docker container.
I now like to access the Webinterface via https instead of just http. I have seen in several posts that it is possible to do with some docker magic, but
did not find any detailed instructions.
Ca... | Enable SSL on GitLab with Docker on Synology NAS |
Strange, since the branch shouldn't be a factor.
If it is reproducible, that can be a good start for a trac Assembla ticket.
(which the OP Lizard did: issue 654)
It appears to be an issue on Assembla side:
At the moment we are not processing commit message if commit were located in non-main branch (in git, master).
... |
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
... | assembla and github [closed] |
If you're looking for a way to get what tags are currently running, this is what I've used the past:kubectl get pods --all-namespaces -o jsonpath="{.items[*].spec.containers[*].image}" | tr -s ' ' '\n' | I would like to display docker container tags in Kubernetes. Currently I deploy my services with helm. My images look like this:spec:
containers:
- name: my-service
image: my-service:latestThe image my-service.latest has tags like git commit hash and branch name. In helm I do not know about the imag... | How can I display image tags in Kubernetes? |
Recycling is typically the way to go. If you don't need a bitmap, let the operating system know by recycling it.In addition to that, I would use the BitmapFactory to create the bitmap and use the options to shrink it upon loading. Don't make it bigger than the device's screen. That will save a lot of memory. | I have an activity with an empty ImageView and a button. After clicking the button, I display the device's media gallery, the user chooses an image that gets passed to the activity via an intent. I use the image's URI from the returned data and I populate the ImageView, like this:private ImageView pic;
@Override
publi... | Assigning bitmap to ImageView via setImageURI throws OutOfMemory exception |
My idea was to get upstream, rebase my masterDon't: set a branch on your current local master, where you have your old (but yet to be merged) commit.git switch -c mywip master(wip: work in progress)This uses thenewgit switchcommand(Git 2.23+)Then reset master to upstream mastergit fetch upstream
git switch master
git r... | So this isn't your typical 'just rebase' issue (Atleast I don't think).I'd like to know how I can create more than one pull request without effecting past commits. Here is my current scenario:I forked a repositoryI made the change on my local master (so stupid, I know)I made a PR with the changesThey were accepted but ... | How to split commits into individual PRs on Github |
boto3 uses botocore as a dependency for the core functionality. The sourcecode can be found for both on github.com:
https://github.com/boto/boto3/
https://github.com/boto/botocore/
wait_until_running is not a function in the code. Its tells the Waiter to wait until the state running is set. All possible EC2 states a... |
How can we get a look at the AWS boto library code. Not all the code is present in the python package.
For example if I wanted to understand how the wait_until_running() method of Waiter class is implemented i.e. if it is implemented serialized fashion and other features of the code. Although the documentation says so... | AWS boto3 source code |
In point-to-site, you have to connect to the network you want to access manually. Usually, if you log-off or restart the workstation it loses connection, and you have to reconnect every time. It's common to use this type of VPN when we are working remotely, and we need to access our company assets. The channel is bi-di... | I have a scenario where I have a Windows VM in windows Azure that needs to connect to an external customer network (and connect to a database that is not in Azure).This traffic is uni-directional in that it is only my VM that needs to connect to the customer's databases and not the other way around. Site to site is man... | Site-to-site VPN vs point-to-site VPN |
The compiler does what it feels like doing. Or what the developer(s) who write the compiler felt like doing, depending on whether the compiler is sentient or not.
This may include:
The compiler allocates memory in the order it reads definitions.
The compiler keeps a list of objects that need only one-byte alignment, ... |
I am following a book where they explain about the buffer overflow. I have a question based on buffer overflow output in C.
There are two char array(buffer_one[8] and buffer_two[8]) and one integer (value).
In a x86_64 system, I am declaring the variables in an order.
int value = 5;
char buffer_one[8], buffer... | How variables are allocated in memory in C? |
Tensorflow is very particular about the requirements and configurations for GPUs. You do need to install CUDNN and I believe CudaToolkit might be a requirement to install CUDNN.I'd recommend following the official documentation to install tensorflow with gpu capabilities. You can see all of that here:https://www.tens... | are CUDA and CUDAtoolkit different?
I installed CUDA using thistutorialI ran the sample too and it worked but to run tensorflow using gpu Do I need to install CUDAtoolkit and cudnn along with the already exisiting CUDA.while running the trainning job I am getting this message2023-01-01 00:03:41.818376: W tensorflow/cor... | CUDA and CUDAtoolkit TensorFlow in wsl2 ubuntu 20.04 with gpu enabled |
That should not be the case sincecommit c9a42c4(git 1.6.2, Jan. 2009), although that commit has a bug fixed incommit 2c8544a (git 2.1.1, Aug 2014).So the first test andupdate gitand see if the issue persists. | I'm having an issue creating backups utilizinggit-bundle.I'm attempting to create backups by running the following list of commands:$git bundle create <path_to_bundle> --all
$last_commit=($(git rev-list --all --timestamp | awk '{print $1+1,$2;exit}'))
$sha_tag=${last_commit[1]}
$timestamp=${last_commit[0]}
$git tag -f ... | Git always bundles annotated tags |
One way of making Ajax request skip the rules is sticking a dummy query parameter in the URL e.g. this:$.ajax({
type: 'get',
url: 'http://domain.com/misc/page.php&skip=1',
success: function(data) {
$('#load_content').html(data);
},
error: function() {
$('#load_content').html('Error: U... | I have some rewrite rules in my.htaccessfile for clean URLs, and I also need AJAX calls in my web pages. I have problems with ajax file requests because of the rewrite rules. Here is my htaccess file content:Options -MultiViews
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
R... | Prevent htaccess from affecting ajax file requests |
I think this is not a question of scheduling but of scaling. With GCM (Google Cloud Messaging) you can push to multiple devices at once (up to 1000):https://developer.android.com/google/gcm/server.html#targetThis will reduce the request overhead. RMSPushNotificationsBundle supports this, too:https://github.com/richsage... | I have been recently tasked to implement a push notification system for the mobile apps of a commercial web app using Symfony2.I have used RMSPushNotificationsBundle(https://github.com/richsage/RMSPushNotificationsBundle) for creating and sending the messages and implemented some event-listeners to send some on-the-fly... | Scheduling push notifications with symfony2 |
What is the difference between a resident CUDA warp and an active one?In this context presumably nothing.From my research on the web it seems that a block is resident (i.e. allocated along with its register/shared memory files) on a SM for the entire duration of its execution. Is there a difference with "being active"?... | Occupancy in CUDA is defined asoccupancy = active_warps / maximum_active_warpsWhat is the difference between aresidentCUDA warp and anactiveone?From my research on the web it seems that a block is resident (i.e. allocated along with its register/shared memory files) on a SM for the entire duration of its execution. Is ... | CUDA active warps vs resident warps |
git remote just lists remote repositories, without telling you anything about the status of these repositories.
Use git status to see the status of your local repository in relation to the remote repository. E.g., this will tell you that you are ahead (local commits not yet pushed to remote) or behind (your local repo... |
I start to learn git, I would like to understand git remote -v status.
When I comfirm git remote -v some message below is displayed.
How to understand the status of remote repository?
$ git remote -v
origin https://github.com/user/calendar.git (fetch)
origin https://github.com/user/calendar.git (push)
Best regards
| How to read status of git remote - v |
Even though you name containers within Dockerrun.aws.json, beanstalk still names them with a specific hash containing environment name and other stuff like that. But it has name from the file above in it as well.
8a18a679564e XXXXXXXXXX.dkr.ecr.eu-west-1.amazonaws.com/XXX:1.0.0-nginx "nginx -g 'daemon ..." 13 ho... |
I'm in need to executing a post-deployment script on an EB app. I need to execute commands on a Docker container within a multi-container Docker environment. The issue is that the Docker containers get assigned a random hash for the container name.
I've searched around and cannot seem to locate any information on ho... | Naming a Docker container with Dockerrun.aws.json and Elastic Beanstalk |
I do not see the word file anywhere inIssues API.Andthis threadconfirms you cannot attach a file during Issue Creation.Adding a file to issue or pull request seems to be donemanually through drag & drop only. | I need to import all bug reports and attachments from my internal system to GitHub Issues.What GitHub API parameter should I use to attach a document in my curl command?curl -X "POST" \
-H "Accept: application/vnd.github+json" \
-H "Accept: application/vnd.github.VERSION.html" \
-H "Authorizati... | How to attach docs and import issue at the same time using GitHub API? |
8
This is not possible at the moment.
As per my discussion about this feature on official docker slack channel, exposing range of ports using long format syntax (which is the only syntax right now which you can use to publish ports in host mode) is not possible.
Having in m... |
In a Docker Compose file, I can easily publish a range of ports using the short-form syntax:
ports:
- "3000-3010:3000-3010/udp"
But in my case, I need those ports as "mode=host" to bypass the swarm overlay network. The short-form syntax can't express that, so I need to use the long-form:
ports:
- published: "300... | How to publish a range of ports with 'mode=host' with a Docker Compose file? |
When you update/delete your object, a notification is sent to the caching layer to reflect those changes.
The cache key might even be broadcasted to another server so it has to carry enough payload to provide enough information for the remote end to flush the relevant entry. But on the other hand it can not be too big... |
I have following problem.
I use JBoss 5.1, JPA/Hibernate with 2-nd level cache.
My system has few entities mapping the same database table.
Example:
Table FURNITURES is mapped by entity 'Furn' and 'Furniture'.
These classes CAN NOT be changed.
Now the when i change the data of 'Furn' with id 1, the 'Furniture' with i... | Hibernate 2nd level cache update |
No, unfortunately, this is currently not possible.Feel free to start a discussion on this topic on Sonar user mailing-list. | I know it is possible to separate Integration and Unit test code coverage in Sonar, but is it possible to retrieve separate pass/fail results for Integration and Unit tests? Thanks | Possible to separate integration test and unit test reports in Sonar? |
You are essentially asking for pre-generating all such combinations in a single list and then print them in one go.
What you can do is to avoid this by not calling list(...) but instead printing them on the fly, while the iterator is generating them.
This is one example. It is not in the original format, but it gets t... |
This question already has answers here:
Prevent memory error in itertools.permutation
(2 answers)
Closed 8 years ago.
I am trying to output a list of every possible 6 length combin... | MemoryError when generating every possible combination of letters and numbers with a length of 6 [duplicate] |
2
Your Dockerfile should have a command defined like:
CMD ./startpolipotor.sh
Then you do not need to provide /bin/bash as a run command. Only the following should be enough:
docker run -i -t id_image
By the way: your script file creates two processes running in backgroun... |
I wrote my first Dockerfile in order to test Docker with tor and polipo.
My Dockerfile looks like:
# Pull base image.
FROM ubuntu:latest
# Upgrade system
RUN apt-get update && apt-get dist-upgrade -y --no-install-recommends && apt-get autoremove -y && apt-get clean
# Install TOR
RUN apt-get install -y --no-install-r... | Start tor and polipo when I launch my container |
No you can't specify rules for some jobs by putting them in that jobs segment.But you can add label filter to metrics used in your rules.For example:groups:
- name: example
rules:
- record: code:prometheus_http_requests_total:sum
expr: sum by (code) (prometheus_http_requests_total{job="Prometheus Node E... | I have configured some node in json different-e file based on categorized. & integrated with Prometheus.yml file. i want to use rules.yml with respective json not for global.Here below is my prometheus.yml code# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
... | Multiple rules files in prometheus for each targets |
You are doing this during your build:
RUN touch /var/log/node.log && /
node --help 2>&1 > /var/log/node.log
The file /var/log/node.log is created and fixed immutably into the resulting image.
Then you run the container with this volume mount:
volumes:
- ./mongo/log/:/var/log/
Whatever is in ./mongo/log/ is mou... |
While trying to debug a RUN statements in my Dockerfile, I attempted to redirect output to a file in a bound volume (./mongo/log).
To my surprise I was unable to create files via the RUN command, or to pipe the output of another command to a file using the redirection/appending (>,>>) operators. I was however able to ... | Docker: RUN touch doesn't create file |
All of those ports are used by well-known services, and you should use none of them (if your product is not a webserver or a DNS server.) DCCP Well Known ports SHOULD NOT be used without IANA registration. If your service is commercially viable or has benefits for the network as a whole, consider registering it for a l... | Which of the following ports is the best one to use for a program. I'm working on using a custom protocol still under development. I'm looking for one that will be accessible to virtually every host that is connected to the public Internet (that is, every host that can view websites can use this port). The three main o... | What is the best port for a program? |
0
The heap limit of the dexing operation. Add this to your Android closure in your build.gradle file:
dexOptions {
javaMaxHeapSize "4g"
}
or use
dexOptions {
javaMaxHeapSize "2g"
}
Share
Improve this answer
Follow
... |
I am getting 'No debuggable processes' in android moniter. But I can run in a emulator. I am not sure what is the problem as it was working fine before. Getting following error :
Error:UNEXPECTED TOP-LEVEL ERROR:
Error:java.lang.OutOfMemoryError: GC overhead limit exceeded
Error:Execution failed for task ':transformCl... | No debuggable processes |
There are a few things that could be limiting the flow of data and each has a different way to alleviate it:Your transfer application might be adding overhead. If s3fs is too slow, you might try other options like the S3 tab on the AWS console or a tool like s3cmd.The network latency between your computer and S3 and t... | I have around 60,000 small image files (total size 200mb) that I would like to move out of my project repository to Amazon S3.I have tried s3fs (http://code.google.com/p/s3fs/), mounting S3 via Transmit on Mac OS X as well as the Amazon AWS S3 web uploader. Unfortunately it seems like all of these would take a very lon... | Efficiently move many small files to Amazon S3 |
First, it is not recommended to store configuration files in a repository, mainly because of the reason that the configuration only applies to one environment.
This gist lists some solutions to this problem.
In your case, I would rename the empty config file to something like config.template.php, that others can copy ... |
I'am authoring a PHP CMS, that needs an installation to work.
The installation generate a config file.
At localhost i work on an installed version (with a specific config file),
But the users who download the CMS from github would have an empty config file (= uninstalled version).
What I want :
-a specific config file... | Github different versions of the same file: one for development & one for the repo |
According to Flask docs (and following #arielnmz sugestion), you can stream your content:
from flask import Response, stream_with_context
@app.route('/playlist')
def generate_playlist():
def generate():
jukebox = query_playlist(p)
for i in jukebox:
yield i[0]['artist']
return Resp... |
I'm trying to move a project from development to production. (At dev stage, I was using only Flask, and now I'm running it behind Gunicorn with Nginx.)
I'm having a problem to serve a specific page, songs.html.
The page loads correctly with a dummy variable (jukebox = [whatever]), but in real life I'm using a generato... | Flask, Gunicorn, Nginx :: IOError: [Errno 32] Broken pipe |
At some point did you merge a branch withgit merge mybranch --no-ffand then deletemybranch? The--no-ff(no fast forward) forces git to make a merge commit so there's a record of the branch existing at some point, however the name is now gone.ShareFollowansweredNov 18, 2013 at 6:34JudJud1,16811 gold badge88 silver badges... | I work on 2 main branches namely 'develop' and 'master'.Everything was working perfectly fine until today.When I saw the network graph on github, there was a mysteriousyellow colored branchcoming out of master andhaving no name.I have attached the images both labelled and unlabeled version of network graph.What could h... | github network shows a mysterious branch |
The rewrite directive automatically appends the original arguments (adding a ? or & separator as required) unless the replacement string ends with a ?.
For example:
rewrite ^/id/(.*)$ /load.php?id=$1 last;
The above will internally redirect /id/123?x=abc to /load.php?id=123&x=abc.
See this document for details.
|
I simply want to rewrite:
https://example.com/id/123?a=1&b=2 (and maybe more variables, or maybe none)
to
https://example.com/load.php?id=123&a=1&b=2 (...and whatever others, or maybe none after id)
That's it. So simple, right?
Yet I think there is a secret unwritten rule that says docs for nginx URL rewriting must be... | nginx rewrite: rewrite and pass original URI arguments along |
A self-signed certificate is not inherently vulnerable to a man-in-the-middle attacks. Using theALLOW_ALL_HOSTNAME_VERIFIERis though, so you shouldn't use it. As long as you properly set up your app to trust your self-signed certificate, and verify its validity properly there is really no security problem.If you want t... | I would like to use SSL for connections between my android app and the server hosting my web services.I wanted to used a self-signed certificate and then useSSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIERbut then there would be a vulnerability to man-in-the-middle attacks, so I decided to use trusted certificates.I am goi... | Adding trusted SSL Certificate to an app designed for API 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.