Skip to content

Instantly share code, notes, and snippets.

module Autotest::GnomeNotify
# Time notification will be displayed before disappearing automatically
EXPIRATION_IN_SECONDS = 2
ERROR_STOCK_ICON = "gtk-dialog-error"
SUCCESS_STOCK_ICON = "gtk-dialog-info"
# Convenience method to send an error notification message
#
# [stock_icon] Stock icon name of icon to display
@andreaseger
andreaseger / gist:951557
Created May 2, 2011 12:50
Puzzle Generator Temporary Fix
vector<vector<pair<int,int> > > Generator::makePuzzle(vector<Piece>& pieces, vector<Edge*>& edgelist, bool** matrix){
vector<vector<pair<int,int> > > pids;
makePieceMesh(pids);
mesh2Matrix(pids,matrix);
makePieceList(pieces, pids);
create_edgelist(edgelist, pieces);
require 'sinatra/base'
require 'omniauth'
class OmniauthExample < Sinatra::Base
configure do
use OmniAuth::Builder do
provider :facebook, FACEBOOK_APP_ID, FACEBOOK_APP_SECRET, { :scope => 'email, publish_stream' }
provider :twitter, TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET
end
module Devise
module Orm
module MongoMapper
module Hook
def devise_modules_hook!
extend Schema
include Compatibility
yield
return unless Devise.apply_schema
devise_modules.each { |m| send(m) if respond_to?(m, true) }