This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'lib/facebooker-1.0.69/lib/facebooker/rails/helpers/stream_publish' | |
require 'lib/facebooker-1.0.69/lib/facebooker/rails/helpers/fb_connect' | |
require 'lib/facebooker-1.0.69/lib/facebooker/rails/helpers' | |
require 'lib/facebooker-1.0.69/lib/facebooker/rails/facebook_form_builder' | |
module ApplicationHelper | |
include Facebooker::Rails::Helpers | |
... | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Unique Facebook ID of this user | |
facebook_id = current_facebook_user.id | |
# The OAuth token, this is how you access the user at a later point | |
token = current_facebook_client.access_token | |
# OAuth token expiration. Save this off, you'll need this to recreate | |
# the user later | |
expiration = current_facebook_client.expiration.to_i | |
name = current_facebook_user.name | |
# Gets an array of Mogil::Users |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
include Facebooker2::Rails::Controller | |
# Needed to support IE 6 and 7 | |
before_filter :set_p3p_header_for_third_party_cookies | |
# Add an :except here if you have controllers that you want to | |
# allow non-users to access | |
before_filter :ensure_application_is_installed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Facebooker2.load_facebooker_yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'active_record' | |
require 'yaml' | |
config = YAML::load(File.open(File.expand_path('../../config/database.yml', __FILE__))) | |
ActiveRecord::Base.establish_connection(config["production"]) | |
ActiveRecord::Migrator.migrate(File.expand_path('../../db/migrate', __FILE__) ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable Rake-environment-task framework detection by uncommenting/setting to false | |
# Warbler.framework_detection = false | |
# Warbler web application assembly configuration file | |
Warbler::Config.new do |config| | |
# Application directories to be included in the webapp. | |
# Add script and db/migrate here | |
config.dirs = %w(app config lib log vendor tmp script db/migrate) | |
# Uncomment this if you're running in 1.9 mode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get all current files in your repo of the extensions that you want to be considered code | |
# (.scala and .js for my example) | |
git ls-files | egrep "\.(scala|js)$" > files.txt | |
# Now edit files.txt to remove files that you don't want counted, like jQuery extensions | |
cat files.txt | xargs -n1 git blame -w | ruby -n -e '$_ =~ /^.*\((.*?)\s[\d]{4}/; puts $1.strip' | sort -f | uniq -c | sort -n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get all current files in your repo of the extensions that you want to be considered code | |
# (.scala and .js for my example) | |
git ls-files | egrep "\.(scala|js)$" > files.txt | |
# Now edit files.txt to remove files that you don't want counted, like jQuery extensions | |
cat files.txt | xargs -n1 git blame -w | ruby -n -e '$_ =~ /^.*\((.*?)\s[\d]{4}/; puts $1.strip' | sort -f | uniq -c | sort -n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object AudaxHealthSoftwareEngineer { | |
val headline = """ | |
Audax Health is hiring! Come join our incredible team of engineers in Washington, DC or San Francisco, | |
to help build the first truly social health platform, Zensey.com. We've embraced Scala and the | |
Lift web framework for most of our software, so if you have experience in or want to learn Scala, | |
we're looking for you! | |
""" | |
val requirementsDescription = """We don't have a firm list of requirements, we're just looking for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateUniqueClasses(attachEventDirectly, elementsToGenerate) { | |
var generateFunction = function() { | |
var containerElement = $("#container"); | |
containerElement.html(""); | |
for (var i=0; i < elementsToGenerate; i++) { | |
var element = $('<div id="element' + i + '" class="differentClassItem' + i + '"><a href="#">click me</a> </div>'); | |
containerElement.append(element); | |
if (attachEventDirectly) { | |
element.click(callbackFunction); | |
} else { |