cronis a time based job scheduling service.crontaba program for CRUD your jobs schedules.- use
cronto schedule & automate tasks
0 2 * * * /root/db_backup > /tmp/db.log 2>&1| import akka.actor.{ Actor, ActorRef, Props, ActorSystem } | |
| case class ProcessStringMsg(string: String) | |
| case class StringProcessedMsg(words: Integer) | |
| class StringCounterActor extends Actor { | |
| def receive = { | |
| case ProcessStringMsg(string) => { | |
| val wordsInLine = string.split(" ").length | |
| sender ! StringProcessedMsg(wordsInLine) |
| sudo apt-get update | |
| sudo apt-get -y upgrade | |
| cd /tmp | |
| wget https://dl.google.com/go/go1.12.linux-amd64.tar.gz | |
| sudo tar -xvf go1.12.linux-amd64.tar.gz | |
| sudo mv go /usr/local | |
| export GOROOT=/usr/local/go | |
| export GOPATH=$HOME/go |
$ export PUBLIC_IP=54.196.167.255
$ docker run -d -p 8001:8001 -p 5001:5001 quay.io/coreos/etcd:v0.4.6 -peer-addr ${PUBLIC_IP}:8001 -addr ${PUBLIC_IP}:5001 -name etcd-node1
$ docker run -d -p 8002:8002 -p 5002:5002 quay.io/coreos/etcd:v0.4.6 -peer-addr ${PUBLIC_IP}:8002 -addr ${PUBLIC_IP}:5002 -name etcd-node2 -peers ${PUBLIC_IP}:8001,${PUBLIC_IP}:8002,${PUBLIC_IP}:8003
$ docker run -d -p 8003:8003 -p 5003:5003 quay.io/coreos/etcd:v0.4.6 -peer-addr ${PUBLIC_IP}:8003 -addr ${PUBLIC_IP}:5003 -name etcd-node3 -peers ${PUBLIC_IP}:8001,${PUBLIC_IP}:8002,${PUBLIC_IP}:8003
$ curl -L $PUBLIC_IP/v2/stats/leader
export NODE1=127.0.0.1
docker volume create --name etcd-data
export DATA_DIR="etcd-data"
export REGISTRY=quay.io/coreos/etcd
docker run -d \
-p 2379:2379 \
-p 2380:2380 \
--volume=${DATA_DIR}:/etcd-data \
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "time" | |
| ) |
| curl -s \ | |
| --form-string "token=$1" \ | |
| --form-string "user=$2" \ | |
| --form-string "title=$3" \ | |
| --form-string "sound=none" \ | |
| --form-string "message=$4" \ | |
| https://api.pushover.net/1/messages.json |
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}'
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| # local_k8s.sh https://github.com/kubernetes/kubernetes.git master v1.20.2 | |
| # Install Docker | |
| cd /tmp | |
| # Install Docker | |
| apt-get update | |
| apt-get -y install make docker.io | |
| systemctl enable docker |