git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
git config --add oh-my-zsh.hide-status 1
git config --add oh-my-zsh.hide-dirty 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
#!/bin/bash | |
echo -e "Powerline glyphs:\n\ | |
Code points Glyphe Description Old code point | |
U+E0A0 \xee\x82\xa0 Version control branch (U+2B60 \xe2\xad\xa0 )\n\ | |
U+E0A1 \xee\x82\xa1 LN (line) symbol (U+2B61 \xe2\xad\xa1 )\n\ | |
U+E0A2 \xee\x82\xa2 Closed padlock (U+2B64 \xe2\xad\xa4 )\n\ | |
U+E0B0 \xee\x82\xb0 Rightwards black arrowhead (U+2B80 \xe2\xae\x80 )\n\ | |
U+E0B1 \xee\x82\xb1 Rightwards arrowhead (U+2B81 \xe2\xae\x81 )\n\ | |
U+E0B2 \xee\x82\xb2 Leftwards black arrowhead (U+2B82 \xe2\xae\x82 )\n\ |
Particularly useful if you use vim in vscode. This helps the directional keys work while holding them down, instead of just moving 1 place.
Fix found on this ticket and this SO article
$ defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false # For VS Code
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
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
#NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# MAC is "special" and requires LC_CTYPE override & fold gets grumpy LOOK AT COMMENTS FROM OG | |
# NEW_UUID=$(cat /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9' | head -c 32) | |
# ALSO got all weird and had fractions / wild characters in selector with LC_CTYP=C |
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
#!/bin/bash | |
#docker_pg_dump.sh | |
# Thanks to StackOverflow answer by Forth | |
# https://stackoverflow.com/questions/24718706/backup-restore-a-dockerized-postgresql-database/29913462#29913462 | |
HELP_MSG=" | |
docker_pg_dump: | |
Call pg_dump on RUNNING docker container. |
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
#!/bin/bash | |
#scriptName.sh | |
# Bash scripting reference manual | |
# - http://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html | |
# Bash script set options | |
# - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html | |
set -o errexit | |
set -o errtrace |
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
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=2 | |
set shiftwidth=2 | |
set textwidth=120 | |
set expandtab | |
set number | |
set hlsearch | |
set pastetoggle=<F2> | |
:color delek | |
" Allow saving of files as sudo when I forgot to start vim using sudo. | |
cmap w!! w !sudo tee > /dev/null % |
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 the editor to vim.. duh | |
git config --global core.editor vim | |
# Add aliases | |
git config --global alias.logthis 'log --decorate --date-order --graph --tags HEAD' | |
git config --global alias.logall 'log --decorate --date-order --remotes --graph --tags --branches' | |
git config --global alias.logalls 'log --decorate --date-order --remotes --graph --tags --branches --stat' | |
git config --global alias.diffc 'diff --cached' | |
git config --global alias.count 'count-objects -vH' | |
git config --global alias.package '"!f() { git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $1..HEAD; }; f"' |