Skip to content

Instantly share code, notes, and snippets.

View davidpp's full-sized avatar

David Paquet Pitts davidpp

View GitHub Profile
@davidpp
davidpp / fbme.js
Created April 2, 2013 16:57
Get current user name + ID with Facebook JS SDK
FB.api('/me', function(response) {
alert("Name: "+ response.name + "\nFirst name: "+ response.first_name + "ID: "+response.id);
var img_link = "http://graph.facebook.com/"+response.id+"/picture"
});
packages:
yum:
newrelic-php5: []
rpm:
newrelic: http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
commands:
configure_new_relic:
command: newrelic-install install
env:
NR_INSTALL_SILENT: true
class Question < ActiveRecord::Base
belongs_to :category
belongs_to :pack
# TODO Doit etre possible de le limiter
# a une categorie passe en parametre et au question appartenant a un set
# en particulier
named_scope :random, :limit => 1,:order => 'RAND()'
end