This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
git for-each-ref --sort=-committerdate --count=10 --format='%(refname:short)' refs/heads/ |
/* | |
* TypeScript challenge for anyone to flex their TS dev skills | |
* | |
* Write a function wrapper that accepts any arbitrary function with arbitrary arguments. | |
* This wrapper should output a new function that is a modified version of the original one. | |
* This new function should have an extra argument which is last in the list of arguments. This argument is boolean and optional, named "verbose". | |
* This new function works exactly like the original one, with the exception that it should output "verobse is on!" when | |
* "verbose" argument is set to true. | |
*/ | |
#!/bin/bash | |
# This Gist was inspired by the following posts: | |
# https://nickymeuleman.netlify.app/blog/delete-git-branches | |
# https://railsware.com/blog/git-housekeeping-tutorial-clean-up-outdated-branches-in-local-and-remote-repositories/ | |
# | |
# This command helps find all stale non-merged branches on your remote that are more than X weeks old | |
# | |
# ARGUMENTS: |
git branch | grep -v "develop" | xargs git branch -D |
alias gti='git' | |
alias ll='ls -la' | |
alias mymongo='mongod --dbpath /Users/anvk/Documents/mongo.data/db/' | |
alias mypsql='postgres -D /usr/local/var/postgres' | |
alias mychange='git add . && git commit -m "change" && git rebase -i HEAD~2 && git push -f --set-upstream origin' | |
alias mykillemmulator='$ANDROID_HOME/platform-tools/adb -s emulator-5554 emu kill' | |
alias mypush='git push -f -u origin HEAD' | |
alias myrebase='git checkout develop && git fetch upstream && git pull upstream develop && git checkout - && git rebase develop' |
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
------------ | |
-- Basics -- | |
------------ | |
-- Get indexes of tables |
Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages
and install them manually as needed.
[alias] | |
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
lg = !"git lg1" |
function asyncFunc(e) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => resolve(e), e * 1000); | |
}); | |
} | |
const arr = [1, 2, 3]; | |
co(function* () { | |
let result = []; |