Skip to content

Instantly share code, notes, and snippets.

@ryanmark
ryanmark / responsive-screens.js
Created March 5, 2012 15:59
Easy responsive screenshots with Phantom.js
/*
* Take a set of full height screenshots for a range of screensizes.
* phantomjs responsive-screens.js http://www.cnn.com/ png
*
* This will create a directory tree in your current directory which
* mirrors the URL. All files will be named with the current time.
* You can run this on a cron to build an archive of screenshots.
**/
var page = new WebPage(),
@ryanmark
ryanmark / import_tix.py
Created May 11, 2012 19:13 — forked from brianboyer/import_tix.py
Unfuddle ticket generator
#!/usr/bin/env python
# Takes a markdown formatted sked of milestones and tickets and
# pushes it all into unfuddle. Tries to prevent duplicates, but
# doesn't do a great job because Unfuddle's API acts strangely.
#
# TODO: Figure out why new tickets don't show up in the get tickets API request
#
# usage: import_tix.py sked.txt
#
@ryanmark
ryanmark / hh-git-talk.md
Created September 26, 2012 03:00
H/H Git talk

Setup everyone on github

Introductions

Talk about the problem of writing and editing in groups, prompt crowd for questions

Talk about other features we want in our writing and editing software

  • multiple actors working on the same stuff
  • change history
  • nothing lost (don't need a bunch of backup copies)
@ryanmark
ryanmark / index.js
Created March 30, 2013 16:23
voxel.js game
var createGame = require('voxel-engine')
function sphereWorld(x, y, z) {
// return the index of the material you want to show up
// 0 is air
if (x*x + y*y + z*z > 15*15) return 0
return 3
}
function flatWorld(x, y, z) {
{
"installed": {
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"client_secret": "",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"client_email": "",
"redirect_uris": [
"urn:ietf:wg:oauth:2.0:oob",
"oob"
],
<div id="ooyalaplayer<%= division[:id] %>" class="OoyalaHtml5VideoPlayer"></div>
<script>
OO.ready(function() {
var setup = function() {
OO.Player.create(
'ooyalaplayer<%= division[:id] %>', '<%= division[:video] %>', {
onCreate: function(player) {
var thisPlayer = player;
$('#<%= division[:id] %>').on('page.unload', function() {
thisPlayer.pause();
@ryanmark
ryanmark / setup-vox-middleman.sh
Last active August 9, 2016 22:11
Setup or update the voxmedia middleman rig
#!/bin/bash
echo "#!/bin/bash" >/usr/local/bin/setup-vox-middleman
echo 'exec bash -c "$(curl -fsSL https://raw.githubusercontent.com/voxmedia/setup-vox-rig/master/setup-vox-middleman.sh)"' >>/usr/local/bin/setup-vox-middleman
chmod +x /usr/local/bin/setup-vox-middleman
exec /usr/local/bin/setup-vox-middleman
@ryanmark
ryanmark / fixmic
Created January 5, 2015 15:36
Fix your Mac OS X microphone
sudo kill -9 `ps ax|grep 'coreaudio[a-z]' |awk '{print $1}'`
@ryanmark
ryanmark / README.md
Last active September 2, 2015 13:43
Import issues from markdown formatted text into github issues

Generate Github Issues

This script will read a markdown-formatted text file and generate milestones and issues in a Github project.

The script will go line by line, looking for lines that start with #, - or *. Lines that start with # will create a new milestone. All bulleted items after a header will be created as issues and assigned to the last milestone.

Milestones will be automatically assigned due-dates. Starting with the closest Friday at 1:30pm

@ryanmark
ryanmark / devserver.sh
Last active August 29, 2015 14:16
This tiny script allows you to run many things in the background, then shuts them all down when you hit ctrl-c
#!/bin/bash
# This tiny script allows you to run many things in the background, then shuts them all down
# when you hit ctrl-c. Put your commands below, and be sure to include the & at the end of the
# line to make the command run in the background.
# Your commands here
# EX: compass watch &
# Kill all subprocesses when the user does ctrl-c