Skip to content

Instantly share code, notes, and snippets.

View thisgeek's full-sized avatar

Christopher Joslyn thisgeek

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.12941177189350128</real>
@thisgeek
thisgeek / inject.js
Created May 22, 2017 20:10
A composition of lodash utilities that produces a function which changes the way any function passed to it receives parameters.
import _ from 'lodash';
// return a function where the keys in the passed object will be
// applied as arguments.
/*
var foo = function (a, b, c, d) {
// does stuff
};
/**
* Example of using an angular provider to build an api service.
* @author Jeremy Elbourn (jelbourn@google.com)
*/
/** Namespace for the application. */
var app = {};
/******************************************************************************/
@thisgeek
thisgeek / index.html
Created September 6, 2012 01:21
navigator.getUserMedia() demo
<!DOCTYPE HTML>
<html>
<head>
<title>HTML5 Webcam Test</title>
</head>
<body>
<h1><code>navigator.getUserMedia()</code></h1>
<video autoplay controls></video>
<p>
<button id="capture">Capture video</button>
jQuery(function() {
var myApi, verts;
// Query for sub-navigation elements. Make each vertically
// scrollable. Save query object as local variable to allow
// methods to be added to the instance.
verts = $(".vertScrollable").each(function(i, e) {
$(e).scrollable({
vertical: true,
prev: ".healthup",
$.ajax({
success: function (data) {
console.log("Yay! You gots datums!");
},
error: function (jqXHR, status, error) {
console.log("Error? Handled it.");
},
complete: function () {
console.log("It's over.");
}
@thisgeek
thisgeek / SpecRunner.html
Created February 16, 2012 14:56
Jasmine AMD Spec Runner
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Jasmine AMD Spec Runner</title>
<link rel="shortcut icon" type="image/png" href="lib/jasmine-1.1.0/jasmine_favicon.png" />
<link rel="stylesheet" type="text/css" href="lib/jasmine-1.1.0/jasmine.css" />
<script src="lib/require.js" type="text/javascript"></script>
@thisgeek
thisgeek / chromium
Created January 30, 2012 16:28
Chromium Updater
#!/bin/bash -e
# Chromium cli wrapper
CHROMIUM_HOME=/Applications/Chromium.app/Contents
ROOT_URL=https://commondatastorage.googleapis.com/chromium-browser-continuous/Mac
DOWNLOAD_URL=https://download-chromium.appspot.com/dl/Mac
function chromium_current {
ack -A1 SCMRevision $CHROMIUM_HOME/Info.plist | ack '<string>(.+)</string>' --output '$1'
@thisgeek
thisgeek / ioad.sh
Created January 20, 2012 02:51
Install on Android Devices
#!/bin/bash
APK=$1
if [ ! -f `which adb` ]; then
echo 'You need to install the Android SDK before running this script.';
exit;
fi
if [ ! -c $APK ]; then
echo 'Please provide an .apk file to install.'