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:
| #!/usr/bin/env python | |
| # Force-Directed Graph Drawing | |
| import Tkinter | |
| import random | |
| import math | |
| # d = [ | |
| # [.0, .3, .3, .0], |
| # libraries used. install as necessary | |
| library(shiny) | |
| library(RJSONIO) # acquiring and parsing data | |
| library(ggplot2) # graphs | |
| library(plyr) # manipulating data | |
| library(lubridate) #dates | |
| library(stringr) | |
| trim.leading <- function (x) sub("^\\s+", "", x) |
| from bitarray import bitarray | |
| import mmh3 | |
| class BloomFilter: | |
| def __init__(self, size, hash_count): | |
| self.size = size | |
| self.hash_count = hash_count | |
| self.bit_array = bitarray(size) | |
| self.bit_array.setall(0) |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
| license: gpl-3.0 |
Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.
| #!/usr/bin/env python2 | |
| '''Serving dynamic images with Pandas and matplotlib (using flask).''' | |
| import matplotlib | |
| matplotlib.use('Agg') | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| import pandas as pd | |
| from cStringIO import StringIO |
| license: gpl-3.0 | |
| redirect: https://observablehq.com/@mbostock/raster-reprojection |
| // Requires JQuery and CORS enabled for the Origin you're testing from. | |
| // Uncomment the next 4 lines to import JQuery | |
| // var script= document.createElement('script'); | |
| // script.type= 'text/javascript'; | |
| // script.src= '//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js'; | |
| // document.head.appendChild(script); | |
| // Set up the multipart form using HTML5 FormData object | |
| // https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest/FormData | |
| var form = new FormData(); |