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
@shingara
shingara / gist:7005529
Last active December 25, 2015 16:19
mspec failed on rubinus commit 29af49dbaaa8fbb856970b9fbbd05df7d339d698 on OSX 10.6.8
1)
Time.gm handles years from 0 as such FAILED
Expected -1
to equal 0
SpecExpectation.fail_with at mspec/lib/mspec/expectations/expectations.rb:15
SpecPositiveOperatorMatcher#== at mspec/lib/mspec/matchers/base.rb:8
{ } in Object#__script__ at spec/ruby/core/time/shared/time_params.rb:176
Integer(Fixnum)#upto at kernel/common/integer.rb:209
{ } in Object#__script__ at spec/ruby/core/time/shared/time_params.rb:174
@shingara
shingara / gist:6028892
Created July 18, 2013 12:25
Fichier CSV et retour chariot :(
Bonjour,
Après contrôle, je m'aperçois que le fichier transmit ouvert avec notepad
comporte un problème de retour chariot et je me retrouve avec tous les ligne
sur une et une même ligne.
Pouvez-vous rectifier cela de votre côté.
Merci
source 'http://rubygems.org'
gem 'rails', '3.2.12'
gem 'awesome_nested_set', '> 2', :require => 'awesome_nested_set'
gem 'chronic'
gem 'mime-types', :require => 'mime/types'
gem 'spreadsheet'
gem 'fast_gettext'
gem 'will_paginate', '~> 3'
gem 'builder'
@shingara
shingara / moped_bson_ext.rb
Created June 14, 2013 12:34
Avoid return {'$oid' : 'xxx'} in BSON::ObjectId to_json
module Moped
module BSON
class ObjectId
alias :to_json :to_s
end
end
end
@shingara
shingara / Dockerfile
Created June 6, 2013 12:45
Docker file to Errbit 0.1.0
FROM shingara/ruby-2.0.0
MAINTAINER Cyril Mougel "[email protected]"
# need because git clone on Gemfile
RUN apt-get -y -q install git-core
## Gem needed by some gems
RUN apt-get -y -q install libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev
@shingara
shingara / Dockerfile
Created June 6, 2013 11:02
Dockerfile to have ruby 2.0.0 install
FROM base
MAINTAINER Cyril Mougel "[email protected]"
RUN apt-get update
RUN apt-get install -q -y wget
RUN apt-get install -q -y ca-certificates
RUN apt-get install -q -y make
## Ruby-install
RUN wget -O ruby-install-0.1.4.tar.gz https://github.com/postmodern/ruby-install/archive/v0.1.4.tar.gz
@shingara
shingara / Dockerfile
Created June 5, 2013 14:30
Docker file to have chruby. Not usefull :)
## Docker file of shingara/chruby container
FROM base
MAINTAINER Cyril Mougel "[email protected]"
RUN apt-get update
RUN apt-get install -q -y wget
RUN apt-get install -q -y ca-certificates
RUN apt-get install -q -y make
@shingara
shingara / main.go
Last active December 17, 2015 22:49
package main
import (
"os"
"fmt"
"github.com/shingara/goup/request"
)
func main() {
urls := make(chan string, 100)
class UserCreate
def initialize(params)
@params = params
end
attr_reader :params
def user
@user ||= User.new(params[:user])
end
require 'virtus'
require 'rspec'
require 'mongoid'
class User
include Virtus
attribute :active, Boolean
end