Skip to content

Instantly share code, notes, and snippets.

View owenkellogg's full-sized avatar
🛩️
Deep house disco, hyper-efficient money.

Owen Kellogg owenkellogg

🛩️
Deep house disco, hyper-efficient money.
  • Andorra
View GitHub Profile
@owenkellogg
owenkellogg / Buttons Styling
Created February 21, 2011 19:29
Stylesheet and naming structure for positive, negative, and neutral buttons
/* BUTTONS */
.buttons a, .buttons, input.buttons{
display:block;
float:left;
margin:0 7px 0 0;
background-color:#f5f5f5;
border:1px solid #dedede;
border-top:1px solid #eee;
border-left:1px solid #eee;
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>New Graph api & Javascript Base FBConnect Tutorial | Thinkdiff.net</title>
</head>
<body onload="sampleQuery();">
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
@owenkellogg
owenkellogg / getAccessToken
Created August 2, 2011 22:15
Javascript to fetch current user's Facebook Access Token
function getAccessToken() {
FB.getLoginStatus(function(response) {
if (response.session) {
var accessToken = response.session['access_token'];
}
});
}
@owenkellogg
owenkellogg / getAccessToken
Created August 2, 2011 22:15
Javascript to fetch current user's Facebook Access Token
function getAccessToken() {
FB.getLoginStatus(function(response) {
if (response.session) {
var accessToken = response.session['access_token'];
}
});
}
@owenkellogg
owenkellogg / sample-user-spec.rb
Created August 5, 2011 17:19
Sample User Spec
require 'spec_helper'
module UserSpecHeler
def valid_user_attributes
{ :email => "me@stevenzeiler.com",
:password => "abcdefg"
}
end
end
@owenkellogg
owenkellogg / show_facebook_tab.rb
Created November 16, 2011 12:40
Get facebook page ID in tab for custom pages.
def tab
oauth = Koala::Facebook::OAuth.new(Facebook::APP_ID, Facebook::SECRET)
request = params[:signed_request]
parsed_request = oauth.parse_signed_request(request)
@page_id = parsed_request["page"]["id"]
render :layout => 'facebook'
end
@owenkellogg
owenkellogg / FacebookComment.rb
Created November 16, 2011 14:22
Facebook Clases with Koala
class Comment
def initialize(comment)
@comment = comment
end
def created_time
@comment["created_time"]
end
def from
@owenkellogg
owenkellogg / gist:1431591
Created December 4, 2011 23:09 — forked from Gregg/gist:968534
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this screencast if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent then a phone call or screen sharing.
@owenkellogg
owenkellogg / dice.rb
Created December 26, 2011 04:47
Dice
#### Simulate the rolling of six-side dice
#
#### Example: roll a die nine times
#
# Die.new.roll 9
# => {:rolls=>[2, 5, 1, 4, 6, 6, 4, 6, 4], :total=>38}
#
####
class Die
@owenkellogg
owenkellogg / linkedin_company_search.rb
Created January 24, 2012 16:01
Linkedin Company Search Class
require 'httparty'
module Linkedin
class CompanySearch
include HTTParty
attr_reader :result, :query
def initialize
@query = nil
@result = nil