Skip to content

Instantly share code, notes, and snippets.

Avatar

Patrick DeVivo patrickdevivo

View GitHub Profile
@patrickdevivo
patrickdevivo / palindrome.coffee
Created May 10, 2012
CoffeeScript palindrome...
View palindrome.coffee
palindrome = (string) -> if string.toUppercase() == string.toUppercase().split('').reverse().join('') then return true else return false
@patrickdevivo
patrickdevivo / fbNotifications.ino
Created Jan 15, 2012
Turns an LED on whenever I receive a Facebook notification
View fbNotifications.ino
const int ledPin = 9; // the pin that the LED is attached to
void setup()
{
// initialize the serial communication:
Serial.begin(9600);
// initialize the ledPin as an output:
pinMode(ledPin, OUTPUT);
}
@patrickdevivo
patrickdevivo / fib_blink.ino
Created Jan 13, 2012
Blink LED on Arduino UNO with fibonacci delay
View fib_blink.ino
@patrickdevivo
patrickdevivo / twitter.rb
Created Jan 4, 2012
Update twitter status
View twitter.rb
require 'twitter'
Twitter.configure do |config|
config.consumer_key = ''
config.consumer_secret = ''
config.oauth_token = ''
config.oauth_token_secret = ''
end
if ARGV[0] == '-t' and ARGV[1] # if -t flag and tweet exist
View fbGrowler.js
var https = require('https');
var url = require('url');
var util = require('util');
var exec = require('child_process').exec;
var fb_user_id =;
var fb_access_token = '';
var path = '/' + fb_user_id + '/notifications/' + '?access_token=' + fb_access_token;
var options = {
View jquery.color.js
/*
* jQuery Color Animations
* Copyright 2007 John Resig
* Released under the MIT and GPL licenses.
*/
(function(jQuery){
// We override the animation for all of these color styles
jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){