crontab add oneliner
(crontab -l; echo "0 */4 * * * ls")| crontab -
external IP to environment variable
export EXTERNAL_IP=$(dig @resolver1.opendns.com ANY myip.opendns.com +short)
Adding a secret to environment variable without echoing to console
crontab add oneliner
(crontab -l; echo "0 */4 * * * ls")| crontab -
external IP to environment variable
export EXTERNAL_IP=$(dig @resolver1.opendns.com ANY myip.opendns.com +short)
Adding a secret to environment variable without echoing to console
Create a template service file at /etc/systemd/system/[email protected]
. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.target
First, you have to enable profiling
> db.setProfilingLevel(1)
Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...
# This tells kubecfg to read its config from the local directory | |
export KUBECONFIG=./kubeconfig | |
# Looking at the cluster | |
kubectl get nodes | |
kubectl get pods --namespace=kube-system | |
# Running a single pod | |
kubectl run --generator=run-pod/v1 --image=gcr.io/kuar-demo/kuard-amd64:1 kuard | |
kubectl get pods |
pip freeze > requirements.txt | |
and distribute that. T | |
his will allow others using your project to reinstall all the same requirements into their virtualenv with: | |
pip install -r requirements.txt |
brew install watch |
output google_compute_image extension:tf | |
rpm user:geerlingguy |
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |