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:
# General configuration. | |
# $ tmux show-options -g | |
set -g base-index 1 | |
set -g display-time 5000 | |
set -g repeat-time 1000 | |
set -g status-keys vi | |
set -g status-bg black | |
set -g status-fg white | |
set -g status-justify left | |
set -g status-interval 1 |
/* | |
* draw a multiline string rotated in a canvas | |
* | |
* @param ctx (M) context of the canvas | |
* @param text (M) string may contain \n | |
* @param posX (M) horizontal start position | |
* @param posY (M) vertical start position | |
* @param textColor color | |
* @param rotation in degrees (by 360) | |
* @param font must be installed on client use websafe |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
This gist assumes:
# -*- coding: utf-8 -*- | |
""" | |
This script will delete all of the tweets in the specified account. | |
You may need to hit the "more" button on the bottom of your twitter profile | |
page every now and then as the script runs, this is due to a bug in twitter. | |
You will need to get a consumer key and consumer secret token to use this | |
script, you can do so by registering a twitter application at https://dev.twitter.com/apps | |
@requirements: Python 2.5+, Tweepy (http://pypi.python.org/pypi/tweepy/1.7.1) |
# Activates mod_security | |
SecRuleEngine On | |
# Only filters requests for /toto | |
SecRule REQUEST_FILENAME "!^/toto" "phase:1,skip:5,nolog" | |
# Only filters requests for rosalind | |
SecRule REQUEST_HEADERS:Host "rosalind\.abgenomica\.com" "phase:1,skip:5,nolog" | |
# Stores the number of visits in variable IP.pagecount | |
SecAction "phase:1,nolog,initcol:IP=%{REMOTE_ADDR},setvar:IP.pagecount=+1,expirevar:IP.pagecount=60" | |
# Denies requests when excessive | |
# 429 would be a better error status but mod_security rewrites it as 500 :-( |
(by @andrestaltz)
So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
# -*- coding: utf-8 -*- | |
""" | |
This script will delete all of the tweets in the specified account. | |
You may need to hit the "more" button on the bottom of your twitter profile | |
page every now and then as the script runs, this is due to a bug in twitter. | |
You will need to get a consumer key and consumer secret token to use this | |
script, you can do so by registering a twitter application at https://dev.twitter.com/apps | |
@requirements: Python 2.5+, Tweepy (http://pypi.python.org/pypi/tweepy/1.7.1) |