Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
You can safely ignore the mongodb data files.Usually the data files are not included in the project structure. You only need those files on your development machine so you can run your app locally. Once you deploy the application into production, you'll connect to a different database which is likely to be an entirely ... | I am fairly new to NodeJS and MongoDB, I started a new project with a MEAN stack with Webstorm. I have an empty base project and want to commit it to Github.I have a directory called "data" for the MongoDB part of the project. Just setting this directory up with MongoDB loaded it up with 300mb of files. Is it safe to g... | NodeJS with MongoDB - Pushing project to Github |
+50You can use theeventcommand ofkubectl.To filter for a specific pod you can use a field-selector:kubectl get event --namespace abc-namespace --field-selector involvedObject.name=my-pod-zl6m6To see what fields are possible you can usekubectl describeon any event.ShareFolloweditedAug 20, 2018 at 13:24answeredAug 20, 20... | When I runkubectl -n abc-namespace describe pod my-pod-zl6m6, I get a lot of information about the pod along with the Events in the end.Is there a way to output just the Events of the pod either usingkubectl describeorkubectl getcommands?Edit:This can now (kubernetes 1.29) be achieved via the following command -kubectl... | kubectl get events only for a pod |
Read the entire file, create a batch with shape(10k, 50)and give it to the model:result = model.predict(inputData) | Closed. This question needs to be morefocused. It is not currently accepting answers.Want to improve this question?Update the question so it focuses on one problem only byediting this post.Closed6 years ago.Improve this questionI would like to know if it is possible to read several lines from a file in parallel with my... | Reading lines in parallel with Keras (GPU) [closed] |
Figured it out, the checkToken function needs to look like this:function checkToken(providedIdentity, token, fn){
var param = {
IdentityId: providedIdentity,
Logins: {}
};
param.Logins['cognito-identity.amazonaws.com'] = token;
cognitoidentity.getCredentialsForIdentity(param,
fu... | I am building an authentication system using aws lambdas, dynamodb and cognito.Am stuck at comparing the token provided from the getOpenIdTokenForDeveloperIdentity(); call with one from the server for the specific identity.Am getting the token and identity with:function getToken(email, fn) {
var param = {
I... | How to validate getOpenIdTokenForDeveloperIdentity cognito token |
2
If you have more than one class then separate out all the classes into their own files when you do the generation.
If you have one massive class then separate out method into separate files using the partial keyword.
Unless you have one class, with one method, that does... |
I have a very large C# file (auto generated from grammer - >100K lines).
When I try to create a solution and include this file - after about 10 seconds, VS crashes due to out of memory.
I see that it happens when its memory consumption reaches ~2GB. Is there any way to configure VS to use more memory? I am running thi... | Visual studio runs out of memory when opening a large C# file |
It looks like something bad happened to your docker-machine default machine.
To recover, do the following:
docker-machine rm -f default
Next, open the virtualbox GUI and make sure that there isn't a VM that corresponds with that old "default" VM, just in case. If there is, manually delete it from there.
Now, open the... |
I am using Docker version 1.12.2, build bb80604 and VirtualBox 5.1.6.
I was able to install Docker Toolbox correctly but I am not able to start the default VM.
I tried to follow the instruction given here but I am still getting The system cannot find the file specified error. I don't have Hyper-V enabled on system.
F:... | Docker not working in Windows10 |
GitLab comes withcontainer scanningby default, but I don't believe it's possible to achieve this level of granularity. This might be possible in a pipelineusing Trivy for scanningin conjunction withcustom Trivy policiesto detect misconfigurations in Dockerfiles. It will take some trial and error to detect and write cus... | For some security reasons, all of our projects are not allowed to define the environment variables inDockerfile,entrypoint.sh(for starting the application). Currently, we have to review each merge request manually to ensure this rule, I wonder if there is some ci tool to automate this work to make life easier, thanks! | CI tools for static checking of environment variables definition |
You have to use git push for that.git add "directory/fileName"
git commit -m "your comment here"
git push origin masterFor more detailed info:How To Upload Files on GitHub | hello i have a folder with the application on the computer and I have to put it to a remote repository on the server and run on the server (so that all developers see the change) using git.
How to do it.
I will add that on your computer and the server is installed git.
Thanks for the help. | How to Commits changes from the local computer to a remote repository on the server using Git |
Addproxy_intercept_errors on;tolocation /photos. Then yourerror_page 404 /myerrorfile.jpgwill work even when the 404 error comes from the upstream server. | Hi I would like configure my nginx server to proxy for amazon S3 and do something like mod_rewrite in apache - if proxy for amazon is 404 (file does'nt exist on amazon) then redirect me to my local file. It's possibble to do ?This is my nginx config file:upstream app{
server 127.0.0.1:3000;
}
server {
listen 0.0.0.... | nginx proxy and 404 redirect |
My clean install of Alpine had an /etc/apk/repositories file that looked like
#/media/cdrom/apks
http://mirror.reenigne.net/alpine/v3.13/main
#http://mirror.reenigne.net/alpine/v3.13/community
#http://mirror.reenigne.net/alpine/edge/main
#http://mirror.reenigne.net/alpine/edge/community
#http://mirror.reenigne.net/alp... |
I see that Alpine supports in its Docker container a MariaDB ODBC Driver as listed here. I need to install it to be used with pyodbc.
What is the Dockerfile command that installs the driver in the image?
Something along the lines of RUN apk add mariadb-connector-odbc
?
| How to install MariaDB ODBC drivers in Docker/Alpine |
First, I see thatwith C, not Python, on GitHubIt defines a command table, whose structure is (here for instance):/*
* The command table entry data structure
*/
typedef const struct
{
char * cmd; /* command name user types, ie. GO */
int min_args; /* min num of args comma... | In Python I observed some projects having an index file(in common folder) with all test names and paths indexed correspondingly using UIF_CMD structure. Even in git hub I found some code using this structure. How should I understand this.Let's suppose there is this project with 5 test cases and we write index file{ or ... | In Python, what is UIF_CMD and how does it work? |
It will always compile without error.Whether it's a good thing to pass a pointer into a function and delete it in that function is potentially another story, depending on the specifics of your program.The main idea you need to consider is that of "ownership" of the pointed-to data. When you pass that pointer, does the ... | Is it okay( and legal) to delete a pointer that has been passed as a function argument such as this:#include<iostream>
class test_class{
public:
test_class():h(9){}
int h;
~test_class(){std::cout<<"deleted";}
};
void delete_test(test_class* pointer_2){
delete pointer_2;
}
int main(){
test_class* ... | Using delete on pointers passed as function arguments |
I have a multi line command using backslash to separate the lines as follows:- name: Configure functions
run: |
firebase functions:config:set \
some.key1="${{ secrets.SOME_KEY_1 }}" \
some.key2="${{ secrets.SOME_KEY_2 }}" \
...Note the preceding '|' character, and make sure the subsequent lines af... | I have a Github action command that is really long:name: build
on: [push]
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Install Prerequisites
run: |
sudo apt-get update
sudo apt-get install -y --n... | Github Action: Split Long Command into Multiple Lines |
This is an open issue with pre-signed S3 upload URL:https://github.com/aws/aws-sdk-js/issues/1603Currently, the only working solution for large upload through S3 pre-signed URL is to use multi-part upload. The biggest drawback of that approach is you need to let the server that signs the upload know the size of your fi... | I'm trying to upload a file into a customer's S3. I'm given a presigned URL that allows me to do aPUTrequest. I have no access to their access and secret key so the use of the AWS SDK is out of the question.The use case is that I am consuming a gRPC server streaming call and transforming it into a csv with some field c... | Streaming uploading to S3 using presigned URL |
If you delete a Branch in git only the named ref is removed, the commits which store the source are still around and can viewed withgit reflogor restored (as describedhere). Therefore deleting a branch does not free any diskspace (out of a view kb's). This commits are calleddangling commitsbecause there is no branch / ... | I created a branch from the master, and have been adding and deleting a large number of binaries into the branch, As a result, the repo size has bloated to thrice its original size. I have removed the binaries and deleted the branch but the repo size does not change. How can i minimize the repo size? | How to remove my local branch history without affecting the master |
One thing i can suggest after reading the scenario is that, You want to split your workflow in two Dockerfiles, As far as i know, you can easily break them.
Maintain your first Dockerfile, which will build an image with your python code code_which_takes_time.py executed, commit that image with name "Root_image".
After... |
I am new in docker world. So I have existing Dockerfile which somewhat looks like below:
# Base image
FROM <OS_IMAGE>
# Install dependencies
RUN zypper --gpg-auto-import-keys ref -s && \
zypper -n install git net-tools libnuma1
# Create temp user
RUN useradd -ms /bin/bash userapp
# Creating all the required f... | Running Docker Parent image and Base image on top of parent image |
A2020 answerstates:The GitHub global search (top-left bar on any page onhttps://github.com) seems to have an implicitANDbetween all search fields, and an implicitORbetween fields you reuse:So:is:open is:pr reviewed-by:@me -reviewed-by:xyzshould act as:is:open AND is:pr AND (reviewed-by:@me OR -reviewed-by:xyz)Which mig... | I am looking for a way to build a filter like:Reviewed by me but not reviewed by user xyzI know I can do a OR search for labels but I cant find anything for other properties.What I expected to work wasis:open is:pr reviewed-by:@me -reviewed-by:xyzIs it possible to do something like this?If not, is it possible to
export... | Can I filter Github issues using parameters multiple times? |
One possible solution is using ssh tunnel sharing the docker.sock file => registered services will be exposed to other machinesssh -nNT -L /tmp/docker.sock:/var/run/docker.sock <USER>@<IP> &andexport DOCKER_HOST=unix:///tmp/docker.sock | I am looking to improve our development cycle, using multiple docker containers, used by multiple dev teamsCurrently each dev team is responsible of few services, that are dependant on other teams services. Meaning all dev teams need to run all containers locallyWhat i'm trying to figure out is how can a local containe... | docker overlay for local development and remote containers |
1
This is probably not going to help you right now, but the best way would be to redeploy the script from its original source or to restore it from version control or from a backup.
Share
Improve this answer
Follow
... |
How can we recover the deleted python script file(deleted using rm), say lostfile.py in debian linux box?
The file system of the linux box is jfs
| recovering the deleted python script file |
You cannot currently receive replies to SMS messages with Amazon SNS. We would like to provide expanded SMS support (more AWS regions, more geographic coverage, more functionality), but unfortunately don’t have timing to share. | I am trying with this sample code to send message using SNS API -BasicAWSCredentials cr = new BasicAWSCredentials("MYACCESSKEYS","mySecretKeys");
AmazonSimpleNotificationService sns = new AmazonSimpleNotificationServiceClient(cr);
string topicArn = sns.CreateTopic(new CreateTopicRequest
{
Name = "ses-bounces-topic",
})... | How can I get the reply of SMS that sent to a mobile device? |
After hearing from AWS support, it was confirmed that GUI is a must to install Mac apps.$ open /Applications/Docker.app
LSOpenURLsWithRole() failed with error -610 for the file /Applications/Docker.appThe above error was because installation of Docker.app requires a sequence of steps (subsequent next next options) and... | I started making use of EC2 Mac instances with Catalina. In order for some services to work I need to install docker. Importantly I want to install docker only through CLI without using GUI.I managed to install it withbrew install --cask docker. However, it doesn't work.When I try to runopen /Applications/Docker.app, I... | How to install and run docker.app on EC2 Mac instance |
You are totally right in saying that the description here is wrong and then you actually have no way to do not trigger the rule if you want to actually use fallthrough (and thus you might want either to mark issue as false positive in this case or deactivate the rule alltogether)calling the rule "broken" is an opinion ... | The rule squid:128 seems to exist to prevent fall-through in switch case unless explicitly stated. It seems a reasonable rule, as forgetting a break is a common mistake.However fall-through are perfectly valid when wanted.The Documentation of this rule states that the only way to achieve a fall-through is to use conti... | Sonar, S128: Switch cases should end with an unconditional "break" statement VS continue |
0
If you started your container using Volumes, try looking at C:\ProgramData\docker\volume for your backup.
The backup is normally located at: /var/opt/gitlab/backups within the container. So hopefully you mapped /var/opt/gitlab to either a volume or a bind mount.
... |
I have a docker desktop installed on my windows pc. In that, I have self-hosted gitlab on one docker container. Today I tried to back up my gitlab by typing the following command:
docker exec -t <my-container-name> gitlab-backup create
After running this command the backup was successful and saw a message that backup... | Gitlab-CI backup lost by restarting Docker desktop |
If you're willing to invest some more work and resources into this, you can probably automate this withpull requestsand theGitHub API.I don't have the source code, but I know an example where someone did exactly this:https://github.com/robashton/crowdsourcedhomepageQuote from the readme:Stick anything ( ͡° ͜ʖ ͡°) you l... | Is there a way to give commit access to everyone on a public repository on GitHub? I want to use that repo as an alternative to GitHub Wiki. | Give commit access to everyone on GitHub |
These projects might help you out -- I haven't used them personally but have done some research in the past about how QlikSense might be integrated with source control: these tools appear to let you export a QlikSense App to JSON and also restore from such. That JSON can be stored in source control.https://github.com/m... | I use Git to track my Qlikview dashboards using the method described in this link:https://biexperience.wordpress.com/2013/10/30/using-git-with-qlikview-to-version-control-your-projects/I am unable to find documentation to help me track QlikSense dashboards using Git. Any solutions? Thank you. | QlikSense version control with Git? |
Looking through thenginxsource, it appears that the only mechanism that would modify the permissions of the temporary file is therequest_body_file_group_accessproperty of the request, which is consulted inngx_http_write_request_body():if (r->request_body_file_group_access) {
tf->access = 0660;
}But even that limits... | We use the client_body_in_file_only option with nginx, to allow file upload via Ajax. The config looks like this:location ~ ^(\/path1|\path2)$ {
limit_except POST { deny all; }
client_body_temp_path /path/to/app/tmp;
client_body_in_file_only on;
client_body_buffer_size 128K;
client_max_body_size ... | Linux - client_body_in_file_only - how to set file permissions for the temp file? |
I think cargo is using a wrong linker due not detecting that it is a cross-compilation.
Try to add ENV RUSTFLAGS='-C linker=x86_64-linux-gnu-gcc' to your Dockerfile:
FROM rust:latest AS builder
RUN rustup target add x86_64-unknown-linux-musl
RUN apt update && apt install -y musl-tools musl-dev
RUN apt-get install -y ... |
I am trying to generate an image for my Rust service from a Mac M1 Silicon to be run on my x86_64 box in a Kubernetes cluster.
This is my Dockerfile:
FROM rust:latest AS builder
RUN rustup target add x86_64-unknown-linux-musl
RUN apt update && apt install -y musl-tools musl-dev
RUN apt-get install -y build-essential
... | Apple M1 to Linux x86_64: unrecognized command-line option '-m64' |
4
Look at the EtpUpdateNodeInformation function in gpumon.c. It queries for process statistic per GPU node. There can be several processing nodes per graphics card:
queryStatistics.Type = D3DKMT_QUERYSTATISTICS_PROCESS_NODE
...
totalRunningTime += queryStatistics.QueryResul... |
According to many sources on the Internet its possible to get GPU usage (load) using D3DKMTQueryStatistics.
How to query GPU Usage in DirectX?
I've succeded to get memory information using code from here with slight modifications:
http://processhacker.sourceforge.net/forums/viewtopic.php?t=325#p1338
However I didn't f... | C (Windows) - GPU usage (load %) |
The community never went forward with MADV_USERFAULT. Instead, a more robust solution called userfaultfd has made its way into the kernel.
https://www.kernel.org/doc/Documentation/vm/userfaultfd.txt
|
There have been some discussions to use a new flag in madvise() to tell the kernel not to handle page faults in certain memory ranges: lwn.net-1, lwn.net-2
As far as I am able to see, this flag hasn't found its way to the kernel source.
What's the current status of this work?
| What's the status of the MADV_USERFAULT flag in madvise()? |
The reason behind why re-push of an existing image tag does not work with Automated Triggers to Docker Registry is deployment reproducibility.
As a maintainer of Spinnaker repository mentions in their comment on issue: Spinnaker not triggering pipeline when new image is released to Docker registry:
This is the intend... |
The Spinnaker document says that a push to the Docker Registry will trigger Spinnaker Build.
We have configured the Automated Triggers to Docker Registry (AWS ECR)
However, the tag we are using is :latest
In the document it says Leave the Tag field blank. This will trigger on all new tags, but will not trigger on a re... | Spinnaker build does not trigger on a re-push of an existing tag (like latest) |
Try removing the first forward slash from all of the URL references. So, <link rel="stylesheet" href="/styles/style.css" /> would become <link rel="stylesheet" href="styles/style.css" />. This will turn it into a "relative" link, instead of an absolute link.
|
When I recorded the network activity of my project on https://zeddrix.github.io/bible-query/, and looked at the path of my style.css, the path should be like this: https://zeddrix.github.io/bible-query/styles/style.css to access my CSS.
But instead of having that, I keep on having https://zeddrix.github.io/styles/sty... | Image and CSS URL paths not resolving to correct locations in browser |
3
If you write your handler with a simple function (aka no arrow function), the this object will be binded to the fastify server:
exports.getBooks = async function (request, reply) {
console.log(this)
let data = {
book: 'Book 1',
author: 'Author 1'
... |
How to use fastify-redis plugin from other controllers or other.js while declaring the redis connection in server.js
server.js
const fastify = require('fastify')({ logger: false })
const routes = require('./routes')
fastify.register(require('fastify-redis'), { host: '127.0.0.1' })
routes.forEach((route, index) => {
... | Use fastify-redis from controllers in node.js |
You can use the master slave replication. Just dedicate one machine to do your indexing (master solr), and then, if it's finished, you can tell the slave to replicate the index from the master machine. The slave will download the new index, and it will only delete the old index if the download is successful. So it's q... |
I have a large index of 50 Million docs. all running on the same machine (no sharding).
I don't have an ID that will allow me to update the wanted docs, so for each update I must delete the whole index and to index everything from scratch and commit only at the end when I'm done indexing.
My problem is that every few ... | Solr indexing issue (out of memory) - looking for a solution |
Since you have been maintaining a nice linear Git workflow, I am going to suggest that you use rebasing to keep things the way they are.You can simply work in the office today as usual, and commit your work. When you return home to work, you can do agit pull --rebaseto bring in the changes from work. Your local branc... | I'm working on a software project.I use git / github.I'm currently the only developer.I usually work both from home place and from work place.Before starting any session, I do agit pull, and when finished, agit add . -A && git commit -m "my commit message" && git push --tags origin master(I have agitaddcommitpushalias ... | Forgot to push the commits |
I ended up using the following code:
---
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/02my_setup.sh":
owner: root
group: root
mode: "000755"
content: |
#!/bin/bash
set -e
. /opt/elasticbeanstalk/hooks/common.sh
EB_CONFIG_APP_CURRENT=$(/opt/elasticbeanstalk/bin/get-conf... |
For example, if I wish to mount a particular volume that is defined by an environment variable.
| How do you get access to environment variables via Elasticbeanstalk configuration files (using Docker)? |
This is really straightforward:Make sure that your build server runs SQ analyses with non-emptysonar.loginandsonar.passwordpropertiesUsually, the user corresponding to thissonar.loginis atechnical userIn the SQ Web Administration console, go to "Security > Global Permissions" and make sure that only the user correspond... | TheRelease notes for SonarQube 5.2indicate that scanners no longer access the database directly.With SonarQube 5.1, it's possible to ensures that the dashboard only ever shows reports on code in version control by configuring the database to only accept connections from the build server.With SonarQube 5.2, I wouldn't e... | How to secure SonarQube 5.2? |
5
Thanks to @Yilmaz, he figured it out.
make sure to run npm install in your terminal. Make sure you are in the same directory as where your package.json file is.
Share
Follow
answered Feb 20, 2023... |
So I used Vercel to start my next.js project. The project resides on in a repository on GitHub. I cloned the GitHub repository to my computer and when I try to run
"npm run dev"
I get a
"command not found error"
Any thoughts on why this may be? I think I'm in the right directory.
Screenshot of nextJS project in VsCo... | terminal returns "command not found" on "npm run dev" from Next.js application created through Vercel |
nginx rewrite rules example for Wordpress 3:server{
server_name *.example.com;
listen 80;
#on server block
##necessary if using a multi-site plugin
server_name_in_redirect off;
##necessary if running Nginx behind a reverse-proxy
port_in_redirect off;
access_log /var/log/nginx/example-c... | I'm trying to run a multi domain blog installation with WordPress and Nginx. The last step is to configure some rewrite rules in.htaccess(apache only) for the webserver. How do I translate this into Nginx rewrite rules?RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^files/(... | Multi Site WordPress rewrite rules in Nginx |
Ended up reading through the 12 factor app which inspired me to remove the Nginx proxying to Rails upstream altogether, and instead used it as a proxy cache which has an upstream of the external DNS name.
|
I'm currently trying to run two containers on a single host, one being an application (Ruby on Rails) and the other Nginx as a reverse proxy and cache. The app is running on TCP port 80. What I want to be able to do is bring down my application container, remove it and then bring it up again without having to restart ... | Looking up a container's address via its hostname dynamically in Nginx |
You need:the nvidia drivera recent version of docker-ce (19.03 or newer)and thenvidia container toolkitalso called "nvidia docker"You generally do not need CUDA (toolkit) or CUDNN installed on the base machine. Those can be in the container for use in the container.Seeherefor specific install instructions. | Closed.This question does not meetStack Overflow guidelines. It is not currently accepting answers.This question does not appear to be abouta specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic onanother Stack Exchange site, ... | Does NVIDIA Docker need CUDA installed? [closed] |
If you are using Elastic Beanstalk, you will find this prohibitive due to having to verify every domain each time you make a change (add a domain). This page explains it in more detail:http://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html | We run an online service, where our customers can have it running on either their own domain (customerX.com) or as a subdomain on our domain (customerX.ourdomain.com).We are interested in adding SSL support to all customers and was thinking of using ACM (Amazon Certificate Manager).However, I'm a bit insecure about the... | Amazon Certificate Manager - Multiple domains service |
2
Yes, and it is the same way.
To creates the URL /pages1 you create a directory called /pages1 and put an index.html file inside it.
To create the URL /pages/1 you create a directory called /pages and put a directory called 1 inside it and then put an index.html file insi... |
i have my own github pages.
username.github.io
i know if github pages can having 1 pages like username.github.io/pages1, but is there any way to make MULTIPLE pages like this?
username.github.io/pages/1
username.github.io/pages/2
| Github Multiple Page |
Install it into your home directory, and change the config so it uses a port higher than 1024:$ ./configure --prefix=/home/steve/nginx
$ make && make install
$ cd ~/nginx
$ vi conf/nginx.confChange:server {
listen 80;to:server {
listen 8080;Then start it:$ ./sbin/nginx
$ netstat -na | grep 8080
tcp... | Recently I rented a web server at a certain company. I have ssh access but no root privileges. They don't excpect users to actually use ssh the main way of deploying is ftp or some cms/clickibunti. The OS if FreeBSD and they have a Python installation(2.7.8).I downloaded virtualenv, Django and gunicorn (installed in th... | How to deploy nginx without root access? |
1
This issue can be solved by associating a VPC endpoint to your private API. This will generate a Route53 alias to your private API. From the documentation,
When you associate a VPC endpoint with your private API, API Gateway generates a new Route53 ALIAS DNS record whi... |
I have seen posts about this but no questions or answers that match my problem closely enough to provide a valid answer.
I can not send requests to the API through my browser.
The problem, as far as I understand is that when you send a request to the API-gateway; the browser will first send a preflight options reque... | Cors - how to handle preflight options request that requires a custom header? (AWS: private API gateway using a vpc endpoint) |
Thisdocumentsaysrequirements.txt—This file is used by pip to install all of the dependencies for your application. In this case, it contains only -e . This tells pip to install the requirements specified in setup.py. It also tells pip to runSo it tells pip to install the requirements specified insetup.py. | I'm following thisAWS CDK python getting started tutorialto learn how to use AWS CDK with python.I'm curious about the meaning of-e .inrequirements.txtfile, which is generated by AWS CDK. What does it mean?The document frompip install --helpsays-e, --editable <path/url> Install a project in editable mode (i.e. setupt... | What is the meaning of "-e ." in requirements.txt in aws cdk? |
3
This sometimes happens, the reason is the errors in php-fpm and xdebug (exactly)!
When I refactored my colleagues code, оne page on the project returned 502 Bad Gateway
Here's what I found:
php-fpm.log
WARNING: [pool www] child 158 said into stderr: "*** Error in `php-... |
Problem
When xdebug server is running from IntelliJ IDEA, I get 502 Bad Gateway from nginx when I try loading my site to trigger breakpoints.
If I stop the xdebug server, the site works as intended.
So, I'm not able to run the debugger, but it did work previously (!). Not able to pinpoint why it suddenly stopped work... | Nginx + php-fpm: Bad gateway only when xdebug server is running |
Short answer: no you can't.
Using the swap is not something applications do: the memory management system of the operating system is responsible of that.
If you need to load more than 2GB of data in your process in one time (and not retrieve data from disk per chunks as necessary), then you have a serious design probl... |
I was wondering if it is possible for C# to write objects to the pagefile.
I already know that a virtual machine for a .NET application is limited to allow one object to only use up 2 GB of ram and will run out of Memory long before that - even on 64-bit version of Windows.
However I need to be able to load a huge amo... | Can and will C# write objects to the pagefile? |
Your local repo config is still using the http mechanism, you need to switch it to the ssh one.
Standing in the main folder of the local copy, edit the .git/config file (with vim .git/config or using the editor you like)
Under the tag [remote "origin"] you will see the url attribute. It should be pointing to a http re... |
I setup my ssh key on my ubuntu production machine. As I am using the server for another project I know that the key is already properly connected to github.
When doing ssh -T [email protected] I get a success message, however I still get asked for a password. Even after providing it once I still get asked:
root@ubunt... | After setting ssh key still get asked for password from github |
By catching theSIGTERMsignal, you can perform any cleanup you'd like before the process is terminated (your environment might send aSIGKILLlater which cannot be caught).Signal.trap(:SIGTERM) {
# perform cleanup here
exit
} | We are using Rails 5.0.2 and ActiveJobs in AWS Beanstalk with SQS as a backend with the gemactive_elastic_job.We have a job defined like this:class MyJob < ActiveJob::Base
rescue_from(StandardError) do |exception|
self.class.set(:wait => 1.minutes).perform_later
end
def perform
MyLongTask.run
end
endWe... | Rails, ActiveJobs and AWS SQS: what happen to my jobs when a worker instance is killed? |
The dump file contains an error message from the backup procedure instead of containing a database dump.docker execcombines the standard output and the standard error. Its output cannot be trusted for a backup file.Aside from solving the root problem thatpg_dumpallin the container cannot connect totemplate1, you want ... | I have a dockerized Postgres db. I have successfully executeddocker exec -t your-db-container pg_dumpall -c -U postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sqland generated.sqlfile. But when I'm trying to restore with the following script:cat my_dump.sql | docker exec -i your-db-container psql --username="myusername" my... | Error on restore a dockerized PostgreSQL database |
There are at least three solutions:give names to the use cases and send email(s) depending on alert category- alert: ServiceIsDegraded
labels:
impact: client-leveluse multiple labels representing the teams with action(s) associated to teams.- alert: ServerLost
labels:
dev_team: inform
... | I'm working on Prometheus for my internship and I encountered a simple problem :
My boss wants to alert the staff based on what services they use. So for example the recruiters needs only the "down "alerts from some services, the sales people from some others services, etc.(for example, if service 1 crash, the recruite... | How can I label an alert to know to whom it is intended in Prometheus? |
Instead of using a regex, could you rather use list a specific repo url using theGitHub API, in order to parse the JSON answer, getting various fields which should include the information you seek:"owner": {
"login": "octocat",
"name": "Hello-World",
"full_name": "octocat/Hello-World",Since the input data is an ... | I need to be able to get the user, repo and path from a github url (to a file in the repo) that is pasted into a form, to be able to make api requests on it. e.g.https://github.com/HubSpot/BuckyClient/blob/master/README.mdI've started writing some regex to try and just locate the parts of the url, but this seems like a... | Find the user, repo and path from a github url |
The answer is thealiasSubfunction which can do a regex replace.I used this in combination withaliasByNodeto replace the parts of the url I didn't need e.g.:aliasByNode(aliasSub(xxx.yyy.zzz.www_foo_fr.aaa.bbb, 'www_foo_', ''), 4) | I'm trying to use grafana's world map plugin, which requires a certain form for it's metric names: DE, FR etc.I don't have those metrics available in my graphite data and I don't have control over it, but I do have urls available e.g. www.foo.de, www.foo.fr.Is there a way to transform a metric name i.e take the last t... | Transform graphite metric name |
You should use cross-stack references as it was created for your use case of passing between stacks.
Whereas nested stacks would work, it’s primary purpose is for reuse of modular components, like a template of a resource you use in lots of stacks to save copy pasting and updating the stacks independently.
|
I'm facing a decision to Use Cross-Stack References to Export Shared Resources or to Use Nested Stacks to Reuse Common Template Patterns following AWS CloudFormation best practices.
However, they seem the same to me apart from a few differences:
cross-stack uses Fn::ImportValue, templates are in one folder.
nested-st... | CloudFormation cross-stack vs nested-stack |
Some time ago, docker-compose used a dictionary to store the mapping ports and the key was the internal port, so one value overrode the other.This was fixedhereusing a list. So, currently, docker-compose allows mapping an internal port to two ports. Maybe you are using an older docker-compose version.Example:→ docker-c... | Suppose I have an application that listens on8888- other parts of the application want to continue to access it on8888- but the external users need to access it at a port range above 50000 - eg50888.What I'd like to do in mydocker-compose.ymlis:ports:
- "8888:8888"
- "50888:8888"Will this work?My other alternative ... | Will docker-compose allow mapping a port to two ports or do I need an ambassador? |
It looks as if you are trying to perform page table introspection without using the kernel APIs for it. Note that the address space is arranged in a red-black tree of vm_area_struct structs and you should probably use the APIs that traverse them. The mappings might change at any time so using the proper locking for th... |
For some reason, I need to translate the virtual address of the code section to physical address. I did following experiment:
I get the virtual address from the start_code and end_code in mm_struct of process A, which are the initial address and final address of the executable code.
I get the CR3 of process A.
I t... | Page translation of process code section in Linux. Why does the Page Table Entry get 0 for some pages? |
Since the question is already answered in the comments, this is just to provide an answer in the way how Stackoverflow designated it.Like in the question it can be solved by usingmod_headersofApache 2. SinceContent-Dispositionis not part of the standard ofHTTP, you may add some other header to achieve your objective.<F... | So I am using the following rule in the htaccess:AddType SCHM wsc
<FilesMatch "\.(wsc)$">
ForceType SCHM
Header set Content-Disposition attachment
</FilesMatch>But when I go to thefile's locationit doesn't force the download | Force file to download with .htaccess |
It all depends on yourworkflow. Do you have multiple devs working on the project or just you?If you are the only developer working on the project, your suggestion is fine. You branch locally, perform your changes, merge, push.Another approach is to create remote branches, push local to the remote branch, and then merge... | I have a local clone of a remote repository with master andbranch1.masterwas the latest until I did some work onbranch1that I committed (remember, all local). after committing mybranch1work, I’m kind of confused how to go about later steps.My thinking is to switch tomaster, and do agit merge branch1, and then do a push... | git workflow after commit |
You could setup ABAC (http://kubernetes.io/docs/admin/authorization/) and limit users to namespaces:In the policy file you would have something like this if your user wasboband you wanted to limit him to the namespaceprojectCaribou:{
"apiVersion": "abac.authorization.kubernetes.io/v1beta1",
"kind": "Policy",
"spe... | I have a hard time trying to set up my (test) Kubernetes cluster so that it have a few users and a few namespaces, and a user can only see specific namespaces. Is there a way to do that? If yes, what is needed toCreate a userLimit a user to a specific namespace or namespacesUse Kubernetes (via kubectl) as a specific us... | How to create Kubernetes users limited to namespaces |
MediaStore has a cacheing layer and lower latency than s3 so it is optimized for live streaming and just in time packaging of live and vod. | This is more of a philosophical question:For a simple video application, which AWS services is the the best to choose, S3 or Elemental MediaStore?andAnd at which point will one be better to an other.The question is mostly in regards to performance, as I am aware different possibilities in the sdk's.BackgroundI am makin... | AWS S3 vs Elemental MediaStore |
1
This is both a simple and a complex question. If you operate within standard problems, you don't really need to worry about memory allocation. For example, preallocating memory for 10 nodes won't be efficient in any scale, and your performance problems might be elsewhere.... |
I have a question/curiosity.
Let's say I want to implement a list, and for example I could basically use the cormen book approach. Where it is explained how to implement, insert, delete, key search etc.
However nothing is said for what the memory use is concerned. For example if I would like to insert an integer, in a... | Preallocate memory for dynamic data structure |
Based on the topic i think the problem here is your cluster have not enough resources on your worker nodes, and a master node istainted.So the option here is either inreasing the resources on workers or taint the master node so You would be able to schedule pods there.Control plane node isolationBy default, your cluste... | I am trying to set up hive using mr3 on a kubernetes cluster hosted on AWS ec2. When I run the command run-hive.sh, Hive-server starts and the master-DAg is initialised but then it gets stuck on pending. When I describe the pod. This is the error message shows. I have kept the resources to minimum so it should not be t... | 0/3 nodes are available: 1 node(s) had taints that the pod didn't tolerate, 2 Insufficient cpu. MR3 Hive |
runkubectl get services -n <namespace>. this will list the replicaset serviceexecutekubectl port-forward svc/mongodb-replicaset -n mongoNamespace 27018:27017wheremongodb-replicaset= mongodb service namemongoNamespace= namespaceand27018= your local portAs best practice, you should always connect on services not on pods.... | Cluster created in Rancher with Amazon EKS.MongoDB replicaset was created as a catalog app in Rancher.Services in the cluster can successfully connect the the database with this connection string.mongodb://mongodb-replicaset.mongodb-replicaset.svc.cluster.local:27017/tradeit_system?replicaSet=rsI want to view and edit ... | How to access mongodb replicaset hosted on a kubernetes cluster from outside? |
Yes you can. Thedocswrite:Functions triggered by origin request and response events as well as functions triggered by viewer request and response eventscan make network callsto resources on the internet, and to AWS services such as Amazon S3 buckets,DynamoDBtables, or Amazon EC2 instances.However, there aremany limitat... | Currently, my application resides in lambda which I serve using HTTP API (API Gateway V2). This setup exists in multiple regions. Meaning, API Gateway invokes lambda in the same region which accesses DynamoDB Global Table in the same region. I use Route 53 to serve nearest API Gateway to user.The problem I faced: API G... | Is it possible to remove API Gateway from the equation to serve Lambda over public internet? |
passing_lineto rl.on('pause',function(_line){} hide the global_linethat's why it's giving undefined and cmd command is fine.there is other way to do this by usingprocess I/Oof node.jsfunction YourData(input) {
}
process.stdin.resume();
process.stdin.setEncoding("ascii");
_input = "";
process.stdin.on("data", function... | I want to run name.js file from the command prompt usingnode.jsand pass the input file and redirect that output in output.txt,
I am writing a command for this isnode name.js < input.txt | > output.txtbut this is not working or I am wrong.name.js look like this:const readline = require('readline');
const rl = readline.... | node.js: take input from file using readline and process I/O in windows command prompt |
This is because of docker. By default docker does not add container network namespaces to the linux runtime data (/var/run mounted as a tmpfs from /run) which is what you see when you run the ip netns command.
To view the network namespaces you need to use nsenter.
Get the container id.
docker ps
Get the container... |
I used the kubectl with yaml files to create target pod, and found the process in the pod is listening target port as expected.
To my surprise, the Port is not seen in the outputs of netstat -tunlp or netstat -alp or netstat -an from host machine. But it works if I try telnet localhost targetPort!!!
Why this happens??... | Why Is HostPort Not Showing in The Outputs of Netstat from Host Machine |
I'm not sure if there is an in-built function or similar that you can call from within BB pipelines that will decline the PR automatically. However, note that even if there isn't a way to decline the PR in-built to BB pipelines, there still is anAPI endpointthat allows you to do it.You can check what theBITBUCKET_EXIT_... | I am using bitbucket pipelines for PR raised pipeline, is there any way to write in bitbucket-pipelines.yml or in bitbucket settings to Cancel/Decline PR if pipeline gets failed at any step?There are variables like "BITBUCKET_PR_ID", "BITBUCKET_EXIT_CODE", which contains PR ID and exit status code, can we automate proc... | Decline a PR when pipeline gets failed |
The support for continuous export defined on streaming ingestion tables is still being worked on, it should complete within 2021.
However, please note that for disaster recovery scenarios, this is the highest effort, lowest resiliency, and longest time to recover (RPO and RTO), so while it provides the lowest cost you... |
We are ingesting data to an ADX Table using stream ingestion from an event hub source.
In order to plan for backup / disaster recoverability, the documentation suggests to configure continous export to recover from local outages and provide a possibility to restore data to another cluster.
Reading through the document... | Azure Data Explorer: How to backup data from table with stream ingestion |
This is probably a frequent question, but I can't find a really exact match right now.
The answer is NO — you can't use filesystem-level copy tools to back up a MySQL database unless the mysqld process is stopped. In a Docker environment, I would expect the container to stop if the mysqld process stops.
Even if there ... |
I'm looking for some insight whether or not rsyncing a copy of the data folder from MariaDB well running in docker will provide a usable backup. I'm deploying several containers with mapped folders in a production environment using docker.
I'm thinking of using rsnapshot for nightly backups as it uses hardlinks increm... | Rsync MariaDB Data Folder Docker Safe? |
A symlink points to a file in the file system. So the symbolic link in the docker host's file system points to a file in that file system.If you mount that symbolic link into the container it is interpreted within file system of the container. This means that it still points to/opt/my-app/test1.cfg. And this file does ... | I have a docker container which is launched with docker-compose.yml which containsservice: my-service
volumes:
- /tmp/mount/opt/my-app:/opt/my-appThere are symlinks in/tmp/mount/opte.g./tmp/mount/opt/my-app/test1.cfgwhich points to/host/path/test1.cfgWhen the container starts up, it fails with an error like:my-serv... | docker container can't open symlinked file in volume mount during startup |
Firstly, whenever a library is updated, you need to./b2 headersin the main repo, so all the symlinks to the library headers get updated in theboost/subdirectory.You seem to be forgetting that Multi Index relies on a host of other boost libraries - which need to be synchronized in the updates.E.g. BMI uses MPL, tuple, a... | I'm working on a script that clonesBoost official repositoryand init only the modules I need.I readgit submodule man page, and found a way to update only some modules. I don't even need to compile because I'm only usingmulti_index.git clone -b boost-1.60.0 https://github.com/boostorg/boost.git boost
cd boost
git submod... | Install Boost specific modules from GitHub |
Is there a way to preserve file permissions when uploading binaries to github?I don't believe so. People that download the file will need tochmod +xto get the execute permission back. A file's permission is not stored within the file itself, rather it is an attribute of the file on the file system.If you really need to... | I'm adding binaries to a release in github by dragging and dropping them into the binaries upload section when creating a new release. The binaries have the following permissions on my local (OSX):-rwxr-xr-x 1 user group 100 Mar 22 00:00 file1
-rwxr-xr-x 1 user group 100 Mar 22 00:00 file2
-rwxr-xr-x 1 user ... | Maintain executable file permissions when uploading binaries to a github release |
1
Your vcB should absolutely be deallocated, and dealloc called when you pop back to vcA. You must either be keeping a strong reference to it somewhere, or you're doing your "pop" incorrectly. If you're doing that with a segue, that could be your problem -- segues should ... |
I have aUITabBarController as my main base view controller. Under the first tab, I have a UINavigationController which of course has a rootViewController associated with it, call it vcA. vcA has a button which fires a child view controller, vcB using the code:
[self performSegueWithIdentifier:@"PlacesDetailsSegue" sen... | iOS - ViewController not being released when popped under ARC |
Here is better way to keep the container runningsleep infinity | I'm using thetail -f /dev/nullcommand to keep a container up.The line itself is placed in a script with an echo before and after.
The echo under thetail -f /dev/nullis expected to be unreachable but for some reason I see it in the logs.Once the issue occurs every restart to the container will cause the container to sta... | Using "tail -f /dev/null" to keep container up fails unexpectedly |
This solution might help you out in your situation.import ssl
xmlrpc.client.ServerProxy('{}/xmlrpc/2/common'.format(odoo_server), allow_none=True,verbose=False, use_datetime=True,context=ssl._create_unverified_context())ShareFollowansweredOct 5, 2021 at 16:24Saumil gauswamiSaumil gauswami67555 silver badges1616 bronze ... | I wrote this script around 4 months ago, everything was working fine. But when I returned to this code yesterday I got the following exception:ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1108)this happens when I run the following:client = xm... | Odoo xmlrpc certification has expired |
As statedin the docs, you only need to make sure the address of your SonarQube server is available to the analysis. Beyond that, you should provide the token of a user with analysis permissions (and 'create project' permissions if the project doesn't already exist) and analyze away.Of course, this pre-supposes that you... | I've successfully built up a SonarQube server, and I wrote several custom rules to review the code. Now, I can use the server and custom rule with Jenkins and with Maven only when the code is on the same server.My question is when I develop maven project on another computer, and I want to use maven build or maven insta... | How to use a certain sonar server in sonar-maven-plugin |
ProblemsGit doesn't really files or track directories the way you think, andaddingfiles to the index doesn't necessarily remove missing files, even assuming you actually moved or deleted the old ones. You can see what git thinks has changed in the index withgit status.In addition, the shell glob*only nets you the items... | I had my git repo with files structured like this originally:Folder
- file1
- file2
- file3
-....
- file30This was getting a bit hard to manage so I locally changed the structure to this:Folder
Subfolder
- file1
- file2
- file3
-....
- file30
Subfolder2
...Basically inside my repo I did right c... | Made changes to folder structure locally, how to reflect these exactly in git/github? |
The following .travis.yml solves my problem. The answer can be found on this page: http://about.travis-ci.org/docs/user/build-configuration/#Installing-Packages-Using-apt
language: cpp
compiler: gcc
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq cmake sqlite3 qt4-dev-tools
before_scrip... |
I have hosted my code (written in C++) on GitHub and wish to link it to a hosted Continuous Integration (CI) server like Travis CI or BuildHive. And then I'd like to see "build passing" or "build failing" on my project page. But when I checked the CI environments of these two services, Travis CI comes the closest with... | Need hosted CI server with Qt4, sqlite3, cmake, git, gcc for project on GitHub |
You should use this.gitignore.Remember that you can always edit it to fit your specific needs, but this should work for VS2015. | I'm going to upload a project to github but I'm not sure that if some temporary files or binaries from visual studio, includes some important info about the OS and computer I use, which could(?) let people do hacking.Which files should I consider ignoring or not uploading from my project (has C++ and C# parts)?I alrea... | What to gitignore to protect my OS license (and computer) |
You can use mod_rewrite to internally rewrite the URI to remove the language and use theCOflag to set a cookie. So something like this (in the htaccess file in your document root):RewriteEngine On
# first check the the folder/file actually exists:
RewriteCond %{REQUEST_URI} ^/[a-z]{2}/(.*)$
RewriteCond %{DOCUMENT_ROOT}... | I have a multi-language website and I want to display the current language in the URI which is something like this:URI:www.domain.com/en/
www.domain.com/en/folder1/
www.domain.com/de/
www.domain.com/de/folder2/DIRECTORY:public_html/
public_html/folder1/
public_html/
public_html/folder2/Then the en or de will be saved i... | ignore the /virtual subfolder/ that didn't exist in htaccess |
TheErrorDocumentdirective, when supplied a local URL path, expects the path to be fully qualified from theDocumentRoot. In your case, this means that the actual path to theErrorDocumentisErrorDocument 404 /JinPortfolio/error/404page.htmlWhen you corrected it in your second try, the reason you see that page instead is b... | I am trying to create a custom 404 error for my website. I am testing this out using XAMPP on Windows.My directory structure is as follows:error\404page.html
index.php
.htaccessThe content of my .htaccess file is:ErrorDocument 404 error\404page.htmlThis produces the following result:However this is not working - is it ... | Custom 404 error issues with Apache - the ErrorDocument is 404 as well |
From the documentationhttps://kubernetes.io/docs/concepts/configuration/assign-pod-node/you need to set a selector on your deployment and indicate in the anti-affinity section what is the value to match and make the anti-affinity true:apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-cache
spec:
selector:
... | I have a question about K8S pod anti affinity rule. What I have and what I need.I have cross 2 data centers K8S cluster. In every DC is for example 5 nodes. I have a Deployment for Pod, which runs in 10 replicas cross all 10 nodes. For every node is 1 Pod replica.
And I want to set up rule for case, if one DC will cra... | Kubernetes pod in more replicas - anti affinity rule |
The SonarQubeRunner 5.3 does not exist.You incorrectly configuredSONAR_RUNNER_PATH. You set path to the SonarQube server instead of the runner. The latest version is 2.5.1 (seereleases).Better choose optionInstall automatically(at work I use SonarQube Runner 2.4 with SonarQube Server 5.3 without any problems).ShareFoll... | I am trying to integrate jenkins and sonarqube.Sonarqube version is 5.3.I have a java gradle project to monitor. I have installed both jenkins and sonar on my local linux system. Both run individually fine.I have setupBelow is my entire configuration. | Why I am getting SonarQube runner executable was not found for SonarQubeRunner 5.3? |
0
I resolved the issue by writing a service and providing environment directory
Environment="PATH=/root/anaconda3/bin"
followed by
ExecStart=/root/anaconda3/envs/<app-name>/bin/gunicorn --workers 3 --bind unix:<app-name>.sock -m 007 wsgi:app
Share
Improve this ... |
I have installed ffmpeg and can run it from command line. I have anaconda installed and get different result for which ffmpeg command as follow:
/usr/bin/ffmpeg (base env)
/root/anaconda3/envs/myenv/bin/ffmpeg (myenv)
python app.py - The app uses Flask. I've tested it on localhost it is working as expected.
Ran it w... | ffmpeg: not found (Conda Env + Gunicorn + Nginx) |
You can use Github's API to fetch all of your branches and to publish PRs. Unfortunately, Github doesn't provide a method for filtering when listing branches, so you will still need to apply that filter in your own code.Here's an example execution usingOctokit. The two methods needed arerepos.listBranchesandpulls.cre... | We have a repo (SaaS project) that contains a list of branches (50-100), the master branch is up to date, So I want to open a list of PRs for every branch we have to take updates frommaster -> client-*So is there a way to handle this case automatically? | How to open a list of PRs automatically in Github? |
Try the followingMetricsQLquery:WITH (
q = {__name__=~"MyMeasurement_[A-Z].*",unit="°C"}
)
(q < 120) or ((q >= 120)/10) | I'm trying to divide the value by 10, if the value is inside an defined range.Source is VictoriaMetrics and Grafana with Prometheus plugin is used to query the data.I tested this code but either get an error message or the values to be divided end up as one curve instead of two.MetricsQLWITH (
data = {__name__=~"My... | PromQL/MetricsQL if value in range divide by constant value or map function |
Based on theseinstructions, first you need totrack, then you canaddandcommit. I followed a similar instruction for bitbucket and it worked.When youaddandcommitbeforetrack, you are probably commiting in your repo instead of the lfs repo. | I'm having issues getting Git LFS to track my large files properly (similar issue reported here:Git LFS refused to track my large files properly, until I did the following).In my specific case, I am trying to push a directory composed of multiple subdirectories, each of which has files of a specific type that I would l... | Git LFS not working |
You have to create a.gitignorefile and add.ideainto it. | I have my PyCharm IDE set up for Python version 3.7 and it is pushing all config files of the IDE to my GitHub repository even if I don't commit or push the changes automatically.Is there a way to stop this form happening? | PyCharm with GitHub |
When you create an object like this:
NSMenuItem *myLocalItem = [[NSMenuItem alloc] init];
The object is not in the local stack but on the heap, the only thing that falls off the scope is the pointer, not the object.
Therefore yes, you have to release it.
|
I'm new to Objective-C and Cocoa programming, so in my first sample projects I've always adopted the statement of releasing/autoreleasing all my allocated and copied objects.
But what about local objects allocated inside methods?
Let me write some sample code, here is my object interface:
@interface MySampleObject : N... | Local object scope and memory management in Cocoa |
I went down the road that Benjamin W. was talking about with having VERSION in my environment vs just in that specific step.
This worked for me to set the variable in one step, then use it in separate steps.
- name: Set variables
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Build Doc... |
In my Docker project's repo, I have a VERSION file that contains nothing more than the version number.
1.2.3
In Travis, I'm able to cat the file to an environment variable, and use that to tag my build before pushing to Docker Hub.
---
env:
global:
- USER=username
- REPO=my_great_project
- VERSION=$(cat... | GitHub Actions: How to get contents of VERSION file into environment variable? |
use$server_portinstead of$proxy_portpart in you configuration.change this lineproxy_set_header Host $host:$proxy_port;toproxy_set_header Host $host:$server_port;Catalina'sHttpServletResponse.sendRedirectimplementation uses thegetServerPortmethod to build anabsoluteredirect url (LocationHeader-Value).getServerPortreturn... | I am using tomcat and nginx together to serve my web application.
nginx listens to port 8085 and forwards requests to tomcat which is running on port 8084.If I do a redirect like the following:@RequestMapping("/test")
public String test() {
return "redirect:/";
}the page gets redirected to port 8084 (Tomcat port) ... | Spring MVC “redirect:/” prefix redirects with port number included |
I solved my problem but welcome other solutions from everyone :DFirst, create a secret with the following content:apiVersion: v1
kind: Secret
metadata:
namespace: argocd # same namespace of argocd-app
name: mycluster-secret
labels:
argocd.argoproj.io/secret-type: cluster
type: Opaque
stringData:
name: clust... | I want to add a new cluster in addition to the default cluster on ArgoCD but when I add it, I get an error:FATA[0001] rpc error: code = Unknown desc = REST config invalid: the server has asked for the client to provide credentialsI use the commandargocd cluster add cluster-nameI download config file k8s of Rancher.Than... | How to add new cluster in ArgoCD (use config file of Rancher)? - the server has asked for the client to provide credentials |
I agree with CyptoGuy that IIS.NET states the the difference is that Web Hosting is designed to scale to more certificates. I think I found another important difference, which is that I have yet to find a way to access theWeb Hostingstore from .NET code. Specifically because there is not aStoreNameenumeration value for... | In Internet Information Services Manager, you're given the option between the Personal and the Web Hosting certificate store when creating or importing a certificate.What's the difference? | What's the difference between the Personal and Web Hosting certificate store? |
The approach you tell is really the good one. Using hard reset is ok only if you are open to loosing the development history till that point.Basically, do the followinggit branch -m master old_master
git branch -m branch1 masterAfter you've done it, you will need to force push the master (because your local branch hist... | As it seems, themasterbranch of one of my project's went into a completely wrong direction. So what I want to do is:Checkout an older commitDevelop things into a different direction using a new branchCall this new branchmasterand discontinue the oldmasterbranchHow do I do this?I have seen that I could create a new bran... | Checkout an older commit and create a new master branch? |
The main reason people do this is to minimise the amount of data stored in that particular docker layer. When pulling a docker image, you have to pull the entire content of the layer.For example, imagine the following two layers in the image:RUN apt-get update
RUN rm -rf /var/lib/apt/lists/*The first RUN command result... | In the quest for ever smaller Docker images, it's common to remove theapt(for Debian/Ubuntu based images) cache after installing packages. Something likeRUN rm -rf /var/lib/apt/lists/*I've seen a fewDockerfiles where this is done after each package installation (example), i.e. with the pattern# Install some package
RUN... | Benefits of repeated apt cache cleans |
A syntax error cannot be caught by PHP. If a file can't be parsed, you'll get an unavoidable 500 error. You can setup your php.ini to not display the errors on the client, but it will still log the error.To suppress all errors from being sent to the client, in the php.ini file setdisplay_errors = OffWhen a 500 error ... | Recently something changed on my server, which has been causing aninternal error 500to be thrown everytime there is a syntax or logical error in PHP. These errors are handling in theexception classand I dont want them throwing the500error.Forgot To Mention : when the page doesnt exist => 404 errors work just fineI curr... | Apache Internal Error 500 on PHP syntax errors (htaccess) |
Ensure that/etc/cni/net.dand its/opt/cni/binfriend both exist and are correctly populated with theCNIconfiguration files and binaries onall Nodes. For flannel specifically, one might make use of theflannel cni repo | Closed.This question isnot about programming or software development. It is not currently accepting answers.This question does not appear to be abouta specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic onanother Stack Exchan... | Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod network [closed] |
To deploy an ASP.NET web application to a Docker container you can use the following procedure.
Publish Preset
Create a publish preset using the File System publish method. The resulting .pubxml file should look something like this:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schem... |
Based on this article I was trying to deploy ASP.NET 4.5 application using Docker for Windows.
I have done everthing and I have checked container IP using docker inspect Container_ID.
I've put this IP to my browser and it opens only default IIS page.
So it seems that IIS server works, but how am I suppouse to open my ... | How to run deployed app in Docker for Windows? |
I've reduced the amount of stutter on my animations by following these rules listed in order of importance when reducing stutter:
Don't initiate animations in onCreate, onStart or onResume.
Initiate animations on user events such as onClick and disable touch events until animation is complete.
Don't initiate more tha... |
So I've been having animation issues especially when two animations happen at once or right when an activity loads. I understand it's probably a resource problem and a lot of things are going on in the main thread causing the animations to stutter.
I've found a couple interesting suggestions:
1. Threads (ThreadPoolExe... | Android animation reduce stutter/choppy/lag |
You need to create acustom TrustManagerthat implements X509TrustManager and reads the certificate extracting the "thumbprint" and comparing it to (Not sure what value).Then you need to use the when setting up the SSLContext something like:TrustManager[] tms =
{ new com.willeke.security.FakeX509TrustManager() ... | I'm trying to connect to theldap serveroverSSL.I'm using spring ldap template and having a customSSL Socketfactory.My requirement is to do validate certificate using the thumbprint (not using the java keystore)I will have the thumbprint information in my DB and that needs to be validated with the server's certificate t... | Secure LDAP - validating certificate using thumbprint in java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.