Response
stringlengths
15
2k
Instruction
stringlengths
37
2k
Prompt
stringlengths
14
160
You need to specify a full path or change current directory before running script. The script has no access rights to create a log file in the directory where cron starts it.
I'm using crontab to execute my script every minute. But script don't work properly. This script should create file, log to another file and write to DB. Only write to DB work. When I start script manually it work fine. This is script:#!/usr/bin/php <?php require 'include/functions.php'; require 'include/logger.php'; ...
Crontab doesn't log to file
I assume you want to get quality gate status. You know that an important part of the analysis (like measure aggregation and quality gate check) is made on SonarQube server asynchronously. We have implemented a Jenkins Pipeline step namedwaitForQualityGate()that will pause your pipeline until processing is done on Sonar...
Please help Me getting result of sonar scanner in jenkins to send email report.I can get sonar scanner's id:${it.getAction('hudson.plugins.sonar.action.SonarAnalysisAction').getCeTaskId()}But I dont get any status process .(I am using ext-email report)
Send email report sonar scanner in jenkins
You need to recreate the pod if you want to define readiness probe for it, for labels an edit should suffice.Following error is thrown by Kubernetes if editing readinessProbe:# * spec: Forbidden: pod updates may not change fields other than `spec.containers[*].image`, `spec.initContainers[*].image`, `spec.activeDeadlin...
We have deployed etcd of k8s using static pod, it's 3 of them. We want to upgrade pod to define some labels and readiness probe for them. I have searched but found no questions/article mentioned. So I'd like to know the best practice for upgrading static pod.For example, I found modifying yaml file directly may result ...
Best practices for upgrading static pod in kubernetes
Those wouldn't be "detached HEAD": adetached HEADis when you check a ref which isn't a branch.You would like to seereflogsfrom a GitHub remote repo, but as far as I know, those are not accessible. And reflogs don't get cloned.See also "git can I view the reflog of a remote?"
Questions about Git dangling commits on systems like GitHub and BitBucket:Do these systems garbage collect, so that dangling commits would eventually get removed? (I know they are bad for other repos users, I'm just exploring what-ifs)Is there a way to fetch/clone the remote repos so these commits are included (ie get ...
Do web interfaces like GitHub garbage collect dangling remote git commits, and if not is it possible to fetch them?
There is no way to send an archived file and extract it in GitHub. However, Like Fake Name said, you need to download Git on your system and use it to send your files to GitHub. You can go through the tutorials on Git here.
I want to add a folder that has 713 files 150 folders inside it. Uploading directly shows an error that I cannot upload more than 100 files at once. Is there any chance I could upload a .rar file and then later extract in github?
How to upload more than 100 files at once in github?
as yasen said, it's impossible to have import directive. finally what I have did is as follow: link to github repository create a template text file with EXPOSE ${{ EXPOSED_PORT }}: FROM golang:1.17 AS builder WORKDIR /app COPY . . RUN go mod download && make ent-generate RUN go build -o /bin/app ./cmd/root.go ...
What I have, are multi similar and simple dockerfiles But what I want is to have a single base dockerfile and my dockerfiles pass their variables into it. In my case the only difference between dockerfiles are simply their EXPOSE, so I think it's better to keep a base dockerfile and other dockerfiles only inject that ...
using shared dockerfile for multiple dockerfiles
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ && chmod 0440 /etc/sudoers.d/$USERNAME ``` Those two lines defeat the entire reason for not running your container as root. It's a passwordless escalation to root making the user effectively the same as having full root access. docker...
I don't want to use root, for safety, so I did as VSCode suggests, here's my Dockerfile: FROM ubuntu:focal # non root user (https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user) ARG USERNAME=dev ARG USER_UID=1000 ARG USER_GID=$USER_UID # Create the user RUN groupadd --gid $USER_GID $USERNAME \ ...
Can I run docker without root in github actions?
Thedocker runcommand will start a new container from the provided image. Usedocker startto restart a previously stopped container.If you want to save changes back to the image, it is possible to use thedocker commitcommand, but this is almost definitely not what you want. Instead, use a Dockerfile to build images and u...
I created a few docker images, i did wget and apt-get install on one.Everytime I exit the docker instance, after going back to the image again, e.g. ubuntu:myimage it seems to spawn a new fresh version of it so that means all my apt-get install and wget are "lost".I realized it's not persistent so i did docker commit.....
Is docker an ephemeral instance?
The beginning to the answer you're looking for is here :Angular-cli: How can I access images outside of the assets folderIn the glob object, be sure to addallowOutsideOutDir:{ "glob": "**/*", "input": "../../path/to/files", "output": "./assets/outside-assets", "allowOutsideOutDir": true }For example, if you hav...
I am working on an angular 5 application where I am having some issues access some files. Let me give show you how my project is set up so you can see the issue.rootdesired_filesangularAppapp_generating_filesSo my issue is I need to be able to access the files in thedesired_filesfolder from my angular application. The ...
Accessing files outside project folder
Wrap up the model creation and training part in a function then use subprocess for the main work. When training is done, subprocess will be terminated and GPU memory will be free. something like: import multiprocessing def create_model_and_train( ): ..... ..... p = multiprocessing.Process(target=create_m...
I am fitting a model in a for loop, but I am getting an error that my GPU's memory is full. I am using Keras in Anaconda Spyder IDE. My GPU is a Asus GTX 1060 6gb. I have also used codes like: K.clear_session(), gc.collect(), tf.reset_default_graph(), del custom_model but none of them worked. GPU properties say's 98% ...
How to clearing Tensorflow-Keras GPU memory?
Apache's mod_rewrite automatically decodes urlencoded strings when it does regex matching. But it only does this once, so you should be if you urlencode your string twice. This will re-escape all of those `%' characters.try$link = 'http://www.mydomain.com/'.urlencode(urlencode($str)).'/1';or stop relying on rewrite rul...
In my code, I create a link like this:$link = 'http://www.mydomain.com/'.urlencode($str).'/1';I use url-rewriting and the rule in my htaccess file looks like this:rewriteRule ^(.+)/(.*)$ index.php?var1=$1&var2=$2 [NC,L]This code is working fine for almost every strings. But sometimes, the string to encode contains "&"....
PHP $_GET var with urlencode and "&" bug
You can use loop with_items over a array of dictionaries. Then filter appropriate items using inventory_hostname or ansible_hostname:- name: cron jobs cron: min=0 hour={{ item.h }} job="echo server {{ item.s }} cron job started" state=present when: inventory_hostname == item.s with_items: - { s: 'hosta', h: 1 }...
I have the need to configure a cron job to run at different hours on multiple hosts. Ideally I would like to have an index that identifies the host I am currently modifying and offset it.So if I run ansible against:HOSTA HOSTB HOSTCI want to configure cron to be like this0 1 * * * #HOSTA 0 2 * * * #HOSTB 0 3 * * * #HOS...
Ansible: Run cron at different hours per host
You could use a version number as URL parameter... This way it won't be re-downloaded each time Flash Player loads, only when you actually change the version number
I have a flash application that loads a big chunk of data that changesoccasionally, so I set up my server to sendLast-Modifiedheaders and reply with a304 Not Modifiedwhen the client's version is not outdated.It works fine in every browser, but Flash completely ignores that and caches the resource aggressively. It doesn...
Fixing Flash's aggressive caching
For some reason you have to use the workflow name instead of the yaml file name. This worked for me<a href="https://github.com/pgonzaleznetwork/forcemula/actions/workflows/nodejs.yaml"> <img src="https://github.com/pgonzaleznetwork/forcemula/workflows/Tests/badge.svg?style=flat" /> </a>
I have run many times github actions on my repo without problem and with the same script on one of my repo it is displaying “no status”. The repo is:https://github.com/aurelpere/python-planifI dont understand why it is not displaying a status as the workflow runs correctly… Any help would be great thank youNotice my sv...
Github Actions badge shows no status
You can't do this in the UI, but you can get the data you need using the Web API:/api/issues/search(documentedhere) can list all the issues of a given project (useprojectKeys). And to your question: set thefacetsparameter torules, the returned JSON will then list the violated rules (and even count the violations per ru...
I'm using SonarQube 5.3. We have 241k issues in our codebase. But when I filter out say, the "Major" issues and click on the "Rule" box to see what rules were violated, I can only see the first 15. Is there a way I can find out all of them?I've edited this question to add a screenshot. Notice on the left under "Rule" t...
SonarQube - How to see more than the first 15 violations?
Try this in your .htaccess file:Options +FollowSymlinks -MultiViews RewriteEngine on # for http RewriteCond %{HTTP_HOST} ^(www\.)?domainA\.com$ [NC] RewriteCond %{SERVER_PORT} =80 RewriteRule ^(.*)$ http://www.domainB.com/$1 [R=301,L] # for https RewriteCond %{HTTP_HOST} ^(www\.)?domainA\.com$ [NC] RewriteCond %{SERV...
I'm now migrating my website to a new host and domain, and I want to know if I can redirect anyone who enters any URL of the old website to the new website, while keeping all of the URL parameters. for example:When somebody types in this urlhttp://www.domainA.com/blog/?p=667, I want him to be redirected tohttp://www.do...
How to redirect a URL by only changing the domain name, while keeping other URL parameters
With git it's possible to squash previous commits into one. What I would suggest is for you to add another commit. And squash the the commit with wrong user with the last commit you added. Let assume you have the following commits from the git log --oneline -2. xf71a11 - last commit 1a9ddqw - commit done with the wro...
I accidentally added a commit with the wrong user name and pushed it to the remote. Now I want to remove that particular commit but I want to keep the changes. Is there a way to do this? I tried git reset but that would mean I would lose the changes. Is there a way to squash the commits?
How remove a remote commit without removing the changes
Hello try using the next code in the head of your document, basically what it does is to set path for all scripts and css files to the actual root of the php document and not what the address in the browser is set up to your using. so what it actually does is once set in the head before importing anything else php will...
I'll try to make this brief. This is my first attempt using HTACCESS to create "user-friendly URLs". I've set up my .htaccess file so that when a user clicks a link thatappearsto be in a subfolder, it loads a file within the root. ex:RewriteEngine On RewriteRule ^([^\.]+)$ $1.php [NC,L] RewriteRule ^current-com...
.htaccess referencing images from subdirectories
Assuming this is your literal code:require_once('/wp-includes/class-phpass.php');No wonder the file can't be found, asrequireoperates on the filesystem level, so you probably need something like/var/www/mysite/wp-includes/class-phpass.phpinstead.You should be able to get it work like this:require_once $_SERVER['DOCUMEN...
I have a web site made by wordpress and I made some php files that i want to execute and for some reason I need to require_once(/wp-includes/class-phpass.php) but I got Failed opening required Error, there is a htaccess file in root folder and it doesn't exist in wp-includes folder the htaccess contain this:# BEGIN Wor...
how to allow require_once() to php file in wordpress
Finally I'm done this exercise by creatingBash automation script, following these steps:Created Docker image with application binary.Created EKS Cluster usingeksctl create cluster <PARAM>, which creates EKS Control Plane and Worker nodes.Created Kubernetes Deployment File using Docker image and Deployed usingkubectl a...
I'm trying to deploy Kubernetes application in AWS EKS through Jenkins.I visited few of blogs, they mentioned Jenkins X. But JenkinsX need to be configured separately. But as per instruction, we need to use our existing Jenkins for K8S app deployment.Note : AWS EKS and Jenkins are Separate machine(We using our existing...
how to deploy kubernetes application in EKS through Jenkins
k&r - http://en.wikipedia.org/wiki/The_C_Programming_Language_(book) nuff said
I am fairly comfortable coding in languages like Java and C#, but I need to use C for a project (because of low level OS API calls) and I am having some difficulty dealing with pointers and memory management (as seen here) Right now I am basically typing up code and feeding it to the compiler to see if it works. That...
Learning C coming from managed OO languages
I encountered the same problem and my solution is quite simple:After my first commit, 'Save' button is disabled.Click the dropdown menu, select 'None' in the dropdown menu. Now, you can see the 'Save' button is enabled. Save this selection.Again, click the dropdown menu, select the branch from which you want to build t...
I'm about to save my gh page and there is a message which said "GitHub Pages is currently disabled. Select a source below to enable GitHub Pages for this repository." and I can't click save
Github pages can't save
About your first Question: I've just faced a similar issue recently (but extracting a csv) and I would like to register my solution.Power BI still don't have a direct plugin to download S3 buckets, but you can do it using a python script.Get data --> Python ScriptPS.: make sure that boto3 and pandas libraries are insta...
Need some guidance as I am new to Power BI and Redshift ..My Raw JSON data is stored in Amazon S3 bucket in the form of .gz files (Each .gz file has multiple rows of JSON data) I wanted to connect Power BI to Amazon s3 Bucket. As of now based on my research I got three ways:Amazon S3 is a web service and supports the R...
Connecting Power BI to S3 Bucket
There is not a way to do this through the BCL APIs. Turning it off for the profiling of a particular algorithm is also not a great idea because it will yield false results. The garbage collector will run during the execution of your program. Profiling without the GC could hide real problems with your algorithm if ...
I'm running some performance tests on some .NET code that processes lots of data. I want some tests that ensure the garbage collector isn't influencing my results. How do I temporarily pause the garbage collector?
How to pause Garbage Collection in .NET?
If you are willing to take the cost of increasing the use count then as far as I can tell both boost::shared_ptr and std::shared_ptr will do: #include <iostream> #include <vector> #include <memory> #include <queue> #include <boost/shared_ptr.hpp> template< typename T > struct deref_less { //typedef std::shared_ptr<...
The interface of STL and boost priority queues includes T const & top () const; void pop (); The latter deletes the top element. But what if I want to keep using that element after I pop() it, and I want to avoid copying? E.g., suppose I have a priority_queue<T> pq. I'd like to write const T& first = pq.top()...
How to avoid deleting priority_queue::top() despite a pop()?
There is not --link option for docker exec. If you want to backup using a special script: Create a new image db_backup starting from the postgresql one (the one that the db container uses), adding the backup script to some folder. Do docker run --volumes-from db db_backup your_backup_script.sh.
I want to execute a command that uses commands from multiple containers. E.g., I want to execute a backup script that used psql and pg_dump commands. docker exec db_backup pg_dump failed to exec: exec: "pg_dump": executable file not found in $PATH docker run has an option --link. Is there a similar option for exec? T...
Docker: Run commands from multiple containers
1 Pretty sure you can only run one command with ENTRYPOINT and with CMD. From their docs: There can only be one CMD instruction in a Dockerfile. If you list more than one CMD then only the last CMD will take effect. Same thing with Entrypoint: ENTRYPOINT has two form...
I have basically a docker image of a node js application. REPOSITORY TAG IMAGE ID CREATED SIZE abc-test 0.1 1ba85e0ca455 7 hours ago 1.37GB I want to run npm test from folder /data/node/src but that doesn't seems to be working. Her...
Run npm test inside a docker image and exit
TortoiseHG uses~/mercurial.inifor the HG settings, but other mercurial installations might use~/hgrcor~/.hgrc. Make sure you know which one is right for you.In yourmercurial.iniorhgrcfile, add the following:[paths] ssh = ssh -C -i ~/.ssh/bb_rsa [ui] ssh = ssh -C -i ~/.ssh/bb_rsaOne or both will do the trick for you.Aft...
This will be a question and an answer together.My goal is to have GitHub(via git) and BitBucket(via hg) co-exist on the same machine, both using SSH keys for all repos of each respective type.Setup: Windows 10 git-scm tortoisehg(Despite using Win 10, I'll be describing bash paths. Anywhere you see a "~", just replace t...
Set up simultaneous SSH keys for GitHub and BitBucket
4 You can identify the resources created by cloudformation. Cloudformation applies few default tags as mentioned here aws:cloudformation:logical-id aws:cloudformation:stack-id aws:cloudformation:stack-name You can run a script to check whether the resource contain one...
I'm new to a large AWS deployment where stuff is mostly deployed through CloudFormation (and some through Terraform). But there are always cases where something has been deployed manually and not through code. Is there a reliable way to quickly figure out if a resource (say, an EC2 instance) already existing in the de...
Check if AWS resource has been deployed by CloudFormation
Use this instead :RewriteEngine on RewriteRule ^(index\.(html?|php))?$ /new/index.php [L,NC,QSA,R=301]If you don't want people to see there address bar changed to /new, remove theR=301flag.You can have more information aboutmod_rewrite here
i want redirect to new/index.php when people typesite.com site.com/index.php site.com/index.html site.com/index.htmSo this code below maybe right ?Options +FollowSymLinks RewriteEngine on RewriteRule ^index\.(html|php|htm)$ new/index.php
rewriteurl - redirect to new path
How big is your dev team? It sounds to me like the simplest solution is:Clear communication to the dev team not to change these files.As @Basile Starynkevitch mentioned, a build-time check to catch changes quicklyIf desired, a git pre-commit hook. Yes, it's easy to get around, but to do so they have to explicitly go a...
In our Git repository we have about ten very important files. These files are referenced by lots of other files, so if they get moved stuff breaks. But because of how we have our dev environment setup, this breakage won't be detected immediately, so what happens is: 1) a developer moves an important file, 2) they pus...
Git: Any Way I Can Prevent *Most* Users From Editing Files?
Changecron.txtby full path/var/www/my_system/cron.txt// /var/www/cron.php $myfile = fopen("/var/www/my_system/cron.txt", "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); $txt = "Jane Doe\n"; fwrite($myfile, $txt); fclose($myfile);Or move to directory:chdir("/var/www/my_system"); $myfile ...
How can I run a cron task in Linux?Following thisQ&A,I have this cron task to run - just writing some info to a txt file,// /var/www/cron.php $myfile = fopen("cron.txt", "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); $txt = "Jane Doe\n"; fwrite($myfile, $txt); fclose($myfile);But after...
Linux cron task - how to add and run a cron task?
<div class="s-prose js-post-body" itemprop="text"> <p>This is possible with <a href="https://docs.docker.com/engine/reference/commandline/stack_deploy/" rel="nofollow noreferrer">docker stack deploy</a></p> <p>Example Compose File in your environment section:</p> <pre><code>- MY_VARIABLE_NAME=${MY_VARIABLE_VALUE} </cod...
<div class="s-prose js-post-body" itemprop="text"> <p>In my docker compose file there is a dynamic field which I'd like to generate during the running. Actually it is a string template:</p> <pre><code>environment: - SERVER_URL:https://0.0.0.0:${PORT} </code></pre> <p>And I want to configure this <code>PORT</code> p...
Pass argument to docker compose
2 In theory, as illustrated in "Django Development With Docker Compose and Machine ", you should have one container per service: 1 web/Django container 1 nginx container 1 Postgres container 1 Redis container 1 data container . For the proxy part, Thomasleveil mentions ...
I would like to setup a Django environment in a docker container. Should I add the reverse proxy (nginx) in the same container as the Django app or should I have two containers?
Should I add the reverse proxy in the same container as the application on docker?
The Kubernetes control plane pods are often deployed asStatic Pods. These are not managed by any kind of Deployment controller, but are defined in static (hence the name) configuration files that are placed in a configuration directory (like for example/etc/kubelet.d/or/etc/kubernetes/manifests, depending on how your c...
Just curious, with mesos I'm used to being able to dosystemctl stop mesos-masterandsystemctl start mesos-master(if I need to bounce it for some reason). With k8s, there are multiple components to 'stop' in the control plane, such as apiserver, controller-manager, etc.When creating a cluster with kubeadm, it runs the co...
How can I stop Kubernetes control plane pods?
The easiest way would be to write your own module for nginx in Lua. Lua-resty-string module already supports AES. Add some file handling code reading code and you are done. Lua modules are very quick as they work in non-blocking I/O. The important part to remember about is handling a padding - the original file size m...
I store encrypted (AES 256) files on nginx. I open them by GET request and use a key as a query parameter. For examaple http://www.my_secure_nginx.com/files/secret_audio.mp3?key=mysecretkey Can you please suggest solution how to do it for nginx file server (maybe existing filters) to maintain chunked responses. In an...
How to do on-the-fly decryption on nginx?
There is a useful scriptphp-gaby thomas bachem on github. I'm sure you could configure it to run daily.Sample (basic) code:use UnitedPrototype\GoogleAnalytics; // Initilize GA Tracker $tracker = new GoogleAnalytics\Tracker('UA-12345678-9', 'example.com'); // Assemble Visitor information // (could also get unserialize...
Currently I am in need to show the reporting of my client websites. All of the websites have the GA code installed on the. I want to show the Basic Report of the visitors based on the Google Analytics (GA code) on each of the websites.I looked at many threads and php classes as well, and stopped at 2 links 1.https://c...
Want to show Google Analytics API on my client websites with very basic report saving in PHP via cron job
Hi Elessar you can configure an "always" in the post steps. Mainly it will run the command inside always without depending on the build cancelation, fail or success. pipeline { agent any stages { stage('Example') { steps { sh "docker run -i --rm test" } ...
I have a docker container that performs some tasks and is scheduled inside Jenkins pipeline like this: pipeline { stages { stage('1') { steps { sh "docker run -i --rm test" } } } } If the pipeline is aborted somehow, by timeout or manually for example, t...
Jenkins pipeline is unable to terminate a docker container
+50All garbage collectors I'm familiar with work by collecting memory which can no longer be accessed, e.g. all (the transitive closure of) variables pointing to it went out of scope. But that's an under-approximation of the set of of memory spaces that can be collected, because at any point a memory location may still...
I was reading the Javascript tutorial of Mozilla and I come through this piece of information.High-level languages embed a piece of software called "garbage collector" whose job is to track memory allocation and use in order to find when a piece of allocated memory is not needed any longer in which case, it will automa...
Why knowing whether some piece of memory is needed is undecidable?
Presuming this was previously working, then something messed up time on your machine. Run a NTPd to fix this.ShareFollowansweredFeb 13, 2017 at 9:44brian-brazilbrian-brazil32.8k66 gold badges9797 silver badges8888 bronze badges2Ok so I'll check that–JeromeFeb 13, 2017 at 9:58If you're on ubuntu you can fix the time wit...
This morning I had a problem with Prometheus, it was -2 hours late. So I had error about time stamp and no data were synchronized.So is there a way to re-sync the time of Prometheus ? (I diddocker-compose downthendocker-compose upbut I don't want to do that every time)https://github.com/stefanprodan/dockprom/issues/9--...
How to re-synchronize the Prometheus time?
Suppose You have 5 CU pods running and ClusterIP service for them. Now when you send request to that service, load balancing will happen internally and service will forward request to a pod which is having less load. This is to maintain high availability of your backend pods. So in your case even if some of CU pods are...
I'm quite new to Kubernetes: my question may be more a question of design than of code. I was wondering: how Kubernetes can handle communication between one pod and replicas of another pods? My case is simple I have an API pod which pass parameters provided by an UI to a compute unit pods. I will have many replicas of ...
Kubernetes/Helm: Deploy multi pod each one having its proper parameter
Node.js itself (by default) doesn't do any caching, although OS and other lower layer elements (e.g., HDD) may do it, speeding up consecutive reads significantly. If you want to enable cache'ing http responses in nodejs there is a http-cache library - https://www.npmjs.com/package/http-cache and request-caching librar...
i'm wondering if node.js is using cache for the follow scenario or if a module for that is existing: When you have for example a web-portal which shows you at the startpage 20 products with images, every time the server has to fetch the images from the hdd or in best case from a ssd. for every single image just to fin...
does node.js/ngnix using a intern cache for often used files?
Pods will always try to be scheduled across different nodes, to achieve what you are looking for you can try to useDaemonSet, which will allow only one of these kind of pods in each node.Also, you can use anti affinity based on the already scheduled pods in that node.https://kubernetes.io/docs/concepts/configuration/as...
Is there anyway I can tell Kuberbetes how to schedule the replicas in the statefulset? For example, I have nodes divided into 3 different availability zones (AZ). I have labeled these nodes accordingly. Now I want K8s to put 1 replica in each AZ based on node label. Thanks
Statefulset's replica scheduling questions
1 1) You need to make sure that your video is formatted/encoded in such a way that it can support streaming. For MP4 video, the moov atom must precede any mdat atoms, but must succeed the ftyp atom. 2) You need to make sure that the encryption being used supports random a...
I have a very big(>1 gb) encrypted file, When I decrypt it, I get byte array in chunk with method such as getByteArray(position,size) Here position determines the position from where the byte array has to be extracted and of which size. Now I want to play the byte array chunks so received without writing them to a ...
Play Video from byte array
You must bind udp port for graylog2 container. docker run -t -p 9000:9000 -p 12201:12201/udp graylog2/allinone
What I'm trying to achieve is to redirect python print from one docker container to the other (without any modification inside python code), with graylog2 (I'm currently using older version, all in one). So my first docker instance contains graylog server. I created second instance with Dockerfile, using Ubuntu and i...
Redirect python print output to graylog2
You should decode with inSampleSize option to reduce memory consumption. Android: Strange out of memory issue while loading an image to a Bitmap object (stackoverflow) Another option inJustDecodeBounds can help you to find correct inSampleSize value How to get bitmap infomation before decode an image file? (Googl...
I was trying to make an app which also had the facility to let user select wallpaper he would like to set. I have managed this by calling the Gallery Intent. Once the user selects a specific image, the data path of the image is returned to me which then i preview to the user by setting the image onto an imageview. The...
setting wallpaper through code
The organisation has recently rolled out some IT updatesCheck first the Git version: if, as part of those rolling updates, you have a Git 2.32 (latest one), then you would get the errorI described here, referring toissue 3264orissue 3268Possible workarounds:use the old credential manager:git config --global credential....
The organisation has recently rolled out some IT updates - upgraded all our PCs to Windows 10, and also reviewed and updated their security, firewall etc.It's not my job, so don't know exactly what changes have been made.I have cloned a repo from GitHub using Git Bash, and configured my user details.git clone https://g...
Checking if GitHub is blocked by organisation network
You can look at your signing capabilities by either looking at the output of --edit-key or GnuPG's colon-separated output. Looking at your key, I see that you have a bunch of expired subkeys (some with signing capability), and a primary key that has signing and certification capabilities set. The primary key's expiry ...
I've used my OpenPGP key to sign a git commit, but it shows up as "Unverified" on github: https://github.com/cweiske/jsonmapper/commits/master The usage flags for the key that signed this don't allow signing. GPG key ID: 14C85A0824EAF823 The github gpg signature docs say nothing about that error. So my questions: H...
github: PGP key usage flags do not allow signing
The caching itself doesn't have to be done on the main thread. You can get a copy/reference of the image context or bitmap data, and launch it using an NSThread only when the rendering is done. Example:- (void) drawRect:(CGRect)rect { do_rendering_here(); // when rendering completed: NSThread *t = [[NSThrea...
I have a drawRect method that is rather slow (100-200ms). To save time, I need to cache the results. I am doing the actual caching like this:// some code to check if caching would be desirable goes here. If it is desirable, then UIGraphicsBeginImageContext(viewSize); CGContextRef c = UIGraphicsGetCurrentContext(); [...
Schedule a low-priority task on the main thread
mmap reserves a region of the process's virtual address space, but does not immediately allocate physical RAM for it. Therefore, on a 64-bit platform, you can reserve a vast amount without failure (although you still need to check for failure; your example code doesn't). Physical pages of RAM are allocated later when ...
I try to use mmap() to manipulate virtual memory. I want to reserve and commit a region of memory. I tested this code: const unsigned long gygabyte = 1024 * 1024 * 1024; const unsigned long gygabyteCount = 2; const unsigned long maxCapacity = gygabyteCount * gygabyte; int main() { char* pMemory; pMemory = (c...
Why does calling mmap() with large size not fail?
Not sure if this related to Rails 3. I just recently had problems running Mongrel 1.1.5 and Rails 2.3.8 Apparently, there is a bug in this set up where our production machine does not prompt for the user name and password (but works locally, because we are using web-brick). In the mongrel.log we keep getting this er...
I've get an action in my Rails 3 app that I'm pw-protecting with authenticate_or_request_with_http_basic. Working fine on my development machine but it's not prompting for the http_basic user/password on the production server. The entire production app runs over https/SSL on nginx. Where do I look to resolve this? D...
Rails authenticate_or_request_with_http_basic not working on SSL + Nginx
First of all, make sure MySQL's slow queries log isn't what you need. Also, MySQL's-eparameter allows you to specify a query on the command line.Turning the logic around, this saves the process list and removes it when the process list isn't long enough:date=$(date +...) # set the desired date format here [ $(mysql -ur...
Our mysql processes can sometimes get backlogged and processes begin queuing up. I'd like to debug when and why this occurs by logging the processlist during slow times.I'd like to runshow full processlist;via a cron job and save output to text file if there are more than50rows returned.Can you point me in the right d...
How can I log "show processlist" when there are more than n queries?
You canverifythat it is freeing the memory by using a memory checker like Valgrind. A memory checker will let you know at the end of your program's execution if you left any memory dangling. Additionally, Valgrind can check for a wide range of memory misuses (going off the end of an array, using deallocated memory, uni...
Is this solution enough to deallocate the linked list? How can I verify it is freeing the memory that was allocated to the list?void freeList(EmpList** listHead) { EmpList* iter = *listHead; while(iter != NULL) { iter = iter->next; free(*listHead); *listHead = iter; } }Here's th...
Deallocating linked list
You should consider usingLambdafor any S3 event-based processing. Why launch and run servers when you don't have to?
I'm running a python script, using Boto3 (first time using boto/3), on my local server which monitors S3 bucket for new files. When it detects new files in the bucket, it starts a stopped EC2 instance, which has software loaded onto it to process these said files, and then needs to somehow instruct S3/EC2 to copy the ...
Copy files from S3 onto EC2 instance using Boto3 (script running on local server)?
In my own testing I also found that applications run from the "Home Screen" on iOS won't properly refresh their CSS and JS files. This appears to be an ongoing problem. The only solution that worked for me was to:Change the device date forward by 2 days or so..Reload the app from the Home Screen..Reset the date.I al...
I'm having a very strange issue with my web app (which is ran in full-screen mode from the home screen) and Mobile Safari. Usually, as I develop, I edit the files with the changes that I want to make and then I re-launch the app from the homescreen. As per iOS design, the web app will refresh and reload the site.Howeve...
Anyone experience caching issues with web apps ran in full-screen mode iOS/Mobile Safari?
SeeCreate Tags. It expects key value arguments.Tagsis a list of dictionaries. You can create more than one tag if you want.ec2.create_tags(Resources=['i-1923943832310'], Tags=[{'Key':'name', 'Value':'apphostname'}])
I am trying to create a new tag calledNameand value hostnameapphostnamefor an Amazon EC2 instance.Below is my code, and it is failing with this error message:>>> ec2.create_tags(["i-1923943832310"], {"name": "apphostname"}) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python...
Boto3 script to create instance tag
If the repo is private, it's likely that thetokenargument expires so that accidental disclosure of the URL does not prevent access to the data without possibility of revocation. My recommendation is to arrange to construct the URL dynamically after fetching thetokenparameter in the context of your current session.
I am trying to download a large .csv file from where I have it stored in my github to a notebook I have in google colab. Here is the scheme of the code I am using:#download fixed data sets import pandas as pd import numpy as np url_train = 'https://raw.githubusercontent.com/username/data/master/train_fixed.csv?token=[l...
Url to raw github csv keeps changing when I try to download to google colab
There's also theFollowSymlinksoption in Apache, which is generally disabled by default. You can enable it by doingOptions +FollowSymlinks
I have a folder in my root MAMP directory, "site". I have that symlinked to a folder in ~/Documents/Dropbox/site, so whatever happens in "site" gets transferred to Dropbox.However, when I do this, I get a 403 forbidden error when trying to viewlocalhost/site- is this a problem because I'm using PHP and I should fix php...
Symlinked MAMP Folder Causing 403 Forbidden
Well,Speaking from my own experience in this matter. It seems that if you don't specify a memory limit when running a docker container, you would get a default chunk of memory. The bigger your machine RAM is, the bigger chunk you get. One I set the limit to 1GB (docker run -m=1g) the process only used ~300MB, like it ...
I am running the same docker image, both locally on my Mac laptop, and on an Ubuntu machine on the cloud. I noticed that it consumes 350MB on my machine while it takes 2.7GB on the remote machine. Remote:Docker version 19.03.1, build 74b1e89e8a. Local:Docker version 18.09.2, build 6247962Eventually I used all my memory...
Why does the same docker image consume different amounts of memory on different environments
us-east-1 is a specific region as discussed in some AWS doc as below:https://aws.amazon.com/fr/blogs/developer/leveraging-the-s3-and-s3api-commands/For example, if I make a bucket located in the Frankfurt region using the s3 commands:$ aws s3 mb s3://myeucentral1bucket --region eu-central-1 make_bucket: s3://myeucentra...
Don't know why this happens, but getting null for location callaws --version aws-cli/1.10.62 Python/2.7.11 Darwin/16.1.0 botocore/1.4.52 aws> s3api get-bucket-location --bucket joshuacalloway-us-east-2-bucket { "LocationConstraint": "us-east-2" } aws> s3api get-bucket-location --bucket joshuacalloway-us-east-1-buck...
s3api get-bucket-location returns null for us-east-1 bucket
TheClusterRoleBindingrefers to a serviceaccount inais-servicenamespace but the serviceaccount does not have a namespace which means the service account is created indefaultnamespace. Add namespace in serviceaccountapiVersion: v1 kind: ServiceAccount metadata: name: deploy-agent namespace: ais-service annotations:...
I have the following configapiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: name: deploy-agent-rbac subjects: - kind: ServiceAccount name: deploy-agent namespace: ais-service roleRef: kind: ClusterRole name: cluster-admin apiGroup: rbac.authorization.k8s.io --- apiVer...
Kubernetes cluster permissions for watching deployments not picking up events
Take a look athttp://php.net/manual/en/function.preg-replace.php, and just do 2 string replacements.one: replacepageswithindex.php?pages=on, second replace/with&ShareFollowansweredMar 6, 2011 at 14:34antant22.7k3636 gold badges134134 silver badges183183 bronze badges3but I need to do this in htaccess, where I can't use...
What I wantImagine 3 feeds in a single page what have unique contents and I would like to have a pagination for each feed, so I can paginate 3 feeds at the same time, and when I change a feed's page that doesn't affects the other feeds currently selected pages.So when I change feed3 to page 12, feed1 remains on page 2 ...
Regex / htaccess : Multiple Pages
RewriteCond %{HTTP_HOST} ^(^.*)\.example.com RewriteRule (.*) example.com/%1/index.phpThe same principle applies for the domain (although theCondPatternyou are using here appears to be invalid?). It looks like you need the domain+TLD (basically, everything after the subdomain), so try something like:RewriteCond %{HTTP_...
For example, I have URLsubdomain.example.com.How can I get thesubdomainanddomainfrom the URL in.htaccess?I need to do something like:RewriteRule (.*) example.com/subdomain/index.phpI figured it out for asubdomain, but still no luck for thedomain.RewriteCond %{HTTP_HOST} ^(^.*)\.example.com RewriteRule (.*) example.com/...
How to get the subdomain and domain in htaccess
Nice to hear that you started using Ditto in your project. You need to set the following env variables to connect to your Cloud hosted MongoDB. MONGO_DB_URI: Connection string to MongoDB For more detailes see: https://docs.mongodb.com/manual/reference/connection-string/ If you have a ReplicaSet your MongoDB URI should...
I am fairly new to Eclipse Ditto and have just started using it for my project. I am trying to connect Cloud hosted mongodb instance to ditto. Following the documentation I know that I need to add some variables and pass them to docker-compose. The problem is that I do not know what should be the values of these varia...
How to connect Eclipse ditto to mongodb cloud
The behavior ofdocker-composewhen a scale is requested is to create additional containers as per the exact specification provided by the service.There are very few specification parameters that will vary during the creation of the additional containers and thedeviceswhich are part of thehost_configset of parameters are...
I have a docker-compose file that looks like the following:version: "3.9" services: api: build: . ports: - "5000" deploy: resources: reservations: devices: - capabilities: [gpu] count: 1When I rundocker-compose up, this runs as intended, using the first ...
docker-compose: Reserve a different GPU for each scaled container
I create an endpoint.yml file and add in this file below commands, this solve my problem: apiVersion: v1 kind: Endpoints metadata: name: jenkins-server subsets: - addresses: - ip: my-ps-ip ports: - port: 8080 Then, I change this line in my flask app like this: server = jenkins.Jenkins('htt...
i have a question about kubernetes networking. My working senario: I have a Jenkins container my localhost and this container up and running. Inside Jenkins, i have a job. Access jenkins , i use "http://localhost:8080" url. (jenkins is not runing inside kubernetes) My flask app, trigger the Jenkins job with this com...
How can access running app in my computer localhost inside kubernetes pod?
At this time there is not a way to STOP and EMR cluster in the same sense you can with EC2 instances. The EMR cluster uses instance-store volumes and the EC2 start/stop feature relies on the use of EBS volumes which are not appropriate for high-performance, low-latency HDFS utilization.The best way to simulate this beh...
I know it is possible to stop individual EC2 instances, but what about the EMR cluster?If I stop all EC2 instances comprising EMR cluster, would I still be billed?
How to stop EMR Cluster without terminating it?
Bibliographies are not supported inGitHub Flavored Markdown(GFM). The workaround is producing GFM from R Markdown.Step: createREADME.Rmdandbibliography.biband knitREADME.Rmd.README.Rmd:--- output: md_document: variant: markdown_github bibliography: bibliography.bib --- [@xie2018]bibliography.bib:@Book{xie2018, ...
I was just wondering if there is any easy way that I can use a.bib-file to create academic references in the README of a github site. InrmarkdownI'm used to just do the following in the text:@test2010and if I have specified the correct bibtex-file in the yaml-header it works perfectly.Is there anything similar in "norm...
Easy way to cite academic references in the README.md of a github-repo
This (error: short read while indexingname) happens when Git finds a file of the given name, gets information from the OSaboutthat file, and goes to add that file to the index aka staging-area. Git:uses the file's name to open the file;reads the contents of the file; anddiscovers that although the system said the file...
Here is error when i use git add .$ git add . error: short read while indexing .editorconfig error: .editorconfig: failed to insert into database error: unable to index file '.editorconfig' fatal: adding files failedHow can i fix it?
Cannot add to repository
I think you're probably looking to perform amerge, which will take changes from one branch, and 'merge' (combine) them with changes on another.Assuming you want to make changes to the proposed code:git checkout -b userblah-test(checks out a new branch named userblah-test)git pull https://github.com/userblah/myproject.g...
(100% in-browser solution:Received a pull-request from someone else, how to edit it before merging directly on github?)Let's say I have a repositorymyprojecton GitHub.A user nameduserblahproposed apull-request.I tried the following, in order to test his modifications :git checkout -b userblah-test git pull https://...
How to handle review a pull-request, modify code, and merge?
Not exactly an answer to your question but for me you should change your workflow of publishing the github page as you try to do something that goes against how git is working... You should put the result of the github page in another branch (for example gh-pages) and publish the github pages from this branch. And for...
I have a GIT repo in which I have two folders which are managed with some GH actions and forwarded to GH pages. The first folder (name it data/) contains compressed historical data collected periodically through GH actions. The second folder (name it docs/) contains the uncompressed data for the latest collection and ...
GIT remove history for removed files in folder
You could do this infunctions.phpas well, executing a function oninitto check for bad queries and redirecting as needed.add_action('init', 'redirectQuery', 0); function redirectQuery(){ if( isset($_GET['gibberish']) == true ){ wp_redirect(home_url(), 301); die(); } }
We are using WordPress and what I would like to do is to redirect any requests to our main blog page that feature a query string, to the main blog page without a query string. The only exception being a search query.Therefore:/blog/?gibberishshould redirect to/blog//blog/?gibberish=gibberishshould redirect to/blog//blo...
WordPress redirect homepage with query string to homepage without query string
You may be able to use regexp to modify it but a better way is to use a proxy redirect:proxy_redirect http://foo.bar/baz/ /;http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirectAny Location headers forfoo.bar/baz/will go to/If you just want to redirect/baz/api, that'll work too.If any redirects are al...
I have an nginxproxy_passsetup to pass every request on/apithrough to a backend Tomcat REST service. This service in some cases returns aLocationheader which varies according to the type of request, e.g.,Location: http://foo.bar/baz/api/search/1234567-- thebazpart is due to it being hosted on Tomcat.My current configur...
Modifying a Location header with nginx proxy_pass
1 Just install your components each on a docker container. There are even entire OS's that operate that way: e.g. RancherOS or CoreOS In RancherOS, everything is inside a docker container (except the first daemon). The Docker daemon runs as PID 1. Share Improve th...
I am using ubuntu and I want to build and run a bunch of complex system components that would replace the existing ones (in my case, packagekit and gstreamer). I don't want to take the risk to damage my system and I'm looking for ways to have an overlay (or sandbox) over my complete file system but still being able to...
Can I use docker to provide a simple file overlay over my current system?
You need to re-run the linter every time your PR is synchronized with new commits. The following step is the next step after you've already committed the compressed image. name: Safe merging workflow on: pull_request: types: - opened - synchronize jobs: job1: name: "Markdown Linter" runs-o...
I have 3 workflows I'm using for my Github repo that I'm trying to get to work, but keep falling into a stalemate after one of the actions completes. I have the following actions: markdown linter image compressor publish to gh-pages I also have the markdown linter and the image compressor as required statuses since ...
Github Action in limbo after setting required statuses
I am guessing this is somehow indicating that I am creating a lot of pointers on the heap in some unexpected way? It sounds more likely that you're boxing a lot of int and long values to me. The CallSite part sounds like you're using dynamic a lot (or in one very heavily-used part of the code), which can easily lead...
I have a large application which averages about 30 mb/sec in memory allocations (per performance monitor bytes allocated/sec measurement). I am trying to cut this down substantially, and the source of the allocations is not obvious. To instrument things I have recorded my ETW traces for the CLR / GC, and have exported...
Int / Int64 .Net Memory Allocations
After long time spent I found the solution. This can be very helpful so try it out if you have same problem.Situation was that in my android studio I added HTTPS URL (e.g.,https://bitbucket.org/username/repo.git) instead of SSH URL (e.g.,[email protected]:username/repo.git). You can change this in Git -> Manage remotes...
I know this is known issue. I am trying to do the git pull in my android studio with current project and I get this warning. So I generated my key on macbook with command:ssh-keygen -t rsathan I copy it and added to bitbucket profile in ssh keys. Also I added certificate to the android studio settings (tools -> server ...
Android studio SSL certificate problem: unable to get local issuer certificate (LONGTERM SOLUTION)
4 static initializers must be constant, as your error message indicates. Assign it NULL, then in some other function, test if it's NULL, allocate the resources it needs (some sensible default) and go from there. Ensure you do clean up after you're done, and if this is a thr...
I need a static string(equivalent) variable in C and I'm having troubles implementing something like that. I need to add content to that string every time the function is called. I tried with static char *result = (char*)calloc(0, sizeof(char)); But that way I got: error: initializer element is not constant Whic...
Need dynamically allocated (initialized) static variable
The x86-32 kernel needs high memory to access more than 1G of physical memory, as it is impossible to permanently map more than 2^{32} addresses within a 32-bit address space and the kernel/user split is 1G/3G. The x86-64 kernel has no such limitation, as the amount of physically-addressable memory (currently 256T) f...
The linear address beyond 896MB correspond to High memory region ZONE_HIGHMEM. So the page allocator functions will not work on this region, since they give the linear address of directly mapped page frames in ZONE_NORMAL and ZONE_DMA. I am confused about these lines specified in Undertanding linux Kernel: What do th...
High memory mappings in kernel virtual address space
I am looking for a pattern which will ignore the.yamlgenerated from.templateYou would need to script the generation of an adequate.gitignore.There is no dynamic ignore rule done by Git when managing what it is tracking.The alternative would be to make sure to generate those files in a separate directory than the other ...
I am looking for a pattern in .ignore for github project. I want to ignore the .yaml files matching the some .template extensions.Example in folderworkI want ignore a.yaml, c.yaml which are matching the a.template and c.template, but not the b.yaml:work:a.yaml b.yaml c.yaml a.template c.templateIs it possible to have s...
github's .gitignore to ignore extensions of .yaml matching the .template extensions
The current "Maximum size of a parameter value" is "4,096 bytes"
Can't find in the docs. I see I can setMaxLength, but what is the limit ofStringtype?
What is the maximum length of String type in AWS CloudFormation Parameter?
Copy your current folder to a backup one. I don't want you to lose your code if something goes wrong.Create a new repo in github (or wherever you want to). As you said, this new repo ishttps://github.com/me/newRepo.gitRemove your current.gitfolder. Now your code is unversioned (and as @Zeplock said, the former commit h...
I have made major changes, used different tools and technologies in a repository, now I want to move it in a new repo with new name (off course), and keeping the original repo with its original state before making the changes, I haven't committed yet. I'm using Visual Studio 2015
How to create a new GitHub repo from an existing one?
The default behaviour for GKEwhen pods send traffic outside of the cluster, SNAT occurs and the node IP is used to replace the pod IP. The destination will only see the node IP. If you have more than 1 node, you will end up with more than 1 source IP.Your best option to ensure you have a single IP for egress traffic is...
I am runningGKEcluster with single node. I have set up ingress for managing & forwarding rules insideKubernetescluster.however by default pod useinstance (Node) IPfor external connection. I have not set upNAT gatewayhere. I have shared node external IP with the third party but changed IP from ephemeral to static to kee...
GKE cluster egress setup
Memcacahe, APC etc are server side data stores. You basically use it as a key value store so you don't have to ping your database all the time.However, what you're actually seeing is a site being loaded on a primed cache. This is the technique of telling your web server to let the browser know that your commonly used r...
If you open up your mozilla Firefox web browser and turn on firebug to check for incoming and outcoming network traffic, you see that, when you look atWikipedia articles, the amount ofcached contentis very large.Unless the article in question has many pictures, most of the content comes from the cache.I'd like to know ...
What kind of caching machanism is used over at Wikipedia?
each thread of a process gets a stack, while there's typically only one heap for the process. That's correct. Is this limit applicable at process level or each thread can have 1MB/8MB stack? Each thread gets its own stack; the stack-size-limit is per-thread (i.e. it is not a shared limit for all threads in the...
As per my understanding each thread of a process gets a stack, while there's typically only one heap for the process. There is default stack max size limit set by OS. Windows-64 bit : 1MB Linux-64 bit : 8MB Is this limit applicable at process level or each thread can have 1MB/8MB stack? And what happens to the mem...
Maximum size of stack of multi threaded process
+50a) Build pipeline does not have the functionality to show promotion stars in it.b) The way you have passed the parameters are correct. It should work when you use the ${iso.name} on build steps.But if you use this in a 'Execute batch command step' It will not work. You will have to use %iso.name% on a batch command....
When I set up aProject Awhich triggersProject B(with Parameters) andProject Btriggers nowProject C1andC2the whole chain (with parameters) shows up neatly in the Build Pipeline view of Jenkins:However I have added aPromoted Buildsetting onProject Bwhich tracks completion ofC1andC2.There are now 3 problems with this:a) A...
Jenkins - Promoted Builds in Pipeline, configuring parameters in promotion action
nginx cannot be actually running the site, as it is not a WSGI server. Presumably it is running as a proxy to something like gunicorn or uWSGI; it is those that you need to restart.
I have a server that is live right now, there is some SMTP stuff I want to change the settings.py of my Django project. I have made the changes, however, I cannot get the server to detect the changes, and it throws a SMTPAuthentication error because the settings.py is still using the old settings. The server is set up...
Django settings.py not updating on production
you can make that by android studio1- click VCS2- Commit - enter your message3- VCS > pull4- VCS > pushI hope it will work fine with you
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.Closed3 years ago.Improve this questionSo me and my friend are working on an android project together but as it happens whenever he...
How to work together on Android Studio using github [closed]
2 Say you have master and develop branch locally, and you have made some changes to develop and pushed it to the GitHub repo and then opened a PR from develop to master. Now if you merge changes of develop to master locally, then if you just push the master branch to GitHub...
I performed a manual merge of two branches locally on my IDE. How can I commit the changes in a way that GitHub understands that a merge has taken place, i.e. mark the underlying pull request as merged?
Push local merge to GitHub and mark as merged
0 I typically export the rows from the production server, and import into a database on a non-production server (like my local machine), then delete the existing rows from the production server. Also run an optimize on the production server table so the size is recalculated...
I have an SQL database which has a main Orders table taking 2-5 new rows per day. Other table which has daily records is Log table. It receives new data every time a user accesses the login page of the web site including time and the IP address of the user. It gets 10-15 new rows per day for now. As I monitor the da...
How to control growing SQL database day by day
+50date -Iminutescould be the way to go, which uses ISO 8601 format. TheWiki pagehas some info.
The following works:/usr/bin/mysqldump -u[username] -p[password] --all-databases --single-transaction > /home/[domain]/public_html/backups/full_backup_`date -I`.sqlIt results in "full_backup_2012-11-04.sql"The cron job is going every minute but the filename is only for once a day... I wanted to include the hour and min...
Adding the time to mysqldump cron job?
There is amaintenance-modesolution which says:You can implicitly deactivate the HPA for a target without the need to change the HPA configuration itself. If the target's desired replica count is set to 0, and the HPA's minimum replica count is greater than 0, the HPA stops adjusting the target (and sets theScalingActiv...
I have implemented HPA for all the pods based on CPU and it was working as expected. But when we did a maintenance of worker nodes, it seems tha HPA's got messed up as it failed to identify it. Do I need to disable HPA temporarily during maintenance and bring it up once the maitenance is over.Please suggestHPA Manifest...
Kubernetes pod HPA not working during maintenance/upgrades Worker nodes
You need to install X or xrdp to gain access.
Lightsail allows RDP on their Windows instances, can I do the same with the Linux variant? Would like to run Selenium etc.
Does Amazon Lightsail have remote desktop (GUI) with their Linux offering?
Yes. # Create a container docker run --name image1 -it busybox echo Image1 # Commit container to new image docker commit image1 amjibaly/stuff:image1 # Push to dockerhub repo docker push amjibaly/stuff:image1 # Create a second container docker run --name image2 -it busybox echo Image2 # Commit container to new image ...
Can we host multiple images on single private repo ? Like ubuntu:12.04 ubuntu:14.04 So My private repo like MYREPO:ubuntu:12.04 and ubuntu:14.04
Docker private repo with multiple images
1 This has nothing to do with Nginx. If you use volumes in docker-compose.yml, always make sure that the files on the left side of the colon : exists! If you miss that, sometimes Docker Compose creates folders instead of files "on the left side" (= on your host) IIRC. Which...
I'm working on nginx service using docker-compose, I created the docker-compose.yml file : version: '2' services: nginx: image: nginx:1.11.8-alpine ports: - "8858:80" volumes: - ./site.conf:/etc/nginx/conf.d/default.conf - ./code:/usr/share/nginx/html...
Docker: Cannot start service nginx
Depending on the nature of the data, you might also see it as the part of the image. In such case you can carry these files with the image. You could structure this as a base image and an image for a particular build, which would be built on a host that has access to the files needed (e.g. CI build node):FROM mybase AD...
I had docker image (mybase) created from file with two volumes# set volume mount points for installation and home directory VOLUME ["/usr/local/data", "/var/local/data"]Now i want to new image for production which will have that data as part of image so that i can just pull it. But i don't know how to access that data ...
How can i include volume data in docker image
If we usecURLto retrieve aHTTPSsite that is not using aCA-signed certificate, the following problem occurs:curl https://example.selfip.com curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed More details here: http...
I copied the PEM file into /usr/local/share/ca-certificates/ and ran update-ca-certificates, and I verified that the resulting certificate is now included in /etc/ssl/certs/ca-certificates.crt which is the file printed by curl-config --ca. I also verified that the certificate printed by openssl s_client -connect examp...
Why won't curl recognise a self-signed SSL certificate?
This is explained in thedocumentationand introduces this as an example:apiVersion: v1 kind: Secret metadata: name: {{ .Release.Name }}-secret type: Opaque data: token: |- {{ .Files.Get "config1.toml" | b64enc }}
Had Kubernetes secret file in cluster of type opaque which has base64 encoded values. How to use this file to refer secrets in helm file which pulls helm chart for deployment?Below is my helm file formatbases: - ../environments.yaml - ../defaults.yaml releases: - name: {{ env "AST" | default "astenv" }}-appname char...
Use Kubernetes secret under Helm File
I came into the same problem myself recently. This certainly is a blind spot in AWS's Lambda documentation for Java, in my opinion. This snippet in Java should work for you, assuming you're using the AWS SDK for Java Document API : DynamoDB dynamodb = new DynamoDB( new AmazonDynamoDBClient(new EnvironmentVariable...
Can someone tell me how to get access to AWS credentials in an AWS Lambda function? I've searched the internet thoroughly but still haven't found anything that has helped me. Im writing the function in Java. I think I should have access to the credentials with the context object in the HandleRequest method. If it help...
AWS Lambda custom triggers
As other have said, this isn't going to be a performance problem. Strings are immutable, but they're also quick(well, short ones like these are, anyway) That said, if you really, really don't want to concatenate the strings each time, you'll have to have two TextViews to put them in. One would simply hold the static s...
In my application I'm using constant suffix for a field value which gets updated every 2 seconds, something like: "some_value km/h" where km/h is a constant suffix. Currently I'm just doing simple concatenation of the value with the constant suffix declared as static final String, but I know this way each 2 seconds I'...
Best practice for reusing Strings with constant suffix in Java