Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
4
Look for include statements in /etc/nginx/nginx.conf to find out which files and directories are scanned for configuration snippets. There might be something like this:
http {
...
include sites-available/*; # import any file from /etc/nginx/sites-available
...
... |
So I was trying to deploy my python-flask app on AWS. I have rented the server and have setup everything. I was using this to do my work of deploying application on AWS server. Up until Step 6 everything was perfect but then as it said in Step 6, I need to add some configurations in default file inside sites-available... | "sites-available" and "default" missing in nginx installation path |
There's no reason to make yourdocker-compose.ymlthat complicated. You can simply do this:version: "3"
services:
frontend:
...
volumes:
- /my/local/absolute/path/:/var/www:ro
backend:
...
volumes:
- /my/local/absolute/path/:/var/www | To replace thevolumes_from:directive from version 2 (forhelpyio), I tried this, but something went wrong.version: "3"
services:
frontend:
...
volumes:
- myVolume:/var/www:ro
backend:
...
volumes:
- myVolume:/var/www
volumes:
myVolume:
driver: local
driver_opts:
typ... | docker-compose : absolute path for shared volumes in version 3 |
SSH agents only affect remotes that use the SSH transport.Make sure your remotes are configured as[email protected]:user/repo.git, nothttps://github.com/user/repo.git. | I followed the github guide (https://help.github.com/articles/using-ssh-agent-forwarding) to ssh agent forwarding.$ ssh -T[email protected]Attempt to SSH in to github
Hi username! You've successfully authenticated, but GitHub does not provide
shell access.This command works on both local & server. But when I try a git ... | SSH agent forwarding configured and (seems to be) working but github still asks for user & password |
There is an open feature request for this, but it's not yet supported:https://github.com/kubernetes/kubernetes/issues/15478 | below is docker run command:docker run --log-driver=syslogHow to setlog-driverin kubsernetes pods.
Can you show examples to me?
Thanks... | How to configure log-driver in kubernetes pods file? |
Because the value read from memory to be loaded into R1 hasn't yet been written to the register file. If you were to read the value from R1, you would get the value R1 contained before the R1<-M1 instruction. The new R1 value is stored in the ME->WB pipeline register after ME1. | Hi Suppose the below instruction :R1<-M1
R2<-M2
R3<-R1*R2
M3<-R3Now We Will create a pipeline like below pipeline without bypassing:[XXX : bubble]IF1 ID1 EX1 ME1 WB1
IF2 ID2 EX2 ME2 WB2
IF3 XXX XXX XXX ID3 EX3 WB3
XXX XXX XXX XXX IF4 ID4 EX4 WB4And We will create a pipeline with by-passing like belo... | By Pass Method for Instruction Pipeline |
2
Vagrant cares about case (at least Vagrant 1.8.1 does), so use lower case for the provider name:
vagrant up --provider=virtualbox
I think the 1.8.1 error message is much more helpful:
$ vagrant up --provider=VirtualBox # NOTE: this is the WRONG capitalization
An active ... |
Update: I have uninstalled both Vagrant and Docker, and will accept any answer that helps me re-install both of them in such a way that:
I can run Vagrant without any dependency on Docker whatsoever; and
I can run Docker without any dependency on Vagrant whatsoever; and
I can run Vagrant and use Docker as the backing... | Vagrant and Docker not playing nice |
AMDs fidelityFX SRuses a clamped lanczos kernel, this implementation for the mpv android port uses OpenGL ES. | Is it possible to implement LANCZOS interpolation on the GPU in OpenGL for android or would you say it is a task for OpenCL?Time performance and device support are important issues.Best regards,
David | LANCZOS interpolation in OpenGL |
Try:location ~ (\.php$|myadmin) {
return 403;
} | I run a number of websites behind an nginx frontend. All my sites are in Python/Django. I see in my logs lots of crawling by hackers for various php applications - I'd like to block them (return a 404) at nginx without them hitting my application servers.I'd like to do this globally in my nginx conf file so it applies ... | How to block all file extensions of certain types on nginx |
PromQL in Prometheus doesn't support functions for cumulative calculations. If you need cumulative calculations, then tryVictoriaMetricsinstead - its query language -MetricsQL- providesrunning_sum()function.P.s.: I'm the author of VictoriaMetrics. | this seems like a pretty easy thing to do. Yet I cannot wrap my head around it.I make some calculations depending on the average CPU Utilization for the last 15s and get a value based of that calculation. No I want a graph in Grafana which shows the cumulative result. E.g.Time passedCurrent resultCumulative result15s55... | Grafana - Promql cumulative graph |
The issue you are experiencing is because the subject CN presented by the certificate does not match the host name in the Uri.Make sure that the certificate bound to the public IP address of the host does have a matching CN with the host name you are using to access the resource.To easily verify, open the Url in a brow... | Can't solve the problem with certificate validation.There's Web API server, that uses HTTPS to handle requests. Server's certificate has this certification path: RCA (root) -> ICA (intermediate) -> Web API server. RCA, ICA and Web API server are members of the same Active Directory domain.Client application (desktop, c... | "The remote certificate is invalid according to the validation procedure" using HttpClient |
0
Traditionally you can use pg_dump command to backup your postgres database
pg_dump -U postgres -h localhost -f <BACKUP_FILE> <DATABASE_NAME>
additionally Use a tool like rsync to copy the backup file to the NAS device. You can use a cron job to schedule the backup proces... |
I am struggeling to get this working. It is no problem for me to set up a Postgres Database with Docker and acess it from other clients with Dbeaver or PGAdmin. My problem is, I am not able to perform an automatic backup of the docker container or volume.
This is my Docker Compose file:
version: '3.8'
services:
db... | Is it possible to run a Postgres Database as a Docker container and backup it periodically to a NAS? |
Use the command (plugging in user, token, and repo)curl -u $user:$token -XDELETE "https://api.github.com/repos/$user/$repo" | I want to delete a list of repositories using the github API. But I get the response:{ "message": "Bad credentials", "documentation_url":
"https://developer.github.com/v3" }Steps to reproduceFirst I created a personal access token here:https://github.com/settings/tokensI made sure it had the scopedelete_repoThen,... | Delete github respository via API |
I've implemented this with fuzzing. This makes it nicely reproduceable as well. The library fuzzer sets a number at the start of each fuzz attempt and all malloc/realloc/calloc calls are intercepted. In case the intercepted malloc/realloc/calloc is the nth one in that attempt, it is simulated to fail.In that way, the f... | The software I'm working on has quite a lot of lines handling out-of-memory situations, like this/* Leave object->data.cue_sheet.tracks untouched if realloc fails */
FLAC__StreamMetadata_CueSheet_Track *tmpptr;
if ((tmpptr = realloc(object->data.cue_sheet.tracks, new_size)) == NULL)
return false;
object->data.cue_s... | How to verify out-of-memory behaviour of a program |
<div class="s-prose js-post-body" itemprop="text">
<p>I was using port <code>27017</code> instead of <code>49155</code> (doh, port forwarding)</p>
<pre><code>0.0.0.0:49155->27017/tcp
</code></pre>
<p>Thanks to the ZeissS.</p>
</div> | <div class="s-prose js-post-body" itemprop="text">
<p>Following this example: <a href="https://docs.docker.com/engine/examples/mongodb/" rel="noreferrer">https://docs.docker.com/engine/examples/mongodb/</a></p>
<p>When trying to connect to mongoDB with: <code>mongo ip:27017</code>
(where ip is the name from boot2docker... | Unable to connect to mongoDB running in docker container |
Docker provides an isolation layer, and one of the majorgoalsof Docker is to hide details of the host's hardware from containers. The easiest, most appropriate way to query low-level details of the host's hardware is from a root shell on the host, ignoring Docker entirely.The actual mechanism of this is by restricting... | I am trying to run command dmidecode in my docker container,docker run --device /dev/mem:/dev/mem -it jin/ubu1604However, it claims that there is no permissionroot@bd1062dfd8ab:/# dmidecode
# dmidecode 3.0
Scanning /dev/mem for entry point.
/dev/mem: Operation not permitted
root@bd1062dfd8ab:/# ls -l /dev
total 0
crw--... | Can't run dmidecode on docker container |
It has nothing to do with endinanness, but with the C++ standard. C++ isn't required to write functions in the order you see them to disk (and think about cross-file linking and even linking other libraries, that's just not feasable), it can write them in any order it wishes.
About the difference between the actual va... |
For this code:
#include<stdio.h>
void hello() { printf("hello\n"); }
void bye() { printf("bye\n"); }
int main() {
printf("%p\n", hello);
printf("%p\n", bye);
return 0;
}
output on my machine:
0x80483f4
0x8048408
[second address is bigger in value]
on Codepad
0x8048541
0x8048511
[second address is... | Does this have anything to do with endian-ness? |
Finally I have found a workaround using Middleware.
Create a middleware in server/middleware folder:
// cache.js
module.exports = function () {
return function cacheImages(req, res, next) {
// Check if download file:
if (req.originalUrl.includes('/api/files/') && req.originalUrl.includes('/downlo... |
I'm using Loopback as an backend API, and also using Storage component as an CDN to upload and download image and sound file for my website.
My website using a lot of image from that. But all the image files is not cach-enable.
I want to enable cache by adding a "Cache-Control:max-age=2678400" header to the file but ... | Enable caching for download method of Loopback Storage Component? |
You can try using this library I made, it should allow you to do just about anything with Proxys or what not. I know its a very late response, however I hope it will help someone...https://github.com/DrBrad/Android-VPN-to-Sockethttps://github.com/DrBrad/JTun2SocksThe simplest way to do so is by creating a DNS proxy for... | I'm trying to redirect the whole android network traffic through HTTP Tunnel, and there is no tutorial or Github Repository on how to do it.Simply just get the host, port, username, and password from the user and tunnel the whole device to that host programmatically.I have configured an HTTP-Proxy server with squid, ju... | Android http Tunnel using VpnService |
+50If it's only for this file, you can use:RewriteEngine on
RewriteRule ^products/(.+)\.aspx$ $1 [NC,R=301,L] | I've migrated a custom ASP CMS to Wordpress. I need to 301 redirect:https://example.com/products/*.aspxtohttps://example.com/*How do I do this? Thanks. | .htaccess redirect .aspx to wordpress postname |
1
Long story short, I am wondering if the java heap is ever compacted (de-fragmented, in effect) so that the high-water mark shrinks (and if so, how to make it happen)?
Whatever its behavior is, it most certainly is not under your control.
If not, then does anybody hav... |
Please note I do NOT have a memory leak. My question is about a subtler issue.
I recently wrote an android app which does image processing. The image is loaded as a Bitmap, then copied out in pixels, processed in a way that uses lots of memory (think Fourier transforms in floating point representations and stuff), t... | Is there a way to compact memory in android to lower the high water mark? |
Since your cluster has only preemptible instances, the system pods will also restart every 24 hours (at least), includingkube-dns.You have a couple of options:Create another node pool (Of-course, this node pool doesn't have to include TPU nodes, you can try and usen1-standard-1, or even cheaper instances) in that GKE c... | I have a cluster set up in Google Kubernetes Engine (GKE), with preemptible instances, TPU support, and 1 container per node.About twice per container per day I get this error calling e.g.tf.io.gfile.glob(...):tensorflow.python.framework.errors_impl.FailedPreconditionError: Error executing an HTTP request: libcurl code... | Commonly getting DNS failure calling tf.io.gfile methods from GKE: "Couldn't resolve host 'www.googleapis.com'" |
VS2017 has no Visual Studio specific.gitconfig.You can alter the standard global git config file, or the local one for the repository in question.To edit the global one:git config --global --editTo edit the repository local onegit config --edit | In Visual Studio Enterprise 2017 15.2 (26430.15) Release, when I push a simple test edit of my cloned public Github repository, it fails; with an error message concerning an AggregateException, and an inability to spawn "askpass". Other SO posts relating tothatissue don't work for me.I'd like to try adding our http/htt... | Which .gitconfig file does Visual Studio use? |
<div class="s-prose js-post-body" itemprop="text">
<p>I'm assuming that at some point in your build process, you're copying your entire application into the Docker image with <code>COPY</code> or <code>ADD</code>:</p>
<pre><code>COPY . /opt/app
WORKDIR /opt/app
RUN pip install -r requirements.txt
</code></pre>
<p>The p... | <div class="s-prose js-post-body" itemprop="text">
<p>In a Dockerfile I have a layer which installs <code>requirements.txt</code>:</p>
<pre><code>FROM python:2.7
RUN pip install -r requirements.txt
</code></pre>
<p>When I build the docker image it runs the whole process <strong>regardless</strong> of any changes made t... | Docker how to run pip requirements.txt only if there was a change? |
1
I found solution here - need change url for clone(add userName):
before: https://gitlab.com/gitlab_user/myrepo.git
after: https://[email protected]/gitlab_user/myrepo.git
Share
Follow
answered ... |
I need use GitLab repository in my Flutter project(Android Studio).
First, I tried "New->Get from version control", but I have error:
remote: The project you were looking for could not be found or you don't
have permission to view it
I started looking for a solution on the net and only found this manual. The key ste... | Android studio and GitLab - how integration? |
According to this issue, whenever your Docker image is invoked, whether in Lambda or on your local machine, you need an entry script that will help your use the RIE proxy when necessary (e.g., on our local machine).
entry.sh in root project:
#!/bin/sh
# Check if the AWS_LAMBDA_RUNTIME_API is not set. This environment
... |
I wanted to create node16 container image for aws lambda. I have following Dockerfile and index.js for lambda function. Building image (docker build -t lambda-hello-world .) works fine but when I invoke( docker run --rm -p 8080:8080 lambda-hello-world ) lambda function it returns error. Could someone please suggest?
2... | AWS Lambda Node 16 container image error ( Missing Runtime API Server configuration ) |
I found a solution. What ultimately allowed me to change the heap size for the Neo4jImport tool was to open the neo4jImport.bat file (path is C:Program files\neo4j\bin) in a text editor (required me to changed permissions first) and change the "set EXTRA_JVM_ARGUMENTS=-Dfile.encoding=UTF-8" line to
set EXTRA_JVM_ARGUM... |
I tried to batch import a graph database with about 40 million nodes and 20 million relationships but I get an outofmemory error (this has been documented already, I know). On Windows, I am using the import tool as so:
neo4jImport –into SemMedDB.graphdb --nodes nodes1.csv --nodes nodes2.csv --relationships edges.csv
... | Neo4j (Windows) - can't increase heap memory size for Neo4jImport tool |
2
The log file must be owned by the user which runs the uwsgi process. In case with Digital Ocean tutorial this is the user user.
Please, note that Digital Ocean literally declares the following in the /etc/init/myproject.conf:
setuid user
setgid www-data
If you copy-paste... |
I am recovering a nginx/uwsgi/flask server that had been up for about a year. It was originally setup mostly following:
https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
I have it back running such that nginx is serving static files, and I can run the... | uWSGI project not starting -- /tmp/logs/uwsgi.log permission denied [core/logging.c line 28] |
2
I found out what was wrong!
I just needed to add the symbolic link
sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/www
Share
Follow
answered Oct 13, 2013 at 12:32
Aymane ShuichiAymane ... |
What i'm trying to do is to access phpmyadmin from IP/phpmyadmin
I have edited the default conficuration file in the Site-available directory
my configuration is :
server {
location /phpmyadmin {
root /usr/share/;
index index.php;
location ~ ^/phpmyadmin/(.+\.php)$ {
... | PhpMyAdmin and nginx configuration , get phpmyadmin after IP |
According toabout_Functions:After the function receives all the objects in the pipeline, the End
statement list runs one time. If no Begin, Process, or End keywords
are used, all the statements are treated like an End statement list.Thus you just need to omit theelseblock. Then all objects in the pipeline are proce... | What I'm trying to do is get a function to stop the pipeline feed when a time limit has been reached. I've created a test function as follows :function Test-PipelineStuff
{
[cmdletbinding()]
Param(
[Parameter(ValueFromPipeLIne=$true)][int]$Foo,
[Parameter(ValueFromPipeLIne=$true)][int]$MaxMins
... | Stopping PowerShell pipeline, ensure end is called |
Please take a look at the following compose script. I tried and tested. It works fine.
version: '2'
services:
db:
image: mysql:latest
container_name: db_server
volumes:
- ./database/data:/var/lib/mysql
- ./database/initdb.d:/docker-entrypoint-initdb.d
restart: always
environment:
... |
Ive been making new sites with Wordpress & Docker recently and have a reasonable grasp of how it all works and Im now looking to move some established sites into Docker.
Ive been following this guide:
https://stephenafamo.com/blog/moving-wordpress-docker-container/
I have everything setup as it should be but when I go... | Moving Wordpress site to Docker: Error establishing DB connection |
docker runcommand requires the image name parameter with optional version of the image (recommended).Use:docker run --name some-mysql -e MYSQL_abcd_123456=my-secret-pw -d mysql:latestto pull the latest mysql image or choose the exact version listed bysupported tagsfor example:5.7.25or8.0.15In majority cases you should ... | Working with a Docker file which includes PHP, Apache, and MySQL. I was able to get the page to pull up in localhost. However, I am unable to get the MySQL running.# Use an official PHP Apache runtime as a parent image
FROM php:7.0-apache
# Set the working directory to /var/www/html/
WORKDIR /var/www/html/
# Instal... | Docker PHP/MySQL/Apache container |
For anyone that stumbles upon this as I would assume Alex got it working after 9 months. His example should work in the current alertmanager versions setup like this:inhibit_rules:
- source_matchers: [alertname="prometheus-up"]
target_matchers: [datasource="prometheus"]
equal: ['datasource']For some logical c... | I'm trying to configure something that seems very simple:
"If the datasource (prometheus) is down, don't spam alerts, and only notify that Prometheus is down"Immediately I went toinhibit_rules, and after trying probably several hundred combinations I cannot make it work under any condition.This is my config:inhibit_rul... | Alertmanager `inhibit_rules` not working? |
Here is the paginator solution.import boto3
boto3 = boto3.session.Session(region_name='ap-northeast-2')
emr = boto3.client('emr')
page_iterator = emr.get_paginator('list_clusters').paginate(
ClusterStates=['RUNNING','WAITING']
)
for page in page_iterator:
for item in page['Clusters']:
print(item['Id'... | How do I list all my running clusters in my aws account using boto? Using the the command line I can get them using :aws emr list-clusters --profile my-profile --region us-west-2 --activeHowever I wanna do the same using boto3. However the following code does not return any clusters:import boto3
session = boto3.Sessio... | How do I list all running EMR clusters using Boto? |
-1Iptables is a kernel module, so looking for the process won't work. For CentOS, at least, I found a decent way to do this without having to give special sudo permission:[aaron@tg1 ~]$ /sbin/lsmod|grep ip_tables
ip_tables 17831 1 iptable_filter
[aaronr@tg1 ~]$sbin isn't in the users' path normally, henc... | I'm writing a bash script which will check if the local firewall is up, and based on the status, perform some operation.
Ideally, within my script I would do:su root --session-command="/etc/init.d/iptables status" ;
status=$? ;So, if status = 1 it would mean that the firewall is down/not configured. And, if it's 0, tha... | To check linux firewall status without root privileges |
After a thread with the openssl developers, it turned out that I was using the wrong function. I switched from d2i_RSAPrivateKey to d2i_PrivateKey (after extracting the EVP_PKEY with d2i_PrivateKey), and it works. I also switched from SSL_CTX_use_RSAPrivateKey_ASN1 to SSL_CTX_use_PrivateKey, again passing in the EVP_... | I have a function that parses a private RSA key using openssl's d2i_RSAPrivateKey function. I am finding that this succeeds with certain keys, but not others, even though all of these keys are PEM-encoded RSA keys. I generated my own signed public and private key, like this:openssl req -x509 -newkey rsa:2048 -keyout ... | d2i_RSAPrivateKey fails to parse RSA private key |
If it's muscle memory forcing you to type out git push origin master, and you only have one remote, then you should switch your push style to only push the current branch instead.
You do this as follows:
git config --global push.default current
After that, all you need to do is push. You'll push whatever branch you'... |
I want to prevent accidental push to master from my local. So there are many times where i have almost reached end accidentally to push into master from my local feature branch git push origin master(here my it should be "my feature branch name").
So i just want to block this step in my local itself instead of any ho... | Prevent push to master from local into git |
The problem was a simple one in the end.The tutorial I'm working through had quotation marks around its db connection details, and it turns out I needed to leave these out. | I've set up a virtual host on my local machine myhost.com, have installed zend there and am now trying to connect to the MySQLdatabase. I get the following error message:Message: SQLSTATE[HY000] [2003] Can't connect to MySQL server on ''myhost.com'' (10060)All the tips I've found via google haven't helped. I use kasper... | Connecting to MySQL using zend |
You canpublic a custom metricto AWS CloudWatch, then set up anautoscale triggerandscaling policybased on your custom metrics. Autoscale can start the instance for you and will kill it based on your policy. You'll have to include the appropriate user data in thelaunch configurationto bootstrap your host. Just like userd... | I occasionally have really high-CPU intensive tasks. They are launched into a separatehigh-intensityqueue, that is consumed by a really large machine (lots of CPUs, lots of RAM). However, this machine only has to run about one hour per day.I would like automate deployment of this image on AWS, to be triggered by outsta... | Managing workers on AWS |
Kubernetes Pods are notVirtual Machines, so not something you typically can "log in" to.But you might be able toexecute a commandin a container. e.g. with:kubectl exec <pod-name> -- <command>Note that your container need to contain the binary for<command>, otherwise this will fail.See alsoGetting a shell to a container... | I have kubernetes pods running as shown in command"kubectl get all -A" :and same pods are shown in command"kubectl get pod -A":I want to enter/login to any of these pod (all are in Running state). How can I do that please let me know the command? | How to login/enter in kubernetes pod |
While GitHub Codespaces do have to be linked to a repository, it's of course possible to use multiple repositories in the same codespaces simply by cloning them into /workspaces (or wherever you have them configured). I do this all the time and it's not a problem. If you want to use the same token, GitHub has ways t... |
Is there any way to use a single CodeSpace with multiple repositories?
For example, I'd like to be able to create a CodeSpace for C++, and another for C#. Then use them to open whatever repository I want.
After reading all the GitHub docs it seems as though I have to create a new CodeSpace for every repo I work on. Bu... | Use GitHub CodeSpace with multiple repositories |
You can useVolume snapshots. Volume snapshots provide Kubernetes users with a standardized way to copy a volume's contents at a particular point in time without creating an entirely new volume. This functionality enables, for example, database administrators to backup databases before performing edit or delete modifica... | Can someone suggest any ideas, or references that I could use to copy a pvc snapshot from one cluster to another without using any third-party like velero. | Copying pvc snapshot from one kubernetes cluster to another |
As shannonman mentioned, you can just stop the service and start it again when required.Stop cron service$ sudo /etc/init.d/cron stopStart cron service$ sudo /etc/init.d/cron startReference | Closed.This question isoff-topic. It is not currently accepting answers.Want to improve this question?Update the questionso it'son-topicfor Stack Overflow.Closed11 years ago.Improve this questionI was wondering if it was possible to tell cron to not execute any cron jobs for a couple hours ? | Skip cron job for a few hours [closed] |
You can tell git push to push the remote to a specific revision:
git push origin HEAD~1:master
Explanation:
origin is the name of the remote repo
HEAD~1 is the source-refspec – the revision to push. HEAD~1 means one commit behind the current local HEAD.
master is the target-refspec – the remote branch to push to.
|
I'm working on a git project with a partner. I made some changes, then accidentally added and committed more files than I intended to and pushed them to the master repository. How do I rollback the remote repository to the last commit, BUT preserve my local copy so I can re-add and commit correctly?
| Git - rollback to previous commit |
The traceback shows that it was the route matching that raised a redirect;usually(e.g. unless you added explicit redirect routes), that means the client tried to access abranchURL (one that ends with atrailing slash), but the requested URL did not include the last slash. The client is simply being redirected to the can... | My flask app is doing a301redirect for one of the urls.The traceback in New Relic is:Traceback (most recent call last):
File "/var/www/app/env/local/lib/python2.7/site-packages/flask/app.py", line 1358, in full_dispatch_request
rv = self.dispatch_request()
File "/var/www/app/env/local/lib/python2.7/site-package... | Flask 301 Response |
One thing, are you escaping your url?Try with:wget -O /dev/null "http://www.domain.com/index.php?ACT=25&profile_id=1"Having an ampersand in the URL usually leads to strange behaviour (process going background and ignoring the rest of the URL, etc). | Just when I thought I was understanding cron jobs, I realize I'm still not understanding. I'm trying to set up a cron job through Dreamhost to ping a URL once an hour. This URL when visited performs a small(ish) query and updates the database.A few examples I've tried which haven't seemed to of worked:wget -O /dev/null... | Setting up Dreamhost Cron job to simply execute URL |
Make two separate scripts would be my first suggestion.Also $_SERVER['SERVER_NAME'] depends on the server setup, but should always be set.From Apache Docs:If no ServerName is specified, then the server attempts to deduce the
hostname by performing a reverse lookup on the IP address. If no port
is specified in the S... | I'm doing something like this now:if (empty($_SERVER['SERVER_NAME'])) {
// the script is run by a Cron job
} else {
// the script is run by a HTTP request
}Will it go wrong at some situation? More specifically, is $_SERVER['SERVER_NAME'] always set by Apache? I know some of the variables in $_SERVER like $_SERVER['... | What is the most proper way to check if your PHP is run by a Cron job or a HTTP request? |
Change it to belowCMD ["bash", "-c", "$(pipenv --venv)/bin/python3 main.py /root/uploads"]If that still gives you issue, change$to$$ShareFollowansweredSep 11, 2017 at 9:35Tarun LalwaniTarun Lalwani144k99 gold badges211211 silver badges268268 bronze badgesAdd a comment| | Using:CMD ["$(pipenv --venv)/bin/python3", "main.py", "/root/uploads"]Causes an error ondocker run:Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"$(pipenv --venv)/bin/python3\\\": stat $(pipenv --venv)/bin/python3: no such... | command substitution in docker CMD |
23
You can use ssh tunneling technique.
In your terminal:
ssh -i /path/to/your/AWS/key/file -NL 6006:localhost:6006 user@host
where:
user and host: your aws ec2 user and instance specific.
-N: don't execute a remote command (just forward ports)
-L: [bind_address:]port:h... |
I'm trying to access Tensorboard on AWS. Here is my setting :
Tensorboard : tensorboard --host 0.0.0.0 --logdir=train :
Starting TensorBoard b'39' on port 6006 (You can navigate to
http://172.31.18.170:6006)
AWS Security groups (in):
HTTPS TCP 443 0.0.0.0/0
Custom_TCP TCP 6006 0.0.0.0/0
However conne... | Accessing Tensorboard on AWS |
Change this:
CMD ["waitress-serve", "--call CoreApi:create_app"]
to this
CMD ["waitress-serve", "--call", "CoreApi:create_app"]
and it should work
|
I am trying to create a docker container for a simple Flask based Api (python 3 dependant) but I am having issues and I don't understand what the issue is.
My Dockerfile is:
FROM python:3-alpine
RUN pip install --upgrade pip
RUN pip install waitress
CMD ["waitress-serve", "--call CoreApi:create_app"]
I am then build... | Deployment of Flask based Api (using waitress) to Docker |
i found the problem. the virtual host configuration file had not the next lines:<Directory "/var/www/domain/public_html">
Options All
AllowOverride All
Allow from all
</Directory> | I have a project with two applications: a frontend (in AngularJs) and a backend (in Phalcon). I my server document root i have two folders and one htaccess:public_html
- api
- controllers
- index.php
- app
- .htaccessThe .htaccess have the next configuration:<IfModule mod_rewrite.c>
RewriteEngine on
... | Htaccess mod rewrite don't work |
You can use the followingnugetpackage.PM> Install-Package Nager.AmazonProductAdvertisingExamplevar authentication = new AmazonAuthentication("accesskey", "secretkey");
var client = new AmazonProductAdvertisingClient(authentication, AmazonEndpoint.US);
var result = await client.GetItemsAsync(new string[] { "B00BYPW00I",... | Using the Amazon Product Advertising API I am searching for 2 different UPCs:// prepare the first ItemSearchRequest
// prepare a second ItemSearchRequest
ItemSearchRequest request1 = new ItemSearchRequest();
request1.SearchIndex = "All";
//request1.Keywords = table.Rows[i].ItemArray[0].ToString();
request1.Keyword... | Amazon Product Advertising API - searching for multiple UPCs |
Michael is right, as the document of AWS statesAs the influx of messages to a queue increases, AWS Lambda automatically scales up polling activity until the number of concurrent function executions reaches 1000, the account concurrency limit, or the (optional) function concurrency limit, whichever is lower. Amazon Simp... | Currently I'm using an SQS queue to trigger the Lambda function.
My Lambda function can only handle one SQS record at a time, and I want to deplete the SQS queue as fast as possibleSo I setDelivery Delay: to 0 seconds,
Batch size: to 1
And set Lambda to use unreserved account concurrency 1000Suppose the case: One SQS... | AWS Lambda SQS integration: How to force concurrent lambdas |
Since SonarQube 4.0, you can defineissue exclusion patternsbased on rule key and file path pattern.On previous versions, you can rely upon theSwitch Off Violations plugin.ShareFolloweditedApr 5, 2022 at 18:18Sjeiti2,54811 gold badge3131 silver badges3434 bronze badgesansweredJan 14, 2014 at 9:03MithfindelMithfindel4,64... | I've got a project I'm working on and some of the files violate some of the rules, but in ways that are not real issues, and are thus distracting noise. However, I don't want to disable these rules globally, and I would prefer not to have to mark 'em as false positives one by one.Is there a way to disable Sonar rules f... | How to disable Sonar rules for specific files? |
You should not use the SonarQube Scanner with a dedicatedsonar-project.propertiesfile to run your analysis - but instead rely on theScanner for Maven.To see how to do this, simply take a look at how SonarQube itself (that contains both Java and JS) is analyzed:Go on itsGitHub repositoryAnd take a look at theserver/sona... | I have been trying to set up sonar-scanner for a Maven project containing a java module (core) and a javascript module (web).I am able to get either java coverage data scanned and presented on my local sonarqube server, or javascript, but not both.Here is my sonar-project.properties file, where the sonar.modules proper... | How to configure Sonarqube scanner for java and javascript in the same project |
There are no methods per se or silver bullet really, essentially what you are trying to do is almost trying to rewritekubectlin Java.You should be able to achieve it decoding the YAML using something likeJacksonorSnakeYAMLand use all the different components in theKubernetes client, like Create namespaces, pods, deploy... | I would like to execute an operation on Kubernetes likekubectl apply -f stuff.yamlfrom a java program. I don't want to invoke kubectl from my Java program, instead, I would like to use the JavaKubernetes client. After looking at the API classes in the project I wasn't able to figure what methods I could use to achieve ... | How could you implement `kubectl apply -f stuff.yaml` with the java Kubernetes Client |
0
When I had the same issue, Google brought me right to this page, so I think it's important to share an answer.
tl;dr I added the following configuration to the location in my nginx config file:
proxy_set_header Accept-Encoding "";
The explanation why it works is here: ht... |
I am trying nginx subfilter module as shown below. I am routing the traffic to reactjs.org and making dynamic text replacements using nginx sub_filter module. The below nginx configuration is not working on any react based websites where I change the text 'React' to 'Test'. How do I overcome this?
location / {
pro... | nginx sub_filter module not working with REACT websites |
these.htaccessrules should help you get startedRewriteEngine On
RewriteBase /
#### this allows you to write your links in the form /folder/home ####
RewriteRule ^folder/([0-9]+)$ folder/index.php?page=$1 [NC,L]
#### to dynamically redirect to /folder/home ####
RewriteCond %{THE_REQUEST} /(?:index\.php)?\?page=([^&\s... | My current link is:domain.com/folder/index.php?page=homeand i try to get it to this:domain.com/folder/homeThe PHP code that I use to get the page<?php
if (isset($_GET['page'])) {
$page = $_GET['page'];
} else {
$page = 'home';
}
if (strpos($page, '/') !== false || !file_exists("pages/$page.php")) {
$page = 'error';
}
i... | Do not get mod_rewrite working with $_GET['page'] |
I found that there was a post status to Github in my post build options.
That successfully gave me the results I wanted. | I have a Jenkins server that is behind a firewall (Boss's Orders), can't be accessed outside of the office unless on the vpn. I'm trying to set up continous integration for our rails team. I have the job to run our tests going whenever there is a commit/merge in the publicly hosted repo on github.com. My question is, h... | How to get Jenkins to push build status to Github from behind a firewall |
What about this:rasphone -d a -f e:\vpn.pbk >nul && exit
rasphone -d b -f e:\vpn.pbk | this in my batch file command:@echo off
rasphone -d a -f e:\vpn.pbk >nul || (
rasphone -d b -f e:\vpn.pbk
)
exit 0I wanna connect to vpn "a" and if it fails try next one ( vpn "b") but when vpn "a" facing an error the command stops until I close the error window!
I'm using Windows 7 x86 SP1 and I have unchecked "Displa... | Connecting VPN using Rasphone and | | command in a Batch File |
shared_ptr<>::reset() will drop the refcount by one. If that results in the count dropping to zero, the resource pointed to by the shared_ptr<> will be freed.
So I think the answer for you is, yes that will work. Or you can simply let the screenFont variable be destructed due to dropping out of scope or whatever, if... |
I'm storing an object (TTF_Font) in a shared_ptr that is provided to me from a third-party API. I cannot use new or delete on the object, so the shared_ptr is also provided a "freeing" functor.
// Functor
struct CloseFont
{
void operator()(TTF_Font* font) const
{
if(font != NULL) {
TTF_Clos... | Using .reset() to free a boost::shared_ptr with sole ownership |
Because, as you noted, SonarQube is designed for static code analysis, you're going to have a hard time with the 'virtual' resources route. Analysis looks at the directories and files in the source directory. No file, no SonarQube resource, and nowhere to attach metrics.If you're determined to do this, then you should ... | I'm looking for a way to report NFR/performance quality metrics of a code, these metrics comes from the execution of unit tests and can be for example the average, minimum and maximum response times statistics, number of executions and other custom metrics.For this, i'm thinking to create "virtual" resources that are n... | How to report Performance merics/ Non Physical resources in SonarQube |
I found the solution to my question after lots of searching and testing and it's quite simple. The solution is to start the nginx proxy manager docker container onthehostnetworkinstead of thebridgenetwork. Then, you can use localhost and then the port to refer to which service you want to redirect to. | I am trying for nginx proxy manager (running in a docker container) to connect to another docker container that has port 8080 open on it. When I setup the proxy to connect to192.168.0.29:8080the ip address of the host, but it doesn't work, the browser just says that the site didn't send any data.I tried setting up the ... | Nginx proxy manager is not being able to serve the page from another docker container |
Volumes are treated as mounts in Docker, which means the host directory will always be mounted over the container's directory. In other words, what you're trying to do isn't currently possible with Docker volumes.
See this Github issue for a discussion on this subject: https://github.com/docker/docker/issues/4361
One ... |
I have a docker container that holds a django app. The static files are produced and copied to a static folder.
container folder hierarchy:
- var
- django
- app
- static
before i build the docker image, i run ./manage.py collectstatic so the static files are in the /var/django/static folder. To e... | expose files from docker container to host |
Have your Firewall allow port 135 and the dcom port range. By default, the dcom port range is 1024-65535. Thats a big range to open up. You can limit this range in the registry or using dcomcnfg. This post describes this:http://blogs.msdn.com/distributedservices/archive/2008/11/12/troubleshooting-msdtc-issues-with-the-... | Closed.This question isoff-topic. It is not currently accepting answers.Want to improve this question?Update the questionso it'son-topicfor Stack Overflow.Closed11 years ago.The community reviewed whether to reopen this questionlast yearand left it closed:Original close reason(s) were not resolvedImprove this questionW... | MSDTC and firewall [closed] |
Urls can be overriden by this:
git config --global url."https://github.com/".insteadOf '[email protected]:'
I am just wondering if there is a way to avoid --global but still let sub/submodules use https over git.
|
I have a git project with a submodule as a dependency which in turn has others submodules dependencies.
Those sub/submodules are configured to be cloned using ssh but my Jenkins must use https.
(Unfortunately I can't change submodules configs)
(Unfortunately I can't change Jenkins)
Is there any way to tell git to clon... | Force git to clone submodules using https protocol |
I've found the reason.
Query string parameter is using in my URL, so it looks like "http://localhost/Image.ashx?id=49". I've thought that if VaryByParams is not set explicitly, server will always take value of id param into account, because context.Response.Cache.VaryByParams.IgnoreParams is false by default. But in fa... | I'm using output caching in my custom HTTP handler in the following way:public void ProcessRequest(HttpContext context)
{
TimeSpan freshness = new TimeSpan(0, 0, 0, 60);
context.Response.Cache.SetExpires(DateTime.Now.Add(freshness));
context.Response.Cache.SetMaxAge(freshness);
conte... | Output caching in HTTP Handler and SetValidUntilExpires |
Taking a look at the source code, it looks like in the RepositoryService classthere is a methodfor pulling all of the branches of a repository. Based on their sample code, I think a request would look like this:RepositoryService service = new RepositoryService();
RepositoryId repo = new RepositoryId("rails", "rails");
... | I'm using the org.eclipse.egit.github.core api with Java. But I have not found anywhere like from a given repository I can list all the branches that it has inside. | How can you list the secondary branches with the github API? |
As pointed by @pgayvallet on GitHub:
As the daemon runs inside a VM in Docker Desktop, it is not possible to actually share a mac host device with the container inside the VM, and this will most definitely never be possible.
|
I'm trying to run a Docker container with access to a serial port on the host.
Here is what I did:
I used a Mac
Installed drivers on the host
(http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=229&pcid=41)
Plugged in the device
Ran ls /dev/t* that returned
/dev/tty.usbserial - so it worked
Ran the container, docker... | Docker container can't see a serial port device |
You can try to run Android_x86 in VirtualBox (Oracle WM).To do this, create a VM (chooseLinux > Other Linuxfor OS), start it,and mount the Android_x86 ISO file as a CD-ROM.I'm usingandroid-x86-2.3-RC1-eeepc.iso.
It can be downloadedhere.Try it! It's easy. | I've been trying to run the AVD for Android r14 inside a Virtual Machine using VMWare with almost no success. The r11-r13 versions were painful in the extreme but with r14, it has finally reached the unusable stage.Clearly the best option is not to run inside a VM but this is being forced upon me by requirements.I've t... | Android E(ICS / 4.0) emulator inside Virtual Machine (VMWare) |
That's correct; when you submit the pod spec to the Kubernetes API it will contain that literal string including the$(...)references (and also thesecretRef:blocks and not the values of the secrets).When Kubernetes creates the Pods and starts the containers, at that point the cluster itself will fill in all of the envir... | I am using helm 3, and would like to concatenate 3 secretRefKeys into a single value of Env Var.This is my cronjob.yaml file:apiVersion: batch/v1
kind: CronJob
metadata:
name: my-cronjob
spec:
schedule: {{ .Values.cron }}
jobTemplate:
spec:
template:
spec:
initContainers:
... | Helm concatenate secretKeyRef into one env var |
This was not an issue specifically with the master branch.
The issue was caused by the Travis environment variable, TRAVIS_COMMIT_MESSAGE. When you merge a PR on GitHub, the default commit message has a "message" and a "description", separate by a line break. Having that line break in the TRAVIS_COMMIT_MESSAGE caused ... |
I have a weird issue. Travis OSX builds keep failing because a Jasmine unit test doesn't pass. But, this ONLY happens for commits against the main GitHub repo's master branch. Forked repos, PR's on the main repo, etc do not have this issue. Here are a couple of scenarios:
I sync local master from upstream master an... | Travis build only fails for main repo master branch |
For me the solution was to enlarge proxy-buffer of nginx by adding the following Ingress Annotations for the Kibana Nginx Ingress:annotations:
nginx.ingress.kubernetes.io/proxy-buffer-size: 16k
nginx.ingress.kubernetes.io/proxy-buffering: "on"
nginx.ingress.kubernetes.io/proxy-max-temp-file-size: 1024m | I am using version 7.16.2 of Kibana. I am adding a dropdown filter in Canvas.Let's say the index pattern is*-*_stage. This index pattern includes 100 data streams. When trying to add this index pattern in the Canvas dropdown filter, I am getting this error:Can anyone please help me resolve this issue ? | Kibana Canvas error: Invalid string. Length must be a multiple of 4 |
You have the list of outbound FQDN's that the gateway needs to communicate with, so this isn't really a question relating to Azure, it is whether your firewall (you do not mention what this is) can be configured to allow outbound connections to FQDN's rather than IP's, you would need to consult whoever manages your fir... | I'm trying to install powerbi data gateway on-prem. So as per the pre-requisites, I need to allow some domain/IP for the outbound firewall.As perthisIt is recommended that you whitelist the IP addresses, for your data
region, in your firewall. You can download theMicrosoft Azure Datacenter IPlist, which is updated we... | How to allow the azure data center IP address dynamically in firewall |
I don't know if I understood the problem correctly, but if you just want to test simple code while the course platform doesn't work properly, you can also use a free online C compiler like the one here or even download a local compiler on your machine for more sophisticated programs in the future and not be at the mer... |
Hello I am new to coding I'm currently doing the Harvard cs50x course and we use a code space on GitHub for C and it is no longer loading properly. It either loads fast and I am met with a white background, all the code being normal text, and I can not type in the terminal.
Example:
Code space
If it does not load fast... | How can I resolve an issue with a github code space for C? |
3
I think you must create a new Branch for this 2 commits. Than you can create a pull request for this Branch.
I can not think of anything else ...
Share
Improve this answer
Follow
answered Jun ... |
Suppose I have two branches: master and feature. In feature, I made several commits (say, five commits). What I want is to select two of these five commits, move these two commits into a pull request and them push this request to master. Is it doable in GitHub web interface? I saw the solutions with git cherry-pic, bu... | GitHub: is it possible to create a pull request with selected (not all) commits in a branch and push it into another branch? |
so, you want if mongo connection fails. it should not crash the app.
you can juust handle theerrorcallback and do whatever you want.
in my case, i'm re connecting the DB, if its failing.
like below:var mongoose = require('mongoose');
var connection = mongoose.connection;
connection
.on('error', funct... | I have a nodejs app which uses mongodb and runs on k8s . But I am getting a problem whenever I change mogodb address, the k8s pod hangs and I've to restart to the pod to make it work again. So I think it happens because node service crashes at that time.
How can I write my code to connect to mongodb in a way that the ... | mongodb connection error causes kubernetes pod to hang and restarting the pod fixes the issue |
Amazon Elasticsearch Serviceprovides a fully-managed implementation of Elasticsearch and Kibana. It is commonly used for near real-time visualizations of logs files (but can handle many use-cases).Amazon CloudSearchis based on Apache Solr. It requires data to be loaded asdocumentsand is good for full-text search, with ... | When should I use AWS Elasticsearch over AWS CloudSearch and vice versa? | What is the difference between AWS Elasticsearch and AWS CloudSearch? |
PrerequisitesI have a SonarQube server setup in Azure on a Linux WebAppI have installed the following Azure DevOps [extension](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqubeI have setup a SonarQube service connection ("SonarQube Service Connection") to my SonarQube server in Azure. You will f... | Phase LibraryBuildGated: Step input SonarQube references endpoint 17xxxxc3-4xx0-4xx4-9xx2-617fxxxxxxxx which could not be found. The service endpoint does not exist or has not been authorized for useThanks
-Edited Question | Trying to add SonarQube - SonarAnalysis task in YAML build template for VSTS as a build task |
There's a little bit of magic involved that's intended to make DNS in Kubernetes more convenient from within a pod. Let me try to explain.The way that the DNS names are constructed within Kubernetes is<service-name>.<namespace>.kubernetes.local. This is whykubernetes.localis resolving from on your node, butmy-service-n... | I'm using google container engine and I can create pods and services in my cluster. But when I try to use the DNS feature (skydns) to lookup my services nothing is being found. If I log in to the non-master node, I can see the DNS container and can use 'host' command to do DNS lookup (installed with apt-get). But I can... | skydns troubles - i must not 'get it'? |
So a workaround that can stabilize situation for a while (giving your time to mount a larger volume for storing images) is to start using local images cache, by changingimagePullPolicyin yourDeployment(orPod) manifest to:spec.containers.imagePullPolicy: "ifNotPresent"One situation I've encountered where such quick stor... | I have searched many websites and articles but not found any perfect answer. I am usingeks version 1.18. I can see a few of the pods are "Evicted", but when trying to check the node I can see the error "(combined from similar events): failed to garbage collect required amount of images. Wanted to free 6283487641 bytes,... | failed to garbage collect required amount of images. Wanted to free 6283487641 bytes, but freed 0 bytes |
--logging-format=jsonis a flag which need to be set on all Kuberentes System Components ( Kubelet, API-Server, Controller-Manager & Scheduler). You can check all flagshere.Unfortunately you cant do it right now with AKS as you have the managed control plane from Microsoft. | As part of kubernetes 1.19,structured logginghas been implemented.I'vereadthat kubernetes log's engine isklogand structured logs are following this format :<klog header> "<message>" <key1>="<value1>" <key2>="<value2>" ...Cool ! But even better, you apparently can pass a--logging-format=jsonflag toklogso logs are genera... | How to pass a flag to klog for structured logging |
You are correct: the former will always create a new token (potentially matching an existing one), whereas the latter will either return an existing token matching the POST data, or create and return one should it not already exist. | What is the difference betweenPOST /authorizationsandPUT /authorizations/clients/:client_idin the GitHub API? Both receive aclient_id(the latter in the URL, the former in the POST parameters). What is the difference? | What's the difference between these authorization APIs? |
I can keep it very short. You will need to use PHP to execute the console.* * * * * php -q /usr/bin/php /var/www/myProject/bin/console desktop:auction_end > /dev/nullWriting the output of a cron job that you are testing to a file will help you debug errors. All output is now lost in the void :)* * * * * php -q /usr/bin... | I have this simple command in symfony :use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class AuctionEndCommand extends Command
{
protected function configure()
{
error_log(print_r('test',true), 3, "/tmp/error.l... | How to execute a Symfony command as cron job? |
try_filesneeds two parameters, so you could use a dummy value to replace thefileterm. For example:try_files nonexistent /index.php$is_args$args;Seethis documentfor details.But the neater solution is probably arewrite...laststatement:rewrite ^ /index.php last;Therewritedirective will automatically append the query strin... | I have done a load of searching for an answer for this and I cannot find a suitable answer.Basically, I have a site built in SilverStripe running on NGINX. It all works pretty well, but I want any files/images uploaded via the admin (to the assets folder) to be resolved via index.php in the site root (so we can check p... | How to get NGINX to execute all URL's in a folder via index.php |
This error means that themasterbranch on Heroku contains commits that arenotin your local branch.You can either pull the missing commits from Heroku and merge them into your local copy:git pull heroku masterOr, if you don't care about the missing commits you can force push to Heroku. This will overwrite the remote repo... | I am trying to update the code from my application to my repository and an error appears.How can I fix it?C:\Sites\ecozap>git push heroku master
Enter passphrase for key '/c/Users/Diseño2/.ssh/id_rsa':
Fetching repository, done.
To[email protected]:ecozap.git
! [rejected] master -> master (non-fast-forward)
erro... | Error with 'Git push heroku master' command |
You can use the below Java code to get thes3clientinstance when you are trying to connect to S3 bucket from EC2 instance.AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
.withCredentials(new InstanceProfileCredentialsProvider(false))
.build();This is the recommended way as the applicatio... | I want to upload a file to S3 without using my access and secret key fromAWSserver. AWS keys should be taken as default. However running the below command in server I can access it without providing any access and secret keys.aws s3 cp somefile.txt s3://somebucket/From java code its not accessible since it was unable t... | AWS S3 upload without access and secret key in Java |
1
Call
# substitute placeholders accordingly ($OWNER $REPO $TAG)
curl -L "https://api.github.com/repos/$OWNER/$REPO/releases/tags/$TAG"
and extract the name and body keys from the returned JSON.
Share
Improve this answer
Follow
... |
I need to extract content from a project's GitHub release notes, in automated fashion.
The surrounding HTML content of the website is not needed and tends to complicate parsing.
Does GitHub provide a plain text URL for the release notes (similar to the raw view for files), or do I have to work with the HTML anyway?
| Possibility to get GitHub release notes as plain text URL? |
getFilesDir() >> It is used for permanent storage directory.getCacheDir() >> Returns application specific cache directory on the file
system. The system could automatically delete files in this
directory in some cases such as when memory is almost full. | In Android you can use getFilesDir() to get a path to your internal /files/ folder, whereas getCacheDir() gets you a path to your internal /cache/ folder.Is the onlyfunctionaldifference between these two folders the fact that Android may auto-clear some files in the cache directory if needed?I am trying to understand t... | getFilesDir() vs getCacheDir() |
This is likely caused by a corrupted Elasticsearch index. Shut down your server, delete$SONARQUBE_HOME/dataand restart. | Hi guys when I useJenkins+Maven+SonarI found that when I delete a project in sonar and then I run the job in Jenkins
the total project number in sonar is never reduced . It just repeated increment .
Even I deleted the database and run again the number of project in sonar cant be reduced.Is there some cache in sonar?
... | Jenkins + Sonar project numbers in sonar is nerver reduce |
The crontab entry should look like this :
* * 1 * * cmd_to_run
The columns mean
every minute
every hour
1st day of month
every month
any day of week, and then the command.
I'm not sure about cpanel admin
|
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they di... | Cron job to run every 1st day of the month [closed] |
cache/missreturns a new cache object that you need to use for further operations.Ex:user=> (cache/has? (cache/miss fifoc :foo "bar") :foo)
trueYour example becomes:user=> (def fifoc (atom (cache/fifo-cache-factory {})))
#'user/fifoc
user=> (swap! fifoc #(cache/miss % :foo "bar"))
{:foo "bar"}
user=> (cache/has? @fifoc... | I just added clojure.core.cache 0.6.1 to my project, did a lein deps, followed the very short and clear example here:https://github.com/clojure/core.cacheand it just flat out does not work.Example:$lein repl
REPL started; server listening on localhost port 20513
user=> (require '[clojure.core.cache :as cache])
nil
user... | clojure.core.cache just does not work using their own example |
From the Speedb Hive:
there is a parameter in table_options called: prepopulate_block_cache the default is disabled but you can set it to flush-only.
You can find the Speedb hive here and (once you've registered) the link to the thread with your question here, if you have more questions or need additional info
|
I have a few column families which have references to each other -- to construct a "full object" I need to join data across them. The upstream providing me with data often provides updates across cross-referenced items in multiple column families around the same time, but there's no guarantee about ordering. When I ge... | how does RocksDB cache writes? |
Regex expressions can have 5 or 6 placeholders. Not every framework/implementation supports both ways so you have to check which format you need.Your expressioncron: "5 * * * * *"would run every minute exactly 5 seconds past the minute.
I think in your case, you could use only 5 placeholders which means that you can no... | I need to run a task precisely on 10AM every thursday,on resque yaml file I am trying thiscron: "* 10 * * 4 * America/New_York" # expecting this to shoot out every thursday..Was that correct? I can't test it out as I can't wait for such an interval, so I tried to test it at least for every 5 mins but it isn't very pro... | cron on resque scheduler not working on preferred intervals |
If self.myString is a retained property, the second example has to be
-(id)init {
if (self = [super init]) {
self.myString = [[[NSString alloc] init] autorelease];
}
return self;
}
or it will leak. I can only assume this is the case and the first example simply wants to avoid using autorelea... |
In almost all of the books I read and examples I go through I see pointers initialized this way. Say that I have a class variable NSString *myString that I want to initialize. I will almost always see that done this way:
-(id)init {
if (self = [super init]) {
NSString *tempString = [[NSString alloc] init... | Why do they initialize pointers this way? |
You can use --sig-proxy=false to prevent signals being passed to container and detach using Ctrl+C:
docker attach --sig-proxy=false container-test
This seems to be a known issue:
https://github.com/docker/for-mac/issues/1598
|
For some reason, I can't detach from Docker containers after running docker attach <container>. The documentation says to use Ctrl-p, Ctrl-q, but that doesn't seem to work. I've also tried ctrl-q + ctrl-p (combination, as opposed to in-sequence) and ctrl-shift-q, ctrl-shift-p and ctrl-shift-q + ctrl-shift-p. Even sett... | docker attach: Why can't I detach from my Docker container? |
If somehow the GitHub Destop did not add an internal Git to your PATH, you can do so manually with the latestGit for Windows release.Uncompress the archivePortableGit-2.15.0-64-bit.7z.exeanywhere you want andadd it to yourPATH(as I do here), then launch GitHub Desktop. | Not a duplicate of'git' is not recognized as an internal or external commandI've set up my github repository, downloaded Github Desktop, but I can't figure out how to upload files to the repo.Here are Github's instructions for meI've done the "quick set up", and have set up github Desktop on my computer. However, I can... | 'git' is not recognized as an internal or external command [Windows] |
https://help.github.com/articles/set-up-git#platform-macShould walk you though installing it. | I've installed Github for Mac.I've realised that I need to get to the command line to do some stuff.There is an option in Guthub for Mac to install a command line. All this seems to do is create an alias called Github in /usr/local/bin that points back to the Github for Mac application.Double clicking it opens a termi... | Installing Git separately from Github for Mac |
if I buy a CA certificateyou can't buy a CA certificate (with small exception, which is not your case). You are purchasing an end-entity certificate which cannot be used to sign other certificates. It is controlled by aBasic Constraintscertificate. Any standard validation code will reject any certificate that is signed... | When I use self-sign certificate, I made a self-CA.cer and a server.cer, server.cer is for web service and self-CA.cer is added in client code. When I check certificate , I check if server.cer is from this self-CA.cer, right?
But, if I buy a CA certificate, what I only got is a server.cer generated from CA, right? and ... | After I buy a CA certificate, will I also trust other companys' service certificate which generated from this CA certificate? |
0
Your nginx config seems correct, but you need to change your frontend app and configure it to properly append the urls.
I faced the same error when I was calling some backend APIs from my frontend on azure cloud. If you just want to enable websocket connection, you need t... |
I've deployed an application on Digital Ocean with nginx. I've reverse proxyed my frontend port 8081 and made it ssl secure with Let's Encrypt. Now I need to secure my websocket server on port 8080 to prevent it from giving me this error "ERR_SSL_PROTOCOL_ERROR".
This is my current nginx config
server {
listen 80;... | ERR_SSL_PROTOCOL_ERROR even though my nginx config is configured |
Figured this out -->
In my setup, I have 4 docker containers running tomcat servers on port 8080 and mapped to ports (9000, 9001, 9002 & 9003) and an Apache Webserver running on port 443 on my ubuntu (v16.04) server. Apache has a reverse proxy configured to forward requests to individual docker containers. This part w... |
In my docker-compose.yml (version - 2.3), I have setup a healthcheck for couple of services. Here is the relevant yml snippet -
healthcheck:
test: ["CMD-SHELL", "/secrets/authz_Startup.sh"]
interval: 30s
timeout: 30s
retries: 3
start_period: 300s
Here is my authz_Startu... | docker compose healthcheck issue |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.