Skip to content

Instantly share code, notes, and snippets.

Sam Lavigne antiboredom

Block or report user

Report or block antiboredom

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# stick this in your .bash_profile to create
# a static http server on an open port (btw 8000 and 9000)
# should work in mac and linux
function serve() {
# find an open port, from
local openport=$(netstat -aln | awk '
$6 == "LISTEN" {
if ($4 ~ "[.:][0-9]+$") {
split($4, a, /[:.]/);
View highlight.js
// from
function doHighlight(bodyText, searchTerm, highlightStartTag, highlightEndTag) {
// the highlightStartTag and highlightEndTag parameters are optional
if (!highlightStartTag || !highlightEndTag) {
highlightStartTag = "<span style='color:blue; background-color:yellow;'>";
highlightEndTag = "</span>";
// find all occurences of the search term in the given text,
View ice.csv
name title location url
Douglas Ruszcyk Federal Law Enforcement Greater Pittsburgh Area
Brandon Lowy Assistant Chief Counsel Greater Boston Area
Euna Song Staff Officer Phoenix, Arizona Area
Michael C. Brown Chief Information Officer Washington D.C. Metro Area
David Larrimore Chief Technology Officer Washington D.C. Metro Area
Jason Brazie Deportation Officer Albany, New York Area
Beth Cappello Deputy Chief Information Officer Washington D.C. Metro Area
Jim Porter Senior Program Manager Washington D.C. Metro Area
antiboredom / transcribe.js
Last active Nov 22, 2019
Transcribe video/audio using IBM Watson
View transcribe.js
var request = require('request');
var fs = require('fs');
var sox = require('sox');
var spawn = require('child_process').spawn;
var WATSON_USER = '';
var WATSON_PASS = '';
var url = '';
View script.js
var canvas;
var handleVal;
var isClicked = false;
//var clock;
// Class Definition
var UiHandle = function (startX, startY, width, height){
this.x = startX;
this.y = startY;
View split_by_word.js
var tweet = "These 5 incredible stories from the IDF are sure to leave #inspired";
// turn tweet into an array
var words = tweet.split(" ");
// get half the length of the words
var half_length = Math.ceil(arrayName.length / 2);
// get the words on the left side
var leftSide = words.splice(0, half_length);
antiboredom /
Created Feb 6, 2015
scrapes google autocomplete suggestions
import sys
import urllib
import time
import xml.etree.ElementTree as ET
chars = 'abcdefghijklmnopqrstuvwxyz'
q = sys.argv[1]
url = '' + urllib.quote(q.strip() + ' ')
def suggest(url):
antiboredom / index.html
Created Dec 15, 2014
A simple example showing how to save animated gifs from p5.js sketches, using
View index.html
<script src="gif.js"></script>
<script src=""></script>
<script src=""></script>
<script src="sketch.js"></script>
<p>First, allow camera access.<p><p>Then click once to start recording, and another time finish recording and make a gif.</p>
antiboredom / sun.pde
Created Sep 8, 2013
Sun sketch for ICM week 1
View sun.pde
int rays = 24;
void setup() {
size(640, 460);
colorMode(HSB, 100, 100, 100, 100);
void draw() {}
You can’t perform that action at this time.