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:
# vim: set fileencoding=utf8 | |
''' | |
References | |
- http://stackoverflow.com/a/1966188 | |
- http://en.wikipedia.org/wiki/Tree_(data_structure) | |
$ python suggest.py prefix | |
''' | |
import sys | |
import redis |
#!/usr/bin/python | |
import subprocess | |
import sys | |
""" | |
Used in a tmux session, connects a synchronized interactive ssh session to all | |
hostnames read from stdin (1 per line). Preserves all ssh arguments. | |
Example usage: | |
tmux |
Short excursion into git --track
, --set-upstream
and --set-upstream-to
.
All examples use the aliases co
for checkout
and br
for branch
.
Setup:
$ git clone [email protected]:AKSW/OntoWiki.git
There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.
All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.
What do these lines do? Make predictions and then scroll down.
func print(pi *int) { fmt.Println(*pi) }
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
# vim: set fileencoding=utf8 | |
''' | |
References | |
- http://stackoverflow.com/a/1966188 | |
- http://en.wikipedia.org/wiki/Tree_(data_structure) | |
$ python suggest.py prefix | |
''' | |
import sys | |
import redis |
""" | |
Lambda Func to update slack usergroup based on pagerduty rotation | |
From: https://gist.github.com/devdazed/473ab227c323fb01838f | |
NOTE: If you get a permission denied while setting the usergroup it is because there’s a workspace preference in slack | |
that limits who can manage user groups. At the time of writing it was restricted to owners and admins so i had to get | |
an owner to install the app. First i added them as a collaborator and then had them re-install the app, and got the new | |
auth token and added that to param store. |