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
git remote add f2fs https://kernel.googlesource.com/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable | |
git fetch f2fs | |
git merge —allow-unrelated-histories f2fs/<branch> | |
OR | |
git cherry-pick $(git log --format=oneline --no-merges ..FETCH_HEAD fs/f2fs | tac | cut -d " " -f 1) |
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
git branch -m master newname | |
git push origin newname | |
# Change "Default Branch" in settings/options in GitHub | |
git push origin :master |
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
OpenSSl (Platform Independent) | |
------------------------------ | |
Encryption: openssl aes-256-cbc -in plain-text.txt -out filename.enc | |
Decryption: openssl aes-256-cbc -d -in filename.enc -out plain-text.txt | |
GPG/GnuPG | |
--------- | |
Encryption: gpg -output filename.gpg --symmetric --cipher-algo AES256 plain-text.txt |
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
# List direcory contents | |
alias ls='ls -AF --color=auto' # Also show hidden files (without ./ .//) + add / after dirs and @ after link + colored output | |
alias l='ls -1A' # Show files in one column. | |
alias ll='ls -lh' # Show human readable. | |
alias la='ls -lhA' # Show hidden files. | |
alias lx='ls -lhXB' # Sort by extension. | |
alias lk='ls -lhSr' # Sort by size, biggest last. | |
alias lc='ls -lhtcr' # Sort by and show change time, most recent last. | |
alias lu='ls -lhtur' # Sort by and show access time, most recent last. | |
alias lt='ls -lhtr' # Sort by date, most recent last. |
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
set tabstop=4 " Number of spaces that a <Tab> in the file counts for. | |
set shiftwidth=4 " Number of spaces to use for each step of (auto)indent. | |
set expandtab " Use the appropriate number of spaces to insert a <Tab>. | |
" Spaces are used in indents with the '>' and '<' commands | |
" and when 'autoindent' is on. To insert a real tab when | |
" 'expandtab' is on, use CTRL-V <Tab>. | |
set smarttab " When on, a <Tab> in front of a line inserts blanks |
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
<?php | |
/* | |
* @gist Regex to get youtube video/playlist id with/without time & generate embed code | |
* @license UNLICENSE (http://unlicense.org) | |
*/ | |
$youtube_url = array( | |
"https://youtu.be/yVpbFMhOAwE", | |
"https://www.youtube.com/embed/yVpbFMhOAwE", |