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:
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/** | |
* from this.. | |
**/ | |
const list = [ | |
{id: 0 , parent: null}, | |
{id: 1 , parent: 0}, | |
{id: 2 , parent: 1}, | |
{id: 3 , parent: 1}, | |
{id: 4 , parent: 2}, | |
{id: 5 , parent: 1}, |
# create a venv wiht python 3 | |
# which python3 | |
virtualenv -p /usr/local/bin/python3 yourenv |
Find command by name:
Search anywhere:
GIT blame:
# to grep for commmits, apart from the usual "| grep" you can: | |
git log --grep=some --grep=key_word --since=1.month | |
# more here: http://gitster.livejournal.com/30195.html | |
# after checking out a previous revision on git log, you can come back to the previous HEAD by doing | |
git ckeckout - |
// Returns undefined for non existent props | |
// taken from http://stackoverflow.com/questions/18891939/javascript-retrieve-object-property-path/18892019#18892019 | |
function getKey(key, obj) { | |
return key.split('.').reduce(function(a,b){ | |
return a && a[b]; | |
}, obj); | |
} | |
getKey('foo.bar', obj); //=> "I want this" | |
getKey('foo.baz', obj); //=> undefined |
# Move to end of line and enter EDIT mode | |
A | |
# Move to beginning of line and enter EDIT mode | |
I | |
# Move to end of file | |
G | |
# combine commands to get to end of last line and enter EDIT mode | |
GA | |
# Move to beginning of file | |
1G or gg |
" A minimal vimrc for new vim users to start with. | |
" Referenced here: http://vimuniversity.com/samples/your-first-vimrc-should-be-nearly-empty | |
" If you don't understand a setting in here, just type ':h setting'. | |
" Use Vim settings, rather than Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" Make backspace behave in a sane manner. | |
set backspace=indent,eol,start |
/** | |
* Lessons learned implementing a simple adder. | |
* Array functions do not have the arguments object | |
**/ | |
var add = function() { | |
var args = Array.prototype.slice.call(arguments) | |
return args.reduce((all, item) => { | |
return all + item; | |
}, 0); |