Skip to content

Instantly share code, notes, and snippets.

View timwhite47's full-sized avatar

Tim White timwhite47

View GitHub Profile
@timwhite47
timwhite47 / keybase.md
Created February 14, 2017 02:24
keybase.io
View keybase.md

Keybase proof

I hereby claim:

  • I am timwhite47 on github.
  • I am timwhite (https://keybase.io/timwhite) on keybase.
  • I have a public key ASCxPZNmTQygmY-kGmRXWbuBgxPubIjjHA6VEiBEyvFwxQo

To claim this, I am signing this object:

View html5-video-streamer.js
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
@timwhite47
timwhite47 / twitter test.html
Created January 8, 2014 22:53
testing twitter binding to web intents.
View twitter test.html
<html>
<head>
<title>twitter test page</title>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<script type="text/javascript">
window.twttr.ready(function (t) {
console.log('ready', t)
t.events.bind('tweet', function (event) {
console.log('tweet', event)
alert('you tweeted!')
View widget.js
(function () {
var scriptName = "embed.js"; //name of this script, used to get reference to own tag
var jQuery; //noconflict reference to jquery
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";
var jqueryVersion = "1.8.3";
var scriptTag; //reference to the html script tag
/******** Get reference to self (scriptTag) *********/
var allScripts = document.getElementsByTagName('script');
@timwhite47
timwhite47 / actionsprout_webhook_example.json
Last active December 19, 2015 20:08
ActionSprout Webhook Example
View actionsprout_webhook_example.json
{
"type": "contact_create",
"data": {
"action":
{
"id":1437,
"title":"Approve of I1234",
"description":"Test ActionSprout Campaign"
},
"contact":
View gist:4445868
* 2013-01-03 10:42:41 executing `deploy'
* 2013-01-03 10:42:41 executing `deploy:update'
** transaction: start
* 2013-01-03 10:42:41 executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git@github.com:bellport/pledgie.git HEAD"
command finished in 2135ms
* executing "if [ -d /srv/actionsprout/shared/cached-copy ]; then cd /srv/actionsprout/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 0e3bf9ede6f0278157a992d725e41e7c0403da4e && git clean -q -d -x -f; else git clone -q git@github.com:bellport/pledgie.git /srv/actionsprout/shared/cached-copy && cd /srv/actionsprout/shared/cached-copy && git checkout -q -b deploy 0e3bf9ede6f0278157a992d725e41e7c0403da4e; fi"
servers: ["app-node-1.actionsprout.com", "app-node-2.actionsprout.com", "redis.actionsprout.com"]
[app-node-1.actionsprout.com] executing command
View gist:4370805
def explain!
puts 'Want to embed this Gist?'
puts 'Use this: <script src="http://gist.github.com/2059.js"></script>'
end
explain!
@timwhite47
timwhite47 / arduino_multibyte_serial_example.cpp
Created October 9, 2012 04:21 — forked from fairchild/arduino_multibyte_serial_example.cpp
Simple updated examples of arduino serial communications
View arduino_multibyte_serial_example.cpp
/* ------------------------------------------------
* SERIAL COM - HANDELING MULTIPLE BYTES inside ARDUINO - 03_function development
* by beltran berrocal
*
* this prog establishes a connection with the pc and waits for it to send him
* a long string of characters like "hello Arduino!".
* Then Arduino informs the pc that it heard the whole sentence
*
* the same as examlpe 03 but it deploys 2 reusable functions.
* for doing the same job.
@timwhite47
timwhite47 / capybara cheat sheet
Created October 8, 2012 22:54 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
View capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@timwhite47
timwhite47 / o_fuck
Created August 6, 2012 23:25
o fuck
View o_fuck
Kadin-Mini:pledgie tim$ STAGING=true cap deploy
"___________STAGING___________"
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git@github.com:bellport/pledgie.git salesforce"
command finished in 2443ms
* executing "if [ -d /srv/actionsprout/shared/cached-copy ]; then cd /srv/actionsprout/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 792545333de6d1813deea155237ba262b91b8130 && git clean -q -d -x -f; else git clone -q git@github.com:bellport/pledgie.git /srv/actionsprout/shared/cached-copy && cd /srv/actionsprout/shared/cached-copy && git checkout -q -b deploy 792545333de6d1813deea155237ba262b91b8130; fi"