Skip to content

Instantly share code, notes, and snippets.

View anthonycintron's full-sized avatar

Anthony Cintron anthonycintron

View GitHub Profile
require 'rubygems'
require 'mongo'
require 'pp'
db = Mongo::Connection.new.db('testing')
db.collections.each { |c| c.remove }
articles = db['articles']
ratings = db['ratings']
package gibberish
{
import flash.display.Sprite;
import flash.geom.Rectangle;
import flash.text.*;
import gs.TweenLite;
import gs.TweenMax;
public class GibberishTextField extends Sprite
require 'net/http'
require 'json'
class GithubAPI
attr_reader :response, :host, :api, :format
def initialize
@host = "github.com"
@api = "/api/v2"
require 'net/http'
require 'json'
class GithubAPI
HOST = "github.com"
API = "/api/v2"
attr_accessor :format
attr_reader :response, :user
var homepage = {
config: {
content: {
margin_left: 28,
margin_right: 275,
stage: "content",
item_width: 135,
item_vgap: 5,
item_hgap: 5,
item_y: 0,
.box_shadow
{
-moz-box-shadow: 0px 0px 4px #C0C0C0; /* FF3.5+ */
-webkit-box-shadow: 0px 0px 4px #C0C0C0; /* Saf3.0+, Chrome */
box-shadow: 0px 0px 4px #C0C0C0; /* Opera 10.5, IE 9.0 */
}
Handbags & Wallets
- Shoulder and Cross Body
- Totes & Clutches
- Wallets & Hard Cases
Fashion Accessories
- Hats
- Scarves, Gloves & Belts
- Sunglasses & Fashion Frames
- Footwear
- Legwear & Apparel
$.post('/postcheckin',{uid: AVFacebook.session.uid, checkins:response.data},
function(data){
alert(data);
}, "json");
});
checkIn: function(uid) {
FB.api('/me/checkins', function (response) {
AVFacebook.session = response.data;
checkin_len = response.data.length;
var checkins = [];
for ( var i=0; i < checkin_len; i++ ) {
checkins.push({'checkin':response.data[i]});
}
@anthonycintron
anthonycintron / customEvent_ex.js
Created January 5, 2011 17:42
Experimenting with JavaScript's custom event model
function EventDispatcher() {
this._listeners = {};
}
EventDispatcher.prototype = {
constructor: EventDispatcher,
addEventListener: function (type, listener) {
if ( typeof this._listeners[type] == "undefined" ) {
this._listeners[type] = [];
}