Skip to content

Instantly share code, notes, and snippets.

@yannski
yannski / edgecamp_welcome.md
Created June 1, 2012 14:15
EdgeCamp welcome text

Alsace Digitale is pleased to welcome the Edgeryders community in Strasbourg by organizing the EdgeCamp, a 2 days BarCamp full of interactivity between the local and remote creative/digital/maker communities.

Under the umbrella of the Council of Europe and the European Commission, the Edgeryders is a community of european youngsters imagining and influencing the futur of Europe using open collaboration techniques.

A BarCamp is an unconference, or user-generated conference, made of open and participatory workshop sessions the content of which is provided by participants. All attendees are encouraged to present or facilitate a session. The principle which governs all Barcamp is : "No spectator, all participants. "

The EdgeCamp will take place saturday 17 and sunday 17 june 2012, at the Centre de Culture Numérique de l'Université de Strasbourg, 16 rue René Descartes 67000 Strasbourg, France.

The event is completely free.

require File.expand_path('../boot', __FILE__)
# Pick the frameworks you want:
# require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"
@yannski
yannski / bug_report.txt
Created February 6, 2012 20:28
Procédure de rapport de bug
Comment bien faire un rapport de bug ?
Spécifier un titre et une description.
La description devra répondre aux 3 questions essentielles suivantes :
- quel est le problème en tant que tel ?
- comment reproduire le problème ?
- quel est le comportement attendu ?
En général, il est de bon ton d'ajouter une des informations suivantes :
@yannski
yannski / etl.rake
Created February 5, 2012 16:28
Simple ETL system written with rake
# procedure :
# in development : rake db:restore etl:extract:all db:drop db:create db:migrate etl:load:all
# in production : rake db:backup etl:extract:all db:drop db:create db:migrate etl:load:all
namespace :etl do
namespace :extract do
task :all => :environment do
FileUtils.rm_rf 'db/extracted_data/'
FileUtils.mkdir_p 'db/extracted_data/'
Rake::Task['etl:extract:cities'].invoke
@yannski
yannski / fr.yml
Created April 11, 2011 16:13
different placement of model related translation
fr:
helpers:
select:
prompt: "Veuillez sélectionner"
submit:
create: "Créer un %{model}"
update: "Modifier ce %{model}"
submit: "Enregistrer ce %{model}"
label:
comment:
Fatal error: Out of memory (allocated 31719424) (tried to allocate 312569 bytes) in /homepages/7/d283029777/htdocs/pot/wp-includes/wp-db.php on line 478
User.where(:age.gt => 27).sort(:age).all,
User.where(:age.gt => 27).sort(:age.desc).all,
User.where(:age.gt => 27).sort(:age).limit(1).all
class User
include MongoMapper::Document
scope :johns, where(:name => 'John')
scope :bills, :name => 'Bill'
scope :by_name, lambda { |name| where(:name => name) }
Person
.where(:last_name => "Zorg")
.and(:middle_initial => "J")
.and(:age.gt => 30)
class Player
include Mongoid::Document
include Mongoid::Versioning
field :status
class Person
include MongoMapper::Document
key :name
key :number, Integer
many :phones
...
end
class Phone
class Person
include Mongoid::Document
field :name
field :number, Integer
embeds_many :phones
...
end
class Phone
include Mongoid::Document