Skip to content

Instantly share code, notes, and snippets.

@isao
isao / web-servers.md
Created May 11, 2018 21:52 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@isao
isao / GIF-Screencast-OSX.md
Created April 13, 2018 20:08 — forked from baumandm/GIF-Screencast-OSX.md
OS X Screencast to Animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime and ffmpeg.

Forked from https://gist.github.com/dergachev/4627207. Updated to use a palette to improve quality and skip gifsicle.

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@isao
isao / programming-quotes.md
Created November 8, 2017 18:17 — forked from Potherca/README.md
Programming Quotes
source: http://quotes.cat-v.org/programming/

Programming Quotes

There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.

        — C.A.R. Hoare, The 1980 ACM Turing Award Lecture

@isao
isao / hydra-alias.md
Created May 21, 2017 21:24 — forked from developit/hydra-alias.md
Alias to invoke Chrome Canary w/ tracing, for IRHydra

An Alias to run Chrome with tracing enabled

For Chrome Canary:

alias hydra='/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --no-sandbox --js-flags="--user-data-dir=/tmp/profile --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces"'

For regular ol' Chrome:

@isao
isao / requestIdleCallback.js
Created March 23, 2017 02:53 — forked from paullewis/requestIdleCallback.js
Shims rIC in case a browser doesn't support it.
/*!
* Copyright 2015 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@isao
isao / b.rb
Created March 20, 2017 19:03 — forked from junegunn/b.rb
b - browse Chrome bookmarks with fzf
#!/usr/bin/env bash
# vim: set filetype=ruby:
# b - browse Chrome bookmarks with fzf
[ $(uname) = Darwin ] || exit 1
which fzf > /dev/null 2>&1 || brew reinstall --HEAD fzf || exit 1
/usr/bin/ruby -x "$0" |
fzf-tmux -u 30% --ansi --multi --no-hscroll --tiebreak=begin |
awk 'BEGIN { FS = "\t" } { print $2 }' |
@isao
isao / chpwd_update_git_vars.sh
Created March 2, 2016 17:57 — forked from scelis/chpwd_update_git_vars.sh
Add git information to your ZSH prompt.
update_current_git_vars
@isao
isao / git-branches-by-commit-date.sh
Created October 9, 2015 17:51 — forked from jasonrudolph/git-branches-by-commit-date.sh
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
@isao
isao / .ctags
Last active January 29, 2018 21:38 — forked from jb55/.ctags
TypeScript ctags config. Based on https://github.com/jb55/typescript-ctags with 1. `variables` removed, 2. members changed to only match methods, 3. added protected for TypeScript v1.4+
--langdef=TypeScript
--langmap=typescript:.ts
--regex-typescript=/^[ \t]*(export)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\2/c,classes/
--regex-typescript=/^[ \t]*(export)?[ \t]*module[ \t]+([a-zA-Z0-9_]+)/\2/n,modules/
--regex-typescript=/^[ \t]*(export)?[ \t]*function[ \t]+([a-zA-Z0-9_]+)/\2/f,functions/
--regex-typescript=/^[ \t]*var[ \t]+([a-zA-Z0-9_]+)[ \t]*=[ \t]*function[ \t]*\(\)/\1/v,varlambdas/
--regex-typescript=/^[ \t]*(public|protected|private)?[ \t]*(static)?[ \t]*([a-zA-Z0-9_]+)\(.*\).+{$/\3/f,members/
--regex-typescript=/^[ \t]*(export)?[ \t]*interface[ \t]+([a-zA-Z0-9_]+)/\2/i,interfaces/
--regex-typescript=/^[ \t]*(export)?[ \t]*enum[ \t]+([a-zA-Z0-9_]+)/\2/e,enums/
git checkout \
$(git show -s --pretty='%T' \
$(git show-ref -d \
$(git describe --abbrev=0) |\ # grab the most recent tag
tail -n1 |\
awk '{print $1}'\ # dereference the commit hash it refers to
)\ # ... show the tree-hash it points at
) -- test # check that version's "test/" directory out into cwd
make test # if this fails, you should bump major,
# otherwise bump minor or patch.