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:
Hi:
perl -e 'print "hello world!\n"'
A simple filter:
perl -ne 'print if /REGEX/'
Filter out blank lines (in place):
We can test webhook callbacks with a little http server and a localtunnel.
Run server.js
to spin up a local http server on port 8080
. It just exposes a top-level route and will print the received header and payload of any request. Then create a localtunnel to have a non-local url that proxies all requests to localhost:8080
.
First, install dependencies with npm install
.
Then start the express server with npm start
.
Setup | |
----- | |
git clone <repo> | |
clone the repository specified by <repo>; this is similar to "checkout" in | |
some other version control systems such as Subversion and CVS | |
Add colors to your ~/.gitconfig file: | |
[color] |
My implementation of the Gale/Shapley algorithm in Python. This algorithm is designed to address the Stable Marriage Problem.
Compare this recursive variant with the implementations on Rosetta Code.
Given an equal number of men and women to be paired for marriage, each man ranks all the women in order of his preference and each women ranks all the men in order of her preference.
A stable set of engagements for marriage is one where no man prefers a women over the one he is engaged to, where that other woman also prefers that man over the one she is engaged to. I.e. with consulting marriages, there would be no reason for the engagements between the people to change.
Click or tap to fire an artillery shell. Hold to fire multiple shots.
The trajectory is calculated and plotted based on the firing angle, gravity, and initial bullet velocity.
All code here is taken straight from the Game Mechanic Explorer, a collection of concrete examples for various game mechanics, algorithms, and effects. The examples are all implemented in JavaScript using the Phaser game framework, but the concepts and methods are general and can be adapted to any engine.
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output