Skip to content

Instantly share code, notes, and snippets.

View realvikas's full-sized avatar
🔨
exiting vim

Vikas Raj realvikas

🔨
exiting vim
View GitHub Profile
if ! (( $+commands[tmux] )); then
print "zsh tmux plugin: tmux not found. Please install tmux before using this plugin." >&2
return 1
fi
# ALIASES
alias ta='tmux attach -t'
alias tad='tmux attach -d -t'
alias ts='tmux new-session -s'
# Updating OS
sudo pamac checkupdates -a
pamac upgrade -a --no-confirm
# Installing tools and softwares
pamac install
\ tmux
\ nvim
\ docker
\ docker-compose
@realvikas
realvikas / job_control_zsh_bash.md
Created February 27, 2019 06:53 — forked from CMCDragonkai/job_control_zsh_bash.md
CLI: Job Control in ZSH and Bash

Job Control in ZSH and Bash

All processes in ZSH/Bash under job control are in 3 states: foregrounded, backgrounded and suspended.

# run command in the foreground
command
# run commend in the background
@realvikas
realvikas / token-generator.js
Created November 20, 2018 11:13 — forked from ziluvatar/token-generator.js
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jsonwebtoken');
@realvikas
realvikas / nodeAsyncTest.js
Created October 16, 2018 05:51 — forked from aescarcha/nodeAsyncTest.js
Javascript async / await resolving promises at the same time test
// Simple gist to test parallel promise resolution when using async / await
function promiseWait(time) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(true);
}, time);
});
}