Skip to content

Instantly share code, notes, and snippets.

View shingara's full-sized avatar

Cyril Mougel shingara

  • regate.io
  • Pau ( France )
View GitHub Profile
def hello(*args)
puts args.count
end
hello(*(1..100_000))
hello(*(1..130_000))
hello(*(1..131_000))
# all call raise a stack level too deep
hello(*(1..131_100))
@shingara
shingara / robot.js
Created December 7, 2012 15:28 — forked from Klaudiusz-Borowiak/robot.js
P3exp
var robotSpotted = false;
var lastKnownX = -1;
var lastKnownY = -1;
var Robot = function(robot) {
//robot.clone();
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
@shingara
shingara / robot.js
Created December 7, 2012 15:26 — forked from glanau/robot.js
THE destroyer
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.rotateCannon(360);
robot.ahead(50);
robot.turn(30);
@shingara
shingara / robot.js
Created December 7, 2012 15:25 — forked from baptistedeleplace/robot.js
GunpowderBot
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(50);
$ ruby ice_nine_delegator.rb [11:18:34]
/Users/cyrilmougel/.rbenv/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/ice_nine-0.5.0/lib/ice_nine.rb:42:in `block in deep_freeze': undefined method `deep_freeze' for #<Array:0x007f9dd907a660> (NoMethodError)
from /Users/cyrilmougel/.rbenv/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/ice_nine-0.5.0/lib/ice_nine/support/recursion_guard.rb:25:in `guard'
from /Users/cyrilmougel/.rbenv/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/ice_nine-0.5.0/lib/ice_nine.rb:41:in `deep_freeze'
from ice_nine_delegator.rb:10:in `<main>'
$ rspec -b -I. search_spec.rb [16:15:14]
An error occurred in an around(:each) hook
RuntimeError: can't modify frozen Class
occurred at /Users/cyrilmougel/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-mocks-2.12.0/lib/rspec/mocks/method_double.rb:152:in `remove_method'
F
Failures:
## Model
class User
include DataMapper::Resource
property :id, Serial
property :first_name, String
property :last_name, String
end
Hi,
I am Cyril Mougel and I am the CTO of bemyboat.com and supermarmite.com.
I love programming and resolving issue. When you code you see what you
built and you can be proud of you work. When you have some issue, you
are very happy to solve it. When you do your code clean, your are like a
writer doing a good book.
To me the opensource is a great
#! /bin/env ruby
system 'bundle install'
system "rake db:drop"
system 'cp config/example.application.yml config/application.yml'
system 'cp config/example.database.yml config/database.yml'
system 'rake db:create:all'
system 'cd db/functions/ && make libpgosm.so'
system "psql -c 'CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS \'#{File.join(File.dirname(__FILE__), '../db/functions/libpgosm.so')}\', \'maptile_for_point\' LANGUAGE C STRICT;' openstreetmap"
system 'psql -d openstreetmap -c "CREATE EXTENSION btree_gist;"'
system 'psql -d osm -c "CREATE EXTENSION btree_gist;"'
location = /robots.txt {
if ($host ~ 'fr.bemyboat.com') {
rewrite ^.* http://fr.bemyboat.com/robots.txt break;
}
if ($host ~ 'en.bemyboat.com') {
rewrite ^.* http://en.bemyboat.com/robots.txt break;
}
}