bonus tip: for more darkness > https://darkreader.org/
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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
parse_git_dirty() { | |
st=$(git status 2>/dev/null | tail -n 1) | |
if [[ $st == "" ]]; then | |
echo '' | |
elif [[ $st == "nothing to commit (working directory clean)" ]]; then | |
echo '' |
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
`console.log({min});` | |
// it will output with the variable name like this `Object {min: 46}` |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Do Now - Manipulating HTML</title> | |
</head> | |
<body> | |
<!-- exercise 1 --> | |
<div id="ex1" class="exercise"> |
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
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:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). | |
# Make sure you have a recent version: the code points that Powerline |
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 prune origin | |
git branch -r --merged master | egrep -iv '(master|develop)' | sed 's/origin\///g' | xargs -n 1 git push --delete origin |
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
# Some colors | |
# ----------- | |
# Expand these right away, to minimise cycles spent expanding every prompt! | |
# You can override these before loading the theme. | |
: ${GNOSIS_C1="%{$reset_color$fg[blue]%}"} | |
: ${GNOSIS_C2="%{$reset_color$fg_bold[green]%}"} | |
: ${GNOSIS_C3="%{$reset_color$fg[cyan]%}"} | |
: ${GNOSIS_ACCENT1="%{$reset_color$fg[yellow]%}"} | |
: ${GNOSIS_ACCENT2="%{$reset_color$fg_bold[white]%}"} | |
: ${GNOSIS_STANDOUT="%{$fg_bold[red]%}"} |
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
// Test | |
{ | |
// TEST | |
// TEST | |
// TEST | |
/* TEST */ | |
# TEST | |
} | |
/* TEST */ |
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
// Promise.all is good for executing many promises at once | |
Promise.all([ | |
promise1, | |
promise2 | |
]); | |
// Promise.resolve is good for wrapping synchronous code | |
Promise.resolve().then(function () { | |
if (somethingIsNotRight()) { | |
throw new Error("I will be rejected asynchronously!"); |
NewerOlder