Skip to content

Instantly share code, notes, and snippets.

@amadden80
amadden80 / colors_bash_profile
Created December 3, 2013 14:08
Coloring for .bash_profile
# prompt colors
# "username@hostname:"
PS1="\e[34;01m\u\e[0m@\e[31;01m\h\e[0m:"
# "path/to/where/you/are"
PS1="$PS1\e[32;01m\w\e[0m"
# "(gitbranch)"
@amadden80
amadden80 / halloween.js
Created October 31, 2013 13:31
Halloween Image Flash
var today = new Date();
if (today.getDate() == 31 && today.getMonth()== 9){
setTimeout(function(){
document.body.innerHTML = "<img src='http://www.paulbunyantrail.com/images/pbcover.jpg' >"
}, Math.random()*10000+1000);
};
# Andrew Madden
# Converts files into a base64 text representation.
# An example html document, with those representations, is created.
require "base64"
# Converts an audio wavefile's binary data into base64
# Returns a html node using that data
def gen_uri_audio_tag(filename)
class YahooToken < ConsumerToken
YAHOO_SETTINGS={
:site => "https://api.login.yahoo.com",
:request_token_path => "/oauth/v2/get_request_token",
:access_token_path => "/oauth/v2/get_token",
:authorize_path=> "/oauth/v2/request_auth"
}
def self.consumer
@amadden80
amadden80 / Sonifizer.js
Last active December 20, 2015 15:49
All your Sonifizer javascript functions... all in one! Download and include in your project! You could also use: <script src="http://www.Sonifizer.com/Sonifizer.js"></script>
//---------------------------------------------
// ************** Sonifizer.js **************
//---------------------------------------------
// http://www.Sonifizer.com/Sonifizer.js
//---------------------------------------------
// Andrew Madden
//---------------------------------------------
var Sonifizer_Base_URL = "http://www.Sonifizer.com";
@amadden80
amadden80 / Audatar.js
Last active December 20, 2015 15:48
Get a unique sound for all you unique users.
// Include this function in a <script> tag or in your____.js file.
// Call Audatar_audio('YOUR_USERS_NAME') to load the audio data.
// Call Sonifizer_Play() to play the audio.
function Audatar_audio(username){
// Use this if using jQuery
$('body').append('<script type="application/javascript" src="http://www.Sonifizer.com/api/username/'+username +'/json"></script>');
}
@amadden80
amadden80 / gen_uri_html.rb
Last active December 19, 2015 08:59
Create URI HTML nodes for files
# Andrew Madden
# Converts files into a base64 text representation.
# An example html document, with those representations, is created.
require "base64"
# Converts an audio wavefile's binary data into base64
# Returns a html node using that data
def gen_uri_audio_tag(filename)
@amadden80
amadden80 / say_hello.html
Last active December 19, 2015 08:49
Copy/Paste gist into your html for a "Hello" from Andrew.
<audio autoplay="true" id="ajm-hello-ajm"><source src="data:audio/wav;base64,UklGRlSsAABXQVZFZm10IBAAAAABAAEA3bQAALppAQACABAAZGF0YTCsAACv/6n/rP+2/7v/r/+h/5//rP+4/8n/1P/Z/9D/vv/H/9r/2/+//6v/x//h/+v/6f/a/9D/3v/0//L/3f/I/8n/1P/S/87/xf+8/8r/6P/1//r/CgALAAMAAQAEAP7/BQAGAPf/+P/7//3/+f/p/+f/7v/t/9z/x//J/9P/4v/i/9r/1P/S/9b/z//D/8f/y//O/8v/tP+m/7P/v/+6/7n/wf/U/97/z//I/9H/z//J/8T/vv+3/67/rP+5/8v/2f/c/9z/5f/v//j//v8LAA0A+v/6/wwAFgALAPX/8P8BABgAJAAcAP//9f/7/+3/1//R/9v/5v/r//T/BgAHAPH/6v/w//P/7f/e/9D/0P/U/8T/o/+R/4z/jP+U/5H/iv+P/5n/nP+Q/5L/pP+7/8//4v/q/+//CAAmACYAEgAQABMAHQApAB8AGwAfACsAOAA4AB8ABgD3/+z/8P/+/+D/sf+x/8f/wf+l/6f/xf/p/wUAEQAcACMAMwA5ACsAHAAaABoALQA8ACUABwD//wUA+P/b/8b/yf/V/9n/yf+l/5b/n/+v/7//vP+w/7z/yf/R/9L/2f/n//j/HgAtACwAOABJAGIAXAAzABMADAARAP3/yP+f/6b/xP/c/97/2f/l/woAIgArACEAAQD3/xIAKQASAPf/5//b/9b/z//G/9n/7//Y/8P/zf/T/8b/rP+J/4L/nP+y/7z/t/+b/3//m//N/9n/2f/3/z0AlAC9AKsAjgCMAJIAdQBGABoAAwAQABwACQDt/+j/2f+8/7v/tf+l/6L/tv+//8L/v/+j/6L/u//G/9b//f8VACAARQBnAGsAYABzAJMAkACCAHoAawBNACcA/P/O/5f/gv+V/5f/hf+C/5//sv+