Thursday, 17 October 2019
Tuesday, 12 February 2019
Connection with Jedis to passworded, "in-transit" encrypted AWS Elasticache Redis instance
import redis.clients.jedis.Jedis; public class RedisStringJava { public static void main(String[] args) { Jedis jedis = new Jedis("master.redis-poc-single-01.eeeeee.use1.cache.amazonaws.com", 6379, true); jedis.auth("mypassword"); System.out.println("Connection to server sucessfully"); jedis.set("tutorial-name", "Redis tutorialz"); // Get the stored data and print it System.out.println("Stored string in redis:: "+ jedis.get("tutorial-name")); } }
Wednesday, 6 February 2019
Monday, 4 February 2019
venv
brew install python3
mkdir -p ~/bin/python3
python3 -m venv ~/bin/python3
source ~/bin/python3/bin/activate
enjoy!
mkdir -p ~/bin/python3
python3 -m venv ~/bin/python3
source ~/bin/python3/bin/activate
enjoy!
Wednesday, 23 January 2019
common git
- git grep ‘pattern’: search the repo for a string
- git commit --amend: rewrite the last commit message (must do this before pushing otherwise you’re push will be rejected)
- git rebase -i master: does an interactive rebase on your local master branch. handy for cleaning up your branch before opening a merge request. this is how i squash commits and rewrite commit messages
- git rebase -i HEAD^^: does an interactive rebase with just the last two commits. I use this if i want to combine the two most recent commits together
- git diff <branch> — <path/to/file> : diffs between current branch and another branch, but only the file (or files) you specify
- git checkout <branch> — <path/to/file>: replaces (or adds) a version of a file from another branch. handy for reverting
- git commit -m ‘message’: quickly commit with a commit message
- git commit -C HEAD: commit with the same exact commit message as the last commit.
- git commit --amend: rewrite the last commit message (must do this before pushing otherwise you’re push will be rejected)
- git rebase -i master: does an interactive rebase on your local master branch. handy for cleaning up your branch before opening a merge request. this is how i squash commits and rewrite commit messages
- git rebase -i HEAD^^: does an interactive rebase with just the last two commits. I use this if i want to combine the two most recent commits together
- git diff <branch> — <path/to/file> : diffs between current branch and another branch, but only the file (or files) you specify
- git checkout <branch> — <path/to/file>: replaces (or adds) a version of a file from another branch. handy for reverting
- git commit -m ‘message’: quickly commit with a commit message
- git commit -C HEAD: commit with the same exact commit message as the last commit.
Subscribe to:
Posts (Atom)
Interview questions: 2020-12
Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer Networking Layer 1 vs Layer 4 haproxy u...
-
kubectl --cert=/tmp/tls.crt --key=/tmp/tls.key create secret tls tls-wc-ingress
-
apt-get install exim4 dpkg-reconfigure exim4-config Select: internet site; mail is sent and received directly using SMTP IP-addresses...
-
brew install python3 mkdir -p ~/bin/python3 python3 -m venv ~/bin/python3 source ~/bin/python3/bin/activate enjoy!