Last active
January 28, 2019 01:42
-
-
Save pak11273/9d4d9ba195381131994e09b1f3733262 to your computer and use it in GitHub Desktop.
UBER COMMANDS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// VIM | |
// When copy/pasting react code, turn off vim autoclose tags | |
:CloseTagDisableBuffer | |
:CloseTagEnableBuffer | |
// vim batch command | |
:cdo s/pattern/newpattern/g | update | |
// repeat a macro with visual mode | |
// @a is just an example, use any macro | |
:'<,'>g/^/ norm @a | |
// sort lines alphabetically | |
:1,$!sort | |
// delete duplicate lines, MUST BE SORTED FIRST - SEE ABOVE | |
:1,$!uniq | |
// LINUX | |
// create a password or secret codes with openssl | |
openssl rand 60 | openssl base64 -A | |
// secret key generator | |
echo -n "somevalue" | openssl sha512 -hmac "somekey" | |
// clear systen cache (DO NOT USE IN PRODUCTION!!) | |
sync; echo 1 > /proc/sys/vm/drop_caches // Clears PageCache only | |
sync; echo 2 > /proc/sys/vm/drop_caches // Clears dentries and inodes | |
sync; echo 3 > /proc/sys/vm/drop_caches // Clears PageCache, dentries and inodes | |
sudo apt-get clean // Clears the apt cache | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment