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:
As configured in my dotfiles.
start new:
tmux
start new with session name:
rsync (Everyone seems to like -z, but it is much slower for me)
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
import requests | |
class HoverException(Exception): | |
pass | |
class HoverAPI(object): | |
def __init__(self, username, password): | |
params = {"username": username, "password": password} | |
r = requests.post("https://www.hover.com/api/login", params=params) |
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
// phantomjs code to log in to Amazon | |
// based on the code from this Stackoverflow answer: http://stackoverflow.com/questions/9246438/how-to-submit-a-form-using-phantomjs | |
// I'm injecting jQuery so this assumes you have jquery in your project directory | |
var page = new WebPage(), testindex = 0, loadInProgress = false; | |
page.onConsoleMessage = function(msg) { | |
console.log(msg); | |
}; |
package main | |
import ( | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
"os" | |
"os/signal" |
r := mux.NewRouter() | |
// Single handler | |
r.HandleFunc("/form", use(http.HandlerFunc(formHandler), csrf, logging) | |
// All handlers | |
http.Handle("/", recovery(r)) | |
// Sub-routers | |
apiMiddleware := []func(http.Handler) http.Handler{logging, apiAuth, json} |