Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
Update, Feb. 2021: Browsers are generally moving in the direction ofpartitioning the HTTP cache, meaning that CDN-like URLs, such as Google Fonts, are less likely to result in cache hits due to an unrelated web app having previously requesting the same URL. This eliminates a common argument in favor of using fonts from... | I am building a preact PWA (Progressive Web Application), and I do not know if I should keep fonts external to reduce my application size, or keep the fonts local to improve offline viewing? What is the best practice? | PWA Best Practice: Web or Local Fonts? |
As per the commentd above, make sure Flare does not collect git information (It will try to open the git process and get branch and tag information).In flare.php (config/flare.php):'collect_git_information' => false
'reporting' => [
'anonymize_ips' => true,
'collect_git_information' => false,
'report_qu... | I used cron job to do some CRUD operation using laravel Task Scheduling. On localhost it is working fine. But on my shared host I keep getting this error.2020-04-08 16:56:01] local.ERROR: The Process class relies on proc_open, which is not available on your PHP installation. {"exception":"[object] (Symfony\\Component\\... | Laravel 6.18.2: The Process class relies on proc_open, which is not available on your PHP installation |
A possible reason why your /etc/nginx/conf.d/01-security.conf is not working, is because you are using Amazon Linux 2 (AL2). However, the setting file is for old EB platforms based on AL1.
For AL2, the nginx settings should be in .platform/nginx/conf.d/, not in .ebextentions as shown in the docs.
Therefore, you could... |
The beanstalk documentation is not clear on how and what is best way to customize nginx configuration when deploying PHP applications.
I've tried multiple things as include a file /etc/nginx/conf.d/01-security.conf like this:
files:
/etc/nginx/conf.d/01-security.conf:
mode: “000644”
owner: root
group: root
content: |
... | Elastic Beanstalk - Customize Nginx configuration files - PHP Web Application |
The issue was due to theINFLUXDB_ADMIN_ENABLED=trueline.The documentation states:The administrator interface is deprecated as of 1.1.0 and will be
removed in 1.3.0.I was using thelatestversion which is (currently) the1.4so it seems that there was a problem with that deprecatedINFLUXDB_ADMIN_ENABLEDvariable.Removing t... | I'm running the following command to launch aInfluxDBcontainer. This should create a new databse with the namedefaultdb.docker run -p 8086:8086 \
-e INFLUXDB_DB=defaultdb -e INFLUXDB_ADMIN_ENABLED=true \
-e INFLUXDB_ADMIN_USER=admin -e INFLUXDB_ADMIN_PASSWORD=adminpass \
-e INFLUXDB_USER=user -e INFLU... | Launching a InfluxDB container in docker with a default database name |
Send the request to the second place from your first URL, parse the response and return that to the client. I cannot guarantee that I am right, but I really believe you should not be able to do that using htaccess because that would potentially introduce ambiguity in the requesting logic.ShareFollowansweredDec 20, 2013... | Looking through mod_rewrite manual, I have been trying to find a way to send a copy of a request for a particular directory or site to an alternative URL, while ALSO sending the request to it's originally intended link.So if the user requests the URL:http://www.site.com/test/The .htaccess located in the test directory ... | Copy request to different URL with .htaccess |
I also need to know the downstream pipeline status, there is an internal feature request inside of gitlab, unfortunately, 3 years have gone they still don't move forward. We can vote to pop it up.https://gitlab.com/gitlab-org/gitlab/-/issues/31566 | Currently i would like to trigger a pipeline that is part of another project. So one way could be to use multi-project pipelines via trigger keyword. The problem is that if i do it with this way then i have to be owner or maintainer in the downstream repo. This is not possible because the downstream repo has SSH_KEYS t... | How can i track the status of the downstream pipeline when i use the trigger API? |
15
What should be the ideal outbound security rule? In my perspective, the outbound traffic for the RDS security group should be limited to port 5432 to our EC2 instances, is this right?
It is a good idea to have a clear control over outbound connections as well.
In you... |
I have a security group assigned to an RDS instance which allows port 5432 traffic from our EC2 instances.
However, this security group has all outbound traffic enabled for all traffic for all IP's.
Is this a security risk? What should be the ideal outbound security rule?
In my perspective, the outbound traffic for th... | AWS Security Group for RDS - Outbound rules |
Remove all Pod files with this command:
rm -rf Podfile.lock Pods/
Stash all changes and then move to master:
git stash -a
git checkout master
Now write new Podfile and run:
pod install
|
I am presently taking a course in iOS development and we use Github to submit work to instructors. Last night, I did an assignment on a project I've been working on for several days, committed the repo and stopped for the day.
This morning, I began another lesson that involved installing Cocoapods. I created a branch ... | How to nuke a Cocoapods installation and start over with Github master |
It affects which cached password will be used.An HTTPS URL can trigger credentials caching if yourgit cconfig credential.helperis set tomanager-coreAddingusername@in your URL forces the helper to use the right username, helping it to retrieve the right password.Wouldn't it make sense to use this URL format by defaultOn... | Github recommends the foolowing URL for setting a remote repohttps://github.com/{USERNAME}/{PROJECTNAME}.git[When creating a new repo on Github].But only when a different format -https://{USERNAME}@github.com/{USERNAME}/{PROJECTNAME}.git- I was able to work with a second account on the same git client [https://stackove... | Github - Difference between https://[email protected]and https://github.com for remote repository |
I was trying to override the storage configuration by using ENV vars. This workaround did the job (in json format):{
"REGISTRY_STORAGE": "s3",
"REGISTRY_STORAGE_S3_REGION": <REGION>,
"REGISTRY_STORAGE_S3_BUCKET": <BUCKET_NAME>,
"REGISTRY_STORAGE_S3_ROOTDIRECTORY": <ROOT_PATH>,
"REGISTRY_STORAGE_S3_A... | I'm trying to deploy an S3-backed private docker registry and I'm getting an error when I try to start the registry container. My docker-compose.yml looks like this:registry:
restart: always
image: registry:2
ports:
- 5000:5000
environment:
REGISTRY_STORAGE_S3_ACCESSKEY: myKey
REGISTRY_STORAGE_S3_S... | Multiple storage drivers panic in private registry |
0
I recommend using database replication in a master/slave setup if you have separate database servers. This way your database is constantly updated and you can write your web app to run off the slave never having to worry about the validity of the database data. If your da... |
Hi I am new to Drupal7 cms so my question might be stupid but want to clarify here. My requirement is i have to develop a web application which uses
the database of drupal cms by making replica of the drupal cms database periodically(every halfanahour).So by making the copy of drupal cms database
i want write my ow... | how to sync my database with drupal cms database periodically |
DynamoDB is eventually consistent on update, so "race conditions" are possible. If you want more strict logic in writes, take a look attransactionsItems are not locked during a transaction. DynamoDB transactions
provide serializable isolation. If an item is modified outside of a
transaction while the transaction is in ... | I'm having trouble updating a single item many times at once. If I try to update an item with new attributes many times like so:UpdateExpression: 'SET attribute.#uniqueId = :newAttribute'not all of the updates go through. I tried sending 20 updates with unique ids and this resulted in only 15 new attributes. This also ... | Dynamodb missing updates with concurrent requests? |
0
Assuming that you have the necessary field in your table, you could simply change your full backup to something that pulls everything that was created after the last pull:
-- export.sql.template
sql='SELECT * FROM YourTable WHERE SampleID > $lastSampleID'
Then you could ... |
I am using Sqlite in a project. Currently I have collected 30 million samples and the size of the database file is around 2 GB!. I am also performing the backup using the sqlite3.exe application automatically every 12 hours. The size of the DB is increasing and I should switch to the incremental-backup solution. I wan... | Incremental Backup Solution (Sqlite, MySQL, SQL Server) |
To retrieve by path the command is
aws ssm get-parameters-by-path --path "/IAD/ERP/Oracle/" --region us-east-1
|
With aws cli I can successfully create parameter in AWS Paramater Store and retrieve it using get-parameters.
Example:
anarinsky:~> aws ssm put-parameter --name /IAD/ERP/Oracle/addUsers --value "Milana,Mariana,Mark,Miguel" --type StringList --region us-east-1
anarinsky:~> aws ssm get-parameters --name "/IAD/ERP/Oracle... | How to correctly specify path in aws ssm get-parameters-by-path? |
TheVolumeWriteIOPsandVolumeReadIOPsare pretty misleading due to their name.Psdoes not stand for "per second".The metric is the sum of IO operations in a five-minute interval.
You can calculate the per-second value by dividing it by 300. That leads to around 2 IO per second in your case. | I've created an RDS Aurora Serverless cluster with a maximum ACU of 1 and have noticed a high number of Volume Write IOPS, despite not creating a database or ever connecting to the cluster:I've looked through thegeneral_logand noticed this statement, which is executed approximately every 2 seconds:INSERT INTO mysql.rds... | AWS Aurora Serverless unexplained write IOPS |
Instead of using--exclude "*" --include "$b.txt", I just usedaws s3 mv myfolder/"$b.txt" s3://mybucket/. I'm pretty sure I tried that same thing earlier without the "" around $b.txt and it didn't work because there was a whitespace in front of the variable. | I am getting the error message"Unknown options: s3://mybucket/"when using the following set of commands to mv files to S3. The output that I am getting fromecho $bis exactly what I am expecting so I know I am targeting the correct file. The error occurs on the lineaws s3 mv ...tag=$( tail -n 2 /var/log/cloud-init-outp... | Unknown Options when Using aws s3 mv |
This is due toContent Negotiationturned on myMultVIewsOptions in Apache.Place this line on top of your.htaccessto turn offMultiViews:Options +FollowSymLinks -MultiViews | I have created a mod_rewrite rule for my blog which works final on my local server but when I upload to my live server it's not passing the $_GET variables. I've managed to break the problem down into it's simplest form. Here's the mod_rewrite:RewriteEngine on
RewriteRule ^test/([^/\.]+)$ test.php?var=$1 [QSA]The file ... | htaccess mod_rewrite not passing get variables on live server |
+50I believe Github actions also allow you to run arbitrary commands on remote servers via ssh (there area few in their library).Assuming you copy yourdocker-compose.ymlinto,/home/user/app/docker-compose.yml, you could run a command like so:ssh[email protected]"cd /home/user/app/ && docker-compose up -d" | What I want to do:
Deploy docker-compose solution from Github to my virtual private server which has docker and docker-compose installed.I saw that there are Github Actions that allow me to copy files over SSH after push to master, but I don't know how to rundocker-compose upon my server after source has been copied.On... | How to deploy docker-compose solution automatically from github to vps over ssh? |
If you are looking to cache as much data as possible without causing the application to crash, you can always make use of the function didReceiveMemoryWarning to remove excess caches when needed. Within this function, you don't have to clear out everything. You could use it to selectively clear up enough room for the ... |
I have an app which caches large images so that user do not wait for imageWithContentsOfFile. As a general rule I cache a previous and next image.
1) Can I make this caching adaptive based on the available memory in iPad ? If yes what should be the threshold ? Below is the function to calculate the available memory
... | Adaptive image caching based on available RAM or iOS Memory warning level |
This errorInvalid value: "ConnectionStrings:MyContext": Invalid Environment Variable Name indicates that environment variable you are trying to define is unsupported.Instead of using"ConnectionStrings:MyContext", use MyConnectionStrings_MyContextas your environment variable.You can use the below command,az containerapp... | I am trying to add my context as anenvironment variableinAzure Container Applike below but it throws an error.az containerapp update -n MyContainerapp -g MyResourceGroup -v ConnectionStrings:MyContext=secretref:mycontextsecretkeyInvalid value: "ConnectionStrings:MyContext": Invalid Environment
Variable NameI tried with... | How to add indepth environment variables in Azure Container Apps |
UITableViewCells work as a lazy var, they are initialized on the first use and are kept alive as long the UITableView that initialized them is alive, that happens on the moment the register:forIdentifier: is called. If you're using the Storyboard that's is done for you.Why it's done? Every cell can be reutilized using ... | the problem is in my project. But I also tried in new xcode draft project that Master-Detail Application one.I have created base Cell class and mapped the cell on storyboard. After delete operation deinit never called. There is no strong or weak any reference to cell.class Cell:UITableViewCell {
deinit{
pri... | UITableViewCell object deinit never called |
If you're using S3 as your storage you may consider using something like carrierwave_direct to skip passing the file through the web server and instead upload directly to S3.Like noted above you could incorporate a queueing process like delayed_job.https://github.com/dwilkie/carrierwave_direct | My situation is like this:
1. User uploads 150MB zip file, with 600 files inside. It takes 4 minutes or so to upload the file to the server.
2. Server processes the file contents, takes 70 seconds or so.
3. The server responds with Service Unavailable, with a log like, "could not forward the response to the client... s... | Nginx, passenger, rails - how to configure for long running requests? |
This seems to be an authorization problem.
I would suggest you try to use the ssh protocol rather than https:
[email protected]:<user>/<reponame>.git
(source)
Also, make sure that in your global .gitconfig you have
[http]
sslVerify = true
You can fix that from the command line by issuing
git config --global ... |
I did push origin master and after that I have an error:
$ git push origin master
fatal:
https://github.com/myusername/my-first-project-test.git/info/refs not
found: did you run git update-server-info on the server?
I did:
$ git update-server-info
but it doesn't help at all.
| Fatal error on git push origin master? |
A Context is simply a representation of a Kubernetes configuration, typically~/.kube/config. This file can havemultiple configurationsin it that are managed manually or withkubectl context.When you provision a second Kubernetes cluster on AWS using Kops, brand new resources are recreated that have no frame of reference... | I have a kubernetss cluster which i have started with a context "dev1.k8s.local" and it has a stateful set with EBS -PV(Persistent volumes)
now we are planning to start another context "dev2.k8s.local"
is there a way i can move dev1 context EBS volumes to context "dev2.k8s.local"i am using K8S 1.10 & KOPS 1.10 Version | Move resources/volumes across contexts in Kubernetes clusters |
First: A repository owned by a user account has two permission levels:
the repository owner and
collaborators.
Second, Collaborator access on a repository owned by a user account involves:
Open, close, re-open, and assign issues
So they should be able to see the list of collaborators for that private repo, if th... |
Say I was invited into a private repo owned by user account (and not an organizational account). Is it possible to see who else has access to that private repository (Assuming I was not granted admin permissions, if that's possible)?
| How can I see who has access to an individual's private github repo? |
1) Try using setAppCacheEnabled and setAppCacheMaxSize to limit the cache size to very little , lower cache size will result in faster cleanup.
Ex: wv.getSettings().setAppCacheMaxSize(1);
OR
2) If you don't need the cached data then simply set setCacheMode(WebSettings.LOAD_NO_CACHE); , which means
"Don't use the cach... |
I am using WebViews in an Android app, and I need to prevent the WebViews from caching.
Unfortunately it seems like this seemingly simple goal is nearly impossible to achieve. The solution I have resorted to use is to execute webview.clearCache(true) in the onPageFinished event so that the cache is cleared each time ... | Android Webview's ClearCache is very slow |
You can define a super-set of all the stages and then run only the stages you need, like this:pipeline {
agent any
stages {
stage('Always') {
steps {
...
}
}
stage('Only when Four') {
when {
environment name: 'CHOICE', valu... | Based on the parameter selected (Eg. choice - in this case), need to scale up/down the pipeline stages.if(choice.equals("four")){
pipeline{
<4 stages>
}
}else{
pipeline{
<3 stages>
}
}Is it possible to implement something like this? | How to scale up/down the stages in Jenkins Pipeline, based on the choice parameter we are selecting? |
You can't change username. You can check the following links that describe how to change master password and if Amazon adds the ability to change username you will find there:
Try to find at AWS CLI for RDS:
modify-db-instance --db-instance-identifier <value> --master-user-password (string)
--master-user-password (s... |
Changing the password is easily done through the console. Is there any way to change the master username after creation on RDS for PostgreSQL? If so, how?
| Rename the Amazon RDS master username |
I would indeed use a 301 redirect, but you don't need the plugin you linked to. You could add the following code to yourfunctions.php.function disable_lost_password() {
if ( in_array( $_GET['action'], array('lostpassword', 'retrievepassword') ) ) {
wp_redirect( wp_login_url(), 301 );
exit;
}
}
a... | I've disabled password resetting for a CMS however if anyone knows the necessary URL, they can still arrive at an obsolete password reset form:www.mysite.com/wp-login.php?action=lostpasswordShould a user manually type this URL, I'd like the URL to automatically redirect to:www.mysite.com/wp-login.phpI'm ultimately tryi... | Redirecting a URL with an action parameter |
I have fixed this issue, after getting ACM cert, you have to validate after some wait time. you can use following code snippet:
acm_arn = resp_acm['CertificateArn']
print(acm_arn)
time.sleep(10)
#describe acm certificate
acm_describe = client_acm.describe_certificate(
CertificateArn=acm_arn
)
name = acm_describe['C... |
I am creating ACM public certificate in AWS organization account using lambda function from master account,
code to create ACM Cert and attach with listener is:
resp_acm = client_acm.request_certificate(
DomainName='test.example.com',
ValidationMethod= 'DNS',
)
acm_arn = resp_acm['CertificateArn']
print(acm_a... | Unable to attach ACM Public certificate with ALB Listener using Lambda across account |
To transfer local files to a kubernetes pod, use kubectl cp:
kubectl cp /root/my-local-file my-pod:/root/remote-filename
or
kubectl cp /root/my-local-file my-namepace/my-pod:/root/remote-filename -c my-container
The namespace can be omitted (and you'll get the default), and the container can be omitted (you'll get t... |
I'm extremely new to Kubernetes (besides it's not my field) but I got required to be able to execute this practice.
Question is that I need a Handbrake Converter in a containerized pod with a Persistent Volume mounted on a GKE cluster:
3 nodes.
node version 1.8.1-gke.1
node image Ubuntu
Everything is fine until this... | Local files transfered to a Kubernentes Persistent Volume? |
The memory limit shows how much memory docker will allow the container to use before killing the container with an OOM. If you do not set the memory limit on a container, it defaults to all of the memory available on the docker host. With Docker for Win/Mac, this is memory allocated to the embedded VM which you can adj... | I created a docker container from an image which is of size:~90 MB.The container is running fine.
I wanted to know how much RAM does a container must be using on its host machine. So I ran "docker stats" command and it shows following output:CONTAINER ID NAME CPU % MEM USAGE / LIM... | what does "MEM USAGE / LIMIT " column state in docker stats command output? |
A good advise: nullify pointer after free. In your case you have undefined behaviour, because computer can allocate memory, which is pointed by ptr, or may not allocate this piece of memory, or this chunk of memory could be added to other chunk of memory during defragmentation, etc.
On the other hand, free(NULL) is de... |
I've been seeing quite a bit of erroneous code around the web and in my Advanced C class (such as the code below). While I understand that it's obviously bad coding practice, I'm having a difficult time as to what it does that's so bad other than waste CPU cycles. From my understanding so far, if a pointer allocation ... | What is the issue with double free()? |
When you call a method from your service, you are actually calling it through a proxy. The autowired bean is wrapped in a proxy that intercepts the call and handles the cache annotations only for that method.When you make the call internally, it is made directly on the service object, and without the proxy wrapper, the... | Spring cache is not working when calling cached method from another method of the same class.Here is an example to explain my problem in clear way.Cached service class:class testServiceImpl{
@CachePut(key = "#result.id", condition = "#result != null")
public List<String> create(String input) {
......
}
@CacheEvict(ke... | Spring Cache - @CacheEvict, @CachePut not working while calling from the another method from the same class |
-XX:MaxRAMoption affects nothing but thedefault heap size.Memory used by a Java process (from the OS perspective) includes not only Java heap, but also many other things. Seethis answerfor details. | This question already has answers here:Setting -XX:MaxRam(3 answers)Closed3 years ago.I run a java application with the following parameters:#!/bin/bash
export JVM_OPTS="-XX:MaxRAM=150m"
export JVM_OPTS="$JVM_OPTS -XX:+UseSerialGC"
java $JVM_OPTS -jar application.jarThehtopshows:VIRT=475MRES=238MSHR=4880MEM%=24.1As I... | How JVM -XX:MaxRAM option can be correctly used? [duplicate] |
URLs are case sensitive. In your HTML, you are linking to the image:
https://kevinranke.github.io/images/skillet.jpg
Whereas in your repository, the extension is capitalized:
https://kevinranke.github.io/images/skillet.JPG
|
I have a website that I am developing. It's currently hosted on GitHub pages for Dev purposes. KevinRanke.github.io
The main image with alt text of "IRS" is not loading and I don't know why. Any ideas? Naming convention wrong? IMG tag having the wrong class attribute? Any and all help is appreciated!
| GitHub Pages images not loading |
If I understood correctly you have static resources oneditoranddashboardupstreams and in both cases the URL is the same/static/some.resourceBecause you cannot differentiate based on the URL you could configurenginxto try if the file exists ondashboardfirst and proxy the request toeditorif not found.upstream editor {
... | I'm trying to use Nginx as a reverse proxy to serve two containers. Here is a part of my Nginx conf file:upstream dashboard {
server dashboard:80;
}
upstream editor {
server editor:80;
}
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://dashboard;
}
... | Can't serve static assets from docker containers behind Nginx reverse proxy |
You can set memory usage of docker container using-e JAVA_OPTS="-Xmx64M -Xms64M".docker file:FROM openjdk:8-jre-alpine
VOLUME ./mysql:/var/lib/mysql
ADD /build/libs/application.jar app.jar
ENTRYPOINT exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jarimage run:docker run -d --name container-name ... | I have created some services in spring boot, I have 11 fat jars and I deploy them in docker containers, my doubt was that every jar was consuming between 1 and 1.5 GB of RAM without any use, I check the RAM by running:docker stats containernameAt first I thought that it was the java container and I tried to change to o... | Spring boot is consuming too much RAM |
It was an programming question. In the script, i used ".../" path, with can't resolved by the cronjob. Thanks @NguyenSyThanhSon for this hint.ShareFollowansweredOct 26, 2015 at 7:15regetskcobregetskcob1,17211 gold badge1313 silver badges3535 bronze badgesAdd a comment| | I've created an cronjob bycrontab -ewith the following setup15,45 0-23 * * * /usr/bin/python /home/wetter/scripts/capture_upload.pyAlso i've changed the access permissions after read this in the internet bychmod a+x capture_upload.pyBut this Job don't get fired or there is a failure int he script, but if i run the scri... | Raspbian Cronjob don't get triggered |
To silence the message you can either configure which rules are enabled in SonarQube by configuring yourquality profile, or you can addan exclusionfor particular file.The third way is to add// NOSONARcomment on the line with the issue. However, this way you are muting all rules.Now about the examples, you provided - em... | I'd like to find a way to hint SonarQube so that it would not warn for some pieces of code.Example1: "empty statement block can be removed" -- actually, it cannot be removed:static void closeNX (java.io.FileInputStream is) {
try {
is.close ();
} catch (Exception e) {} <Warning comes here>
}(Edit: this m... | SonarQube -- can it be silenced with a hint? |
Your Python script might be missing permission to execute, or missing shebang on the first line to be interpreted by Python.Easy solution is to change:somepath/check_crack.pyinto:python somepath/check_crack.pyor even to:/usr/bin/python somepath/check_crack.pyThis way cron will know, that it shall be interpreted by Pyth... | I want to run a python script every so often on my web hosting, using cpanel, so it looks like…However, every single formatting and file path I've tried returns with it saying no such file exists, when in fact I know for sure that it does.Any help?If it means anything, I'm running on shared hosting with namecheap. | How to create a cronjob for a python script in cpanel? |
Independently of your error, you could rename your origin url with:git remote set-url origin https://github.com/username/new-nameRegarding your error message, you could stash your work in progress and pull: see "Ignoring “Your local changes to the following files would be overwritten by merge” on pull".I have commit ch... | I was using PyCharm with GitHub for some time. Then I had to rename the github project's name (fromgithub.com/username/old-nametogithub.com/username/new-name). I had to do this because there was some issue with the previous name. Nothing else changed. Although I changed the name of the repo, I can succesfully push chan... | PyCharm, git: Cannot Pull after remote repo name changing |
This is due to therestartPolicyof your pod, by default it isAlways, which means the pod expects all its containers to be long-running (e.g., HTTP server), if any container in the pod exits (even successfully with code 0), it will be restarted. In this case, you want to setrestartPolicyasOnFailure. Seehttps://kubernetes... | I created a pod which just calculates the pi and exits and it should run again. On monitoring I observed the status was running, then turned completed and finally crashloopbackoff .I tried different images, but issue is the same.apiVersion: v1
kind: Pod
metadata:
name: pi
spec:
containers:
- name: pi
... | Why the pod status is coming as crashloopbackoff in my case? |
<div class="s-prose js-post-body" itemprop="text">
<p>You can take a look at how the base images are created and go from there.</p>
<p>You can find them here: <a href="https://github.com/dotcloud/docker/tree/master/contrib">https://github.com/dotcloud/docker/tree/master/contrib</a>.
There is mkimage-busybox.sh, mkimage... | <div class="s-prose js-post-body" itemprop="text">
<p>According to the <a href="https://docs.docker.com/engine/reference/builder/#from" rel="noreferrer">Docker documentation</a>, to build your own image, you must always specify a base image using the <code>FROM</code> instruction.</p>
<p>Obviously, there are lots of im... | How can I make my own base image for Docker? |
Well, you get all the required information in the blog post: the SQALE methodology is perfectly explained on theofficial SQALE website.The blog post even mentions that there's a Sonar plugin that implements the methodology: theSonar SQALE plugin. | We try to use Sonar to manage the software quality, like this page, we can get the technical debt.http://www.sonarqube.org/sqale-the-ultimate-quality-model-to-assess-technical-debt/My question is, how to define the debt to fix a violation, remove some duplicated code or a new test case. Is there any calculate algorithm... | How to calculate the technical debt? |
(Just a suggestion)We usually have the following structure for building our docker images:my-image/
├── assets
│ ├── entrypoint.sh
│ └── install.sh
├── build.sh
├── Dockerfile
├── README.md
└── VERSIONbuild.sh: This is where you should invokescript_that_creates_magic_file.sh. Other common tasks involve downloading ... | Is it possible to createDockerfilethat executes a command on host when image is being build?Now I'm doing:./script_that_creates_magic_file.sh
docker build .with Dockerfile:FROM alpine
COPY magic_fileI want to be able to do:docker build .with Dockerfile:FROM alpine
# invoke script_that_creates_magic_file.sh on the host
... | Execute command on host during docker build |
Becausesystemd is configured to give nginx a private /tmp. If youmustuse the system /tmp instead for some reason then you will need to modify the .service file to read "PrivateTmp=no". | I found strange behaviour concerningphpand/tmpfolder. Php uses another folder when it works with/tmp. Php 5.6.7, nginx, php-fpm.I execute the same script in two ways: via browser and via shell. But when it is launched via browser, file is not in real/tmpfolder: /tmp/'.$name.'.txt');
var_dump(file_exists('/tmp/'.$name.... | Php has its own /tmp in /tmp/systemd-private-nABCDE/tmp when accessed through nginx |
13
This is exactly what metric filter is for. Create a metric filter that monitors your log group for specific pattern. Then create a CloudWatch alarm based on a new metric and configure it with an SNS action. Then simply subscribe your email to that SNS topic.
All of th... |
I have to monitor CloudWatch logs for particular lambda. When the specific error message such as HTTP-50X is logged to CloudWatch, then we need to send an email notification to alert that the something is wrong.
We need help to create alert email in AWS to monitor manually the logs to see if there is any such error lo... | AWS CloudWatch logs: How to send an email notification when particular error message is logged by lambda |
The $REDIS_PORT_6379_TCP_ADDR and $REDIS_PORT_6379_TCP_PORT variables are not known at the time the docker run command is executed so there's no way to construct it from the host.
However, there is a workaround. In the Dockerfile for the firehose/server image there must be a CMD or ENTRYPOINT that dictates what comma... |
I have an application which uses an environment variable named REDIS_URL. A typical REDIS_URL would be redis://172.17.0.5:6379/0. I'd like to be able to populate REDIS_URL based on container linking:
docker run --name redis -d redis
docker run --name firehose --link redis:redis -e REDIS_URL="redis://$REDIS_PORT_6379_T... | Using linked container environment variables in application environment? |
0
The EXPOSE instruction does not actually publish the port. You also have to also tell docker to forward connections to that port. When running you would do docker run -p 80:5000 my_docker_image and then traffic inbound on port 80 will be forwarded to port 5000 within the ... |
This question already has answers here:
Configure Flask dev server to be visible across the network
(18 answers)
Are a WSGI server and HTTP server required to serve a Flask app?
... | I can't access docker from outside the container [duplicate] |
You can read about page output caching on MSDN: http://msdn.microsoft.com/en-us/library/ms178597.aspx
The directive allows you to specify settings such as whether a page should have its output cached, for how long, and other configuration options.
Output caching can be a performance benefit to a page that is expensive... |
I think it has been related to caching concept but don't know how is it used.
| What is use of @outputCache directive in ASP.NET? |
You are missing the Resource: "*" attribute. This worked for me:
LambdaKmsKey:
Type: AWS::KMS::Key
Properties:
Enabled: true
KeyPolicy:
Version: 2012-10-17
Statement:
- Effect: Allow
Action: kms:*
Resource: "*"
Principal:
AWS: !Joi... |
The title says it all. I am getting this error whenever I try to create a KMS key via an AWS CloudFormation template. I am creating the template as an IAM user with administrative permissions, and I want the key to be manageable by any IAM user in the same AWS account with KMS permissions. I am using the following ... | The new key policy will not allow you to update the key policy in the future |
In pip VCS URLs egg= is not an egg name but the name of the project. pip uses it to identify the project name (or name+version) before downloading.
For your project egg should be something like egg=versionator (bare name) or egg=versionator-0.1 (name+version).
You can get name an version right from your setup.py with ... |
I have made a python package and want to include its installation in the requirements file.
After following the hitchhikers guide, my directory/repository looks like this:
.
├── CHANGES.txt
├── dist
│ └── Versionator-0.1.0.tar.gz
├── docs
│ └── driving_versionator.txt
├── driver_de_versionator.py
├── feedshark_lea... | How to determine the egg of a python package? |
Apull origin masterwhile you are onold-statewould update old-state only, notmaster.At least, checkout (orswitch) tomasterfirst.git checkout master
# or with Git 2.23+
git switch masterThen:git push -u origin master | I have a project on local and I would like to push the project on a github repository
On local I have many commitsTo push on github I use the following commande lines:git remote add origin https://github.com/yourusername/your-repo-name.gitgit pull origin mastergit push origin masterIt works but I have the first version... | When I push a project to Github, I have the files of the oldest commit, why? |
If you're ok with a purely in-memory cache, I'd suggest extending theGoogle Guavalibrary's CacheLoader, ex:public class DBLoader extends CacheLoader<String, String> {
@Override
public String load(String key) throws Exception {
// load a value from the database
return value;
}
}Then in usage... | i want to use ehcache not only as a cache but as a container of dirty objects that i want to flush to my database when the objects get evicted/expired. during normal processing, i use a key to lookup in ehcache. if key is not present, i read data from database and put it in ehcache. the value is actually a complex obje... | can this use case be ever worked out in ehcache? |
What you can do is create a repo that only contains the core subdirectory and associated spree_core.gemspec file. This will lead to a slimmer installation as well. You can also grab the contents of the directory to bundle with your app and distribute it like this:
gem 'spree-core', :path => 'vendor/gems/spree/core'
T... |
I forked the spree repo on github and I would like to specify in the Gemfile of my rails app a gem that is located in the core subdirectory of the main repository.
The folder structure of the repository is the following:
|~spree [git root]
| |-spree.gemspec [spree gem located here]
|~core
| |... | How to specify in Gemfile a .gemspec located in a subdirectory of a Git repository |
It may depend on your composer version.As shown inthis articlebyNono Martínez Alonso:The solution is to update Composer to the latest version, which supports the new token format, as suggested by Jordi Boggiano onthis tweet."Composer 1.10.21 and 2.0.12 (both released April 1st) added support for the new GitHub token fo... | I usually connect to my website's web host using a windows power shell terminal.While trying to update composer using "composer self-update --2" command, I am getting the error as followsYour github OAuth token for github.com contains invalid charactersI have checked forauth.jsonwherecomposer.jsonfile located but I cou... | Git hub token contains invalid characters |
The rules you have posted above are already present in the .htaccess of HTML5 boilerplate (under the heading# Built-in filename-based cache busting)# Uncomment to enable.
# <IfModule mod_rewrite.c>
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^(.+)\.(\d+)\.(js|css|png|... | My question is:if i add the following code at the bottom of .htaccess file of HTML5 Bilerplate<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]
</IfModule>this will send all REQUEST_URI to my ind... | HTML5 Boilerplate .htaccess rewrite to index.php |
You can get information about a commit using GitHub API.
For example using curl in command line:
curl -X GET https://api.github.com/repos/phdru/ppu/git/commits/63c535d7c6b151c210e344dd4b745407f3911d76
(this is a commit from my repository)
For authentication pass -u:
curl -u user:password …
|
I would like to get commit metadata like that returned by the git cat-file -p <COMMIT-ID> (see this example from Git itself)
$ git cat-file -p a4ee444
tree 34f4cce68fd066d044dcbca866a161fa5c98dc6b
parent 1f9c1fab6421402a9c893a2fcd35fb4cf6116166
parent ffa952497288d29d94b16675c6789ef83850def3
author Junio C Haman... | Get commit metadata from remote repository without fetching commit content |
You need to download the artifact in the deploy job. See theactions/download-artifactaction.deploy:
name: Deploy
needs: build
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: bu... | Below workflow fails when deploying the artifacts to S3. In the last line, in the deployment job, it's complaining that./builddoesn't exist, probably because it can't find the artifacts.The user-provided path ./build does not exist.
##[error]Process completed with exit code 255.How do I make it recognise the artifacts ... | Github Actions deploy artifacts |
Yes, you can push any local branch to any remote branch. The syntax isgit push <remote name, e.g. origin> <local branch name>:<remote branch name>If your current branch (the one you want to push) is calleddevelop, the command would begit push ME develop:xShareFollowansweredMar 11, 2016 at 16:02RomanRoman6,57622 gold ba... | There is a repo say ABC/A. I had forked this repo to my own github say ME/A. I was asked to create a branch on ME/A say x (originally there were develop and master). I had to write some code, so I cloned ABC/A and worked on its develop branch. But now when I have to push the code, I cannot push it to ABC/A as i dont ha... | Pushing code from one branch of a repo to another branch of another repo |
+ (UIImage *)scale:(UIImage *)image toSize:(CGSize)size
{
...
UIImage *scaledImage = UIGraphicsGetImageFromCurrentImageContext();
...
return scaledImage;
}
UIGraphicsGetImageFromCurrentImageContext returns an autoreleased image so does scale:toSize:. Therefore, your loop does not leak.
Your first clue... |
I had a super noob question about assigning objects in objective-c. I basically am trying to create an array of thumbnails to use. I have this code from another post.
+ (UIImage *)scale:(UIImage *)image toSize:(CGSize)size
{
UIGraphicsBeginImageContext(size);
[image drawInRect:CGRectMake(0, 0, size.width, si... | Assigning objects in Objective-C, memory management |
I've been learning Bitbucket Pipelines the last 2 days and a thing that popped right out of your configuration is that you shouldn't have spaces between the branch names.'{master, develop, feature/branchThatDontTrigger}'should be'{master,develop,feature/branchThatDontTrigger}'Also if you want you can include all featur... | Hi guys I've this configs into my bitbucket-pipelines.ymlpipelines:
branches:
'{master, develop, feature/branchThatDontTrigger}':
- step:
caches:
- node
script:......Both for master and develop the pipeline works but since when I've added the feature branches it doesn't start... | Bitbucket pipelines doesn't triggered on feature branches |
"If copy constructor is implemented as silly from-to-string, then everything works OK."Seq(const Seq<_size> &seq) {
Seq(seq.str().c_str());
}Really? Because that constructor doesn't initialize_bytes[]at all. (Instead, it creates a different temporarySeqobject, which is unused and immediately destroyed.) | There is a template class for sequences in 4-letter alphabet (=> 2 bits per letter):template <size_t _size>
class Seq {
private:
const static size_t _byteslen = (_size / 4) + (_size % 4 != 0);
char _bytes[_byteslen];
public:
Seq() {};
Seq(const char* s);
Seq(const Seq<_size> &seq);
...
std::... | memcpy for class-level array in copy constructor leads to segfault |
You could use alabelmapaction inmetric_relabel_configsto fix up these label and metric names.As Alin says though, fixing the source of the metrics is best. A gauge with a 0/1 per instance would be simplest. | I'm trying to handle multiple (around 500) metrics with similar names like:INSTANCE03{INSTANCE03="Dead"} == 1
INSTANCE05{INSTANCE05="Dead"} == 1
INSTANCE07{INSTANCE07="Dead"} == 1Each of them is specified as an Enum which shows status like this:INSTANCE03{INSTANCE03="Dead"} == 1
INSTANCE03{INSTANCE03="Alive"} == 0Is th... | Is there a way to set alert for multiple ENUM metrics with similar name |
Yes, this is possible. Http 2 between your services is negotiated in theALPN(during mTLS handshake).You can then forward traffic from sidecar proxy to your application container with Http 2 by setting yourservice port name (protocol selection)tohttp2.An example service for your app:kind: Service
metadata:
name: myapp... | Is it possible to enable HTTP/2 with TLS(mTLS) termination on Istio Gateway ? And then forward traffic to the application with HTTP/2 | Is it possible to enable HTTP/2 with TLS termination on Istio Gateway? |
4
It is probably undefined behavior, unless you are extra careful.
Deleting the object while your thread accesses it in an unordered (non-synchronized, basically) manner is undefined behavior, even if you get lucky.
Accessing the members of the object (not just running a me... |
I have pointer object to singleton class.
Thread 1: Currently executing a member function of the above said object.
Thread 2: Deletes the above object when the object's member function is still being executed by Thread 1.
What happens to Thread 1 where the member function is being executed? Whether the execution will ... | Object deleted when its member function is being executed? |
1
Install Lua-Curl or another library that does not depend on cosockets. (https://github.com/Lua-cURL/Lua-cURLv3)
If you're using luarocks (comes with openresty), install with
apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev --yes
luarocks install Lua-cURL
Use ... |
I have a similar need to https://github.com/openresty/lua-nginx-module/issues/220
My use case
I'm forwarding files to a remote server, through using proxy_pass.
I need to pass $body_bytes_sent to a remote url, after proxy pass.
I thought about doing a content_by_lua block, with an ngx.capture forwarded to the proxy_p... | How do I issue an http request after proxy pass? Using openresty (lua + nginx) |
You can use$objectToArrayand$filterto achieve this:db.collection.aggregate([
{
$addFields: {
rootAsArray: {
$filter: {
input: {$objectToArray: "$$ROOT"},
as: "field",
cond: {
$and: [
... | I've got this problem and I can't seem to solve it.A sample of my data:[
{'item': 'U',
'field_1': 3,
'field_2': 1,
'field_3': 1,
'field_4': 2,
'field_5': 5,
:
:
:
},
{'item': 'Y',
'field_1': 9,
'field_2': 2,
'field_3': 3,
'field_4': 5,
'field_5': 1,
:
:
:
}
]I would like to create a new field called R... | How to merge columns in Mongo |
That graph doesn't look as if your memory usage "continues to increase". Rather, it looks pretty flat. If you had a significant memory leak, the graph would go up instead.The Python process needs to get memory from the operating system, and then uses that memory to store your Python objects. When Python objects are gar... | I use GAE(google app engine), make a very simple web application.
in the method of processing request, i just create a big array of objects.
After that, i delete all references to the array.
After that, i call gc.collect.But when i test (send request) for a long time, the memory usage of Dashboard continue increase.I l... | Python Google App Engine can not release memory of object array |
Tryfilter=emails eq "xxx4@test".ShareFollowansweredDec 20, 2023 at 9:29Jing MaJing Ma19322 silver badges1212 bronze badgesAdd a comment| | I tried to search for a GitHub SCIM User using thefilter parameter. I triedfilter=emails eq xxx4@testorfilter=emails%20eq%20\"[email protected]\", but it returns:{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": 400,
"scimType": "invalidFilter",
"detail": "Only single... | How to use GitHub SCIM filter? |
I use theAPC extensionas an opcode cache on both my personnal server, and on the servers we are using at work -- and I've almost never run into any kind of trouble with it.Installation is pretty easy : depending on your Linux distribution, you might want to use something like :sudo aptitude install php5-apcBut you'd no... | I was thinking to use opcode caching for performance profitwhat is the easiest way for opcode caching with PHP/Apache ?
and what are the performance improvements ?I have read about xDebug but I was wondering if there are more options ? | what is the easiest way for opcode caching with PHP/Apache? |
To download multiple files from an Amazon AWS bucket to your current directory, you can use the recursive, exclude, and include flags. The order of the parameters matters.
Example command:
aws s3 cp s3://data/ . --recursive --exclude "*" --include "2016-08*"
For more information on how to use these filters: Use of Ex... |
Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily use... | How can I use wildcards to `cp` a group of files with the AWS CLI? [closed] |
The free AWS ACM SSL certificates cannot be used directly in your code. They are only available to attach to load balancers, CloudFront distributions, and API Gateways. If you want to have an SSL certificate on your back-end server you will have to obtain one some other way, such as viaLet's Encrypt, or bypurchasing on... | Currently in AWS Cloud, we have the HTTPS-SSL terminated at the ALB, I am trying to Forward the HTTS SSL/TLS till the Container.I can configure the SSL at the Start upbuilder.WebHost.ConfigureKestrel(options =>
{
options.Listen(IPAddress.Any,5002, listenOptions =>
{
listenOptions.Prot... | What SSL Cert to install in dotnet Kestrel host in non dev environment |
FromHow can I set cron job through PHP scriptbyNick Clark:This will add a script that runs every day at 9:30am.exec('echo -e "`crontab -l`\n30 9 * * * /path/to/script" | crontab -');You may run into problems with permissions if you are running this script from a web server. To get around this, I would suggest a differe... | i am new to cron job . i studied some basics about cron job . i can able to call php using cron tab. By using following command in /etc/crontab10 * * * * root /usr/bin/php /var/www/PATH TO SCRIPT/email.phpIn email.php i have following code#!/usr/bin/php
<?php
mail ("[email protected]", "Cron Successful Pub... | how to set cron job from php script? |
2
It's not quite clear what do you want to do with your huge GZIP file. IIUC you can't read the whole data into memory, because your GZIP file is huge. So the only option you have is to process your data in chunks.
Assuming that you want to read your data from the GZIP fil... |
I have an extremely large dataframe saved as a gzip file. The data also needs a good deal of manipulation before being saved.
One could try to convert this entire gzip dataframe into text format, save this to a variable, parse/clean the data, and then save as a .csv file via pandas.read_csv(). However, this is extrem... | With a gzip dataframe, how can I read/decompress this line by line? |
I figured out that there is no way to find this out via the cli.
You need to check the docker-compose github releases for this.
For example on Ubuntu: v1.25.0 version of docker-compose which is currently the latest and gets to be installed by default, but it is compatible with the 3.7 at highest.
https://github.com/do... |
I have docker-compose 1.25.4 on a system, and docker 19.03. How do I know which version of Compose file format it supports, without trying a bunch or searching through release notes etc?
I determined by trial and error that the highest Compose file format version that docker-compose 1.25.4 supports is 3.7. Therefore, ... | How to determine highest docker-compose file version for the installed docker-compose |
0
I think there is no point in such functionality, because you have only limited amount of process types for app, which you must specify in docker image name: https://devcenter.heroku.com/articles/container-registry-and-runtime#pushing-an-existing-image. Probably they also ... |
I have a Gitlab pipeline that pushes my docker image to registry.heroku. Then, i am supposed to do heroku container:release -a web and my application is correctly deployed. Can I reach and see the images in the heroku registry? I would like to have viusal access - is this possible?
| Can you see the images pushed/stored in Heroku registry? |
I'll assume you want to access a single byte from a multi-byte type such as an int or a short. The common idiom is to cast the address to a char* and deference that like so:#include <stdio.h>
int main(void)
{
int foo = 0xDEADBEEF;
int i;
for (i = 0; i < 4; i++) {
printf("byte %d of foo is x%02X\n... | I was interested in accessing portions of memory I had allocated to get a better understanding of things, lets say I allocate 10 bytes withmallocandprintf("%p", &foo)returns0xff0a, would I be able to allocate0xff0a->0xff1a(my hexadecimal math is bad at the moment) and access any one of those individual bytes?I think I ... | C: Access 'char' in specific memory location? |
One way could be to use Kinesis Firehose, which concatenates multiple incoming records based on buffering configuration of your delivery stream.Send data to Firehose- Either directly put records to Firehose Stream using their API, or attach the Firehose to your existing kinesis stream.Set S3 as your Firehose's destinat... | I'm using AWS Lambda (node.js) as a AWS Kinesis Consumer. I can see that you can set a maximum batch size, but I'm wondering if I can set a minimum batch size. So that I can insure that each lambda will handle at least 50 (or any number) records.I'd like to have a minimum batch size because the lambda consumer will be ... | Kinesis Lambda Consumer Minimum Batch Size |
Can you check your ~/.kube/config file?
Assume if you have start local cluster using minikube for that if your config is available, you should not be getting the error for server.
Sample config file
apiVersion: v1
clusters:
- cluster:
certificate-authority: /Users/singhvi/.minikube/ca.crt
... |
I am doing a lab setup of EKS/Kubectl and after the completion cluster build, I run the following:
> kubectl get node
And I get the following error:
Unable to connect to the server: getting credentials: exec: exit status 2
Moreover, I am sure it is a configuration issue for,
kubectl version
usage: aws [options] <com... | Kubectl command throwing error: Unable to connect to the server: getting credentials: exec: exit status 2 |
2
You can try,
create patches at one shot,
git format-patch <sha_id_from>...<sha_id_to> <path1> <path2>
In your new branch to apply patches,
find . -name "00*" | sort | xargs git am
Share
Improve this answer
Follow
... |
I made many different changes in a single branch and now I want to move some of the changes to a new branch so that my pull-requests are more specific.
Now I know that I can do something like: git checkout <branchname> -- filename
but the catch is that I want to retain the files history.
Currently with my limited git ... | Moving file(s) and it's history to new branch |
You probably want init_by_lua_block - the content_by_lua_block directive is specifically for responding to a particular location, whereas the init_ version is for startup:
init_by_lua_block
syntax: init_by_lua_block { lua-script }
context: http
phase: loading-config
Similar to the init_by_lua directive except that th... |
I'm using Lua with NGINX. My code has a lua method called "rabbitmq.createExchange". I want to call this method, when nginx server starts.
I tried following code, but i failed with error "content_by_lua_block directive is not allowed here". Any solutions?
http {
lua_package_path '/app/nginx/src/?.lua;;';
server {
... | How to call a Lua method on startup in NGINX? |
No, you cannot assume that the garbage collector will collect your object at any point in time.
There is, however, a delete keyword (as well as a scope keyword) that can delete an object deterministically.
scope is used like:
{
scope auto obj = new int[5];
//....
} //obj cleaned up here
and delete is used lik... |
I admit I have no deep understanding of D at this point, my knowledge relies purely on what documentation I have read and the few examples I have tried.
In C++ you could rely on the RAII idiom to call the destructor of objects on exiting their local scope.
Can you in D?
I understand D is a garbage collected language, ... | D Dynamic Arrays - RAII |
3
I had exactly the same problem. My tomcat installation has custom [web.xml] and [conf.xml] files at conf folder, to serve HTTPS connections. In my case, the problem was with a HTTPS security constraint inside [conf.xml] file:
<security-constraint>
<web-resource-collec... |
In the response header of all requests, there is a cache-control: private , and Expires that is set. I'd like to know where this is set.
I have the following setup:
1. F5 load balanced to two CentOS 6.4 servers hosting Tomcat 7.0.42.0
2. I've set an ExpiresFilter for images, css and js files. However, these types are... | Tomcat and cache-control: Private, and Expires: <date in past> - Where is this set? |
You can only use cluster DNS names from inside pods, not from the nodes directly. As for the cert issue, your kube config file will generally include the CA used for API TLS. | I've built 3 nodes on linux academy. On the control plane I can see 3 nodes running. On either of the two worker nodes I try to runkubectl get nodes. Initially I was prompted thatKUBERNETES_MASTERwas not set.Inside the worker nodes, I've tried setting this to the server value found in/kube/configin master. So in worker... | kubernetes node cannot connect to api-server: dial tcp: lookup kubernetes.default.svc on 127.0.0.53:53: no such host |
Thanks to @msaw328 comment here is solution:C:\Users\xxx\Desktop>oc rsh mon-rs-nr-0 bash -c "mongodump --host=rs/mon-rs-nr-0.mon-rs-nr.xxx.svc.cluster.local,mon-rs-nr-1.mon-rs-nr.xxx.svc.cluster.local,mon-rs-nr-2.mon-rs-nr.xxx.svc.cluster.local --username=$MONGODB_USER --password=$MONGODB_PASSWORD --authenticationData... | I have been searching but I cannot find answer to my question.What I am trying to do is to connect to remote shell of openshift container and create db dump, which works if i put username,password and db name by hand (real values).I wish to execute this command to access env variables: (this command later will be part ... | How to pass env variable as parameter value when reverse shell to container |
You can set theautocrlfoption in your git config tofalseorinput.You can set the option when you edit your.git/configfile in the global section or you use the git command linegit config --global core.autocrlf falsehttps://help.github.com/articles/dealing-with-line-endings/Why should I use core.autocrlf=true in Git? | Every time I push to github from my windows machine I see these messages:C:\G\ab>git commit -m "Added new breadcrumb code"
[master warning: LF will be replaced by CRLF in WebUserApp/content/less/body.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Web... | master warning: LF will be replaced by CRLF messages on git push |
Found the answer
the key is to use the vmap function which create a mapping for a given page table. the problem was how to initialize a page table structure to a certain physical address but it appears there exists an API for that as well
here is an example to allocate a single page
void *virt_addr_ptr
struct page **... |
i am writing a piece of code that needs to store 10k of memory located in specific physical address before the SOC shuts down.
My problem is that this physical address is not part of kernel space so i have to create an ad -hoc memory mapping so i can access this memory space.
i tried using io-remap but it doesn't (ap... | Linux - Mapping user space memory in kernel code |
No, you can't increase the size of an array. If you want to use an array, you'll have to allocate a new block, large enough for the whole new array, and copy the existing elements across before deleting the old array. Or you could use a more complicated data structure that doesn't store its elements contiguously.
Luck... |
My C++ algorithm obtains data with unknown size (it detects particles on the image one by one, and I cannot know how many particles will be detected before this algorithm finishes its work).
So, first I want to allocate, say, array with 10000 elements, and during the processing, if necessary, allocate another 10000 el... | Allocate more memory for dynamically allocated array |
With every plugin, we can add section<configuration>
...
<skip>...</skip>
...
</configuration>in an<execution>-block to control when the execution should be skipped. In the given case, we can bind the skip logic to the propertyskipTests:<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<arti... | I have set up Sonar as maven plugin in my pom, and would like the plugin to run only if tests are run. Use case is I want the sonar plugin to run on my CI server, but not when packaging the jar.
Somvn testshould execute the sonar plugin, butmvn -DskipTests clean packageshould not.Today the sonar plugin are running also... | Skip sonar plugin execution if maven tests are skipped |
Update thecrontabcontent to:2 * * * * /bin/bash /home/ec2-user/start.sh >/dev/null 2>&1And then, make sure that thecrontab's user has the permission to run this script. | I have a simple shell script to run a docker command below, which works just fine if I ran it manually. However it didn't work if I ran it by cron. I didn't see any logging in/var/log/cron..
And I tested cron by creating a simple script to touch a file, and it worked fine. Cron doesn't work with docker?cat start.sh
#!/... | crontab cannot run shell script with docker command? |
Session is not cache. Session is a way to get over the fact that web communication is stateless. A "bucket" is set up per session so you can tie to the session. It times out when the user's session times out (generally 20 minutes after his last page hit).If you need something to expire, even per user, you need to use c... | Why can't you set an individual expiry when adding an item to the Session object?WithCache.Add()you can set an absolute expiration and sliding expiration. Why can you not do this withSession? | ASP.NET Session Cache - Individual item expiry |
+50Try with:RewriteEngine on
RewriteRule html search.php [NC,L]If it does not work, you have another problem in .htaccess (Please indicate it in full in your question) or config.Start by clearing your cache before testing. Or try with another browser. | I have a URL likeexample.com/product-name.html.I want to redirect any URLs that contain the stringhtmltosearch.phpbut I want to keep the original URL that was typed in, so ifexample.com/product-name.htmlwas redirected tosearch.phpit should still showexample.com/product-name.htmlin the browser.I am using:RewriteCond %{R... | htaccess if URL contains string redirect to page without changing URL |
0
The syntax <<< grep "pagename" <<< "$line0" is slighly off, <<<X inputs the
string X to the stdin.
The syntax you want is the process substitution syntax (combined with a redirection-arrow):
< <(grep "pagename" <<< "$line0")
Here's also a simpler solution:
#! /bin/bash
... |
I have question about parsing nginx access log,
have error in this code <<< grep "pagename" <<< "$line0"
not work grep "pagename"
while IFS= read -r line0
do
ipList=$( grep -oP '\b(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.... | Parse nginx access log and extract IP, detect geo location for each parsed IP |
If you pass in.trustManager(null), you get the system default which should check certificates based on the default root certs you have on your system.To quote docshttps://netty.io/4.1/api/io/netty/handler/ssl/SslContextBuilder.html#trustManager-java.lang.Iterable-:Trusted certificates for verifying the remote endpoint'... | I basically tried to implement Netty's build in SSLHandler. I had no problems until i implemented the Client-Side SSL.
I tried everything out any neither of all tries actually checked an incoming certificate of a Server. I could basically connect me to invalid SSL Servers.I only saw codes like these on the internet:pip... | Netty: Safe SSL implementation |
Option 1Generally people will save the key into a file namedsecret.keyor something like that and add the file to.gitignoreso that it is not saved in the git repository.The program can then read the key from the file at run time.Option 2You can store the key in an environment variable that is read at runtime.Here is a b... | I would like to share my code to Github in Public , but the APPKey needs to be private . How can I just hide APPKey in the file?
iOS Programming , using Swift4 ,Xcode 9 | How to hide APPKey when using Github |
2
Lets explain how git works (in general).
Git has something called as 3 states.
The 3 states are a very basic piece of git, and the changes you make are reflected in this structure.
3 states
To simplify it look on it like this:
In each project you have 1 of each.
The w... |
Is there a command line tool that can look through a directory recursively for all the .git repos and check for uncommitted code? The use case is I have a machine at work and one at home and sometimes I forget to push code to Github before I go home after work. Does such a tool exist that can do this? Perhaps git itse... | Command line tool to check if any git repos have uncommitted code? |
12
There are many projects offering this — the order below is just for the sake indexing things —:
cheton's github-release-cli in Node (JS)
c4milo's github-release in Go (aims simplicity)
aktau's github-release in Go
And you can even do this directly with curl directly:
O... |
GitHub has a feature on their website that allows you to mark particular snapshots of your repository as release versions of software. Sample URL: https://github.com/github/orchestrator/releases
Is there a way I can do this from the command line, without having to log on and use the interface? I realize the feature ... | How to release versions on GitHub through the command line? |
So far balancers don't forward websocket headers. To make WS working you must have a public IP address and no other services in front of your application.ShareFollowansweredAug 23, 2014 at 3:15DiGiTALDiGiTAL1111 bronze badgeAdd a comment| | I developed our websocket project on wildfly. When we test it on localhost or within our local network, everything work fine. But when I deployed it on AWS, websocket don't work any longer. We can access other html pages. But when we conenct to "ws://ip/project location ", chrome just says hand shake error. I have expe... | Why websocket don't work on the cloud? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.