Skip to content

Instantly share code, notes, and snippets.

Avatar

Patrick DeVivo patrickdevivo

View GitHub Profile
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){
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 = {
@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
@patrickdevivo
patrickdevivo / fib_blink.ino
Created Jan 13, 2012
Blink LED on Arduino UNO with fibonacci delay
View fib_blink.ino
@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 / 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
View sdb.coffee
csv = require 'csv'
_ = require 'underscore'
Table = require 'cli-table'
class Class
constructor: (@code, @sect, @title, @teacher, @room, @capacity, @grade) ->
classes = {}
schedule = {
M: [[], [], [], [], [], [], [], []] # DAY: period[classess[]]
View sum-array.asm
;;; Sum an array
;; Load 0 (where iterator initializes) into %rB
SA 0x01
COPY %rB
;; Load n (length of array, also number of iterations when summing the array) into %rA
cond: LLAC n
COPY %rD ; %rD = &n
LOAD %rA %rD ; %rA = n
@patrickdevivo
patrickdevivo / fib.asm
Created Nov 3, 2012
Fibonacci sequencer in assembly
View fib.asm
;;; Fibonacci Sequence
SA 0x80
COPY %rA
SA 0x00
COPY %rB
STOR %rB %rA ; set F(0)=0
SA 0x81
COPY %rA
@patrickdevivo
patrickdevivo / 0_reuse_code.js
Created Oct 18, 2013
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.