diff --git a/firefox.md b/firefox.md index de3f9e255..b2513eca9 100644 --- a/firefox.md +++ b/firefox.md @@ -3,12 +3,25 @@ title: Firefox layout: default --- +### [Firefox 30](https://developer.mozilla.org/en-US/Firefox/Releases/30) (June 2014) + + * CSS: Allow `line-height` in `` + * JS: `Console.count()` + * JS: ES6 array and generator comprehensions + +### Firefox 29 (April 2014) + + * New UI + * CSS: Unprefixed `box-shadow` + ### Firefox 18 (Jan 2013) * Faster JS compiler (IonMonkey) * Mac retina support - * JS `window.devicePixelRatio` - * JS unprefixed `ontouchstart` + * JS: `window.devicePixelRatio` + * JS: unprefixed `ontouchstart` + * HTML: `` + * HTML: `` ### Firefox 17 (Nov 2012) diff --git a/httpie.md b/httpie.md new file mode 100644 index 000000000..08702e594 --- /dev/null +++ b/httpie.md @@ -0,0 +1,20 @@ +--- +title: httpie +layout: default +--- + + $ http POST example.com/posts/3 \ + Origin:example.com # HTTP headers + name="John Doe" \ # JSON data + age:=29 \ # use := for non-strings + token:=@token.txt \ # read from file (json or text) + +### Forms + + $ http --form POST example.com \ + name="John Smith" \ + cv=@document.txt + +### References + + * https://github.com/jakubroztocil/httpie diff --git a/moment.md b/moment.md new file mode 100644 index 000000000..3ced67f66 --- /dev/null +++ b/moment.md @@ -0,0 +1,45 @@ +--- +title: Moment.js +layout: default +--- + +### Formatting + + moment() + .format('dddd') + .format("MMM Do YY") + .format() + + .fromNow() //=> "31 minutes ago" + .calendar() //=> "Last Friday at 9:32PM + +### Parsing + + moment("2013-03-01") + moment("2013-03-01", "YYYY-MM-DD") + moment(+new Date()) + +### Add + + .add('days', 1) + .subtract('days', 1) + + .startOf('day') + .endOf('day') + .startOf('hour') + +### Internationalization + + .format('L') // 06/09/2014 + .format('l') // 6/9/2014 + .format('LL') // June 9 2014 + .format('ll') // Jun 9 2014 + .format('LLL') // June 9 2014 9:32 PM + .format('lll') // Jun 9 2014 9:32 PM + .format('LLLL') // Monday, June 9 2014 9:32 PM + .format('llll') // Mon, Jun 9 2014 9:32 PM + +### Reference + + * http://momentjs.com/ + * http://momentjs.com/docs/ diff --git a/pass.md b/pass.md new file mode 100644 index 000000000..dcaddd444 --- /dev/null +++ b/pass.md @@ -0,0 +1,25 @@ +--- +title: Pass +layout: default +--- + +### Store and retrieve + + $ pass insert twitter.com/rsc + $ pass twitter.com/rsc + +### Search + + $ pass find twitter.com + +### Management + + $ pass mv twitter.com twitter.com/rsc + $ pass rm [-rf] twitter.com + $ pass cp twitter.com/rsc twitter.com/ricosc + + $ pass edit twitter.com/rsc + +### References + + * http://passwordstore.org diff --git a/rsync.md b/rsync.md index 1ae67d138..d3aec83ca 100644 --- a/rsync.md +++ b/rsync.md @@ -3,7 +3,13 @@ title: Rsync layout: default --- - rsync --progress -avz --exclude '.Trashes' --exclude '.Spotlight-V100' --exclude '.fseventsd' + rsync -avz ./src /dest + +### OSX + + --exclude '.Trashes' + --exclude '.Spotlight-V100' + --exclude '.fseventsd' ### Options @@ -19,6 +25,8 @@ Display: -h, --human-readable --progress +Skipping: + -u, --update # skip files newer on dest -c, --checksum # skip based on checksum, not mod-time & size @@ -29,17 +37,16 @@ Backups: --backup-dir=DIR -Include: +### Include --exclude=PATTERN - --exclude-from=FILE - --include=PATTERN - --include-from=FILE + --exclude-from=FILE + --include-from=FILE --files-from=FILE # read list of filenames from FILe -Archive: +### Archive -a, --archive # archive (-rlptgoD) diff --git a/sh.md b/sh.md index b07e67a29..357836dda 100644 --- a/sh.md +++ b/sh.md @@ -3,12 +3,7 @@ title: Shell scripting layout: default --- -### Clever one liners - - # Search and replace in all files - perl -p -i -e "s/from/to/g" **/*.css - -### String substitutions by patterns +### Pattern substitution STR=/path/to/foo.c @@ -16,7 +11,7 @@ layout: default echo ${STR%.c}.o #=> "/path/to/foo.o" echo ${STR##*.} #=> "c" (extension) - BASE=${SRC##*/} #=> "foo.c" (basepath) + BASE=${STR##*/} #=> "foo.c" (basepath) DIR=${SRC%$BASE} #=> "/path/to" ### Substitutions by regex @@ -33,6 +28,7 @@ layout: default [ -z "$CC" ] && CC=gcc # CC ||= "gcc" assignment ${CC:=gcc} # $CC || "gcc" + ${CC:-gcc} # same as above ### Loops diff --git a/time.md b/time.md index d81aef780..af9074ca0 100644 --- a/time.md +++ b/time.md @@ -8,7 +8,7 @@ layout: default Date presets %m/%d/%Y - 06/05/2013 %A, %B %e, %Y - Sunday, January 5, 2013 - %b %e - Jan 5 + %b %e %a - Jan 5 Sun Time presets %H:%M - 23:05