Skip to content

Instantly share code, notes, and snippets.

View jlecour's full-sized avatar

Jérémy Lecour jlecour

View GitHub Profile
@jlecour
jlecour / stages_dev_autrement.md
Created October 1, 2010 15:16
Autrement propose des stages dans son équipe Développement

Autrement propose des stages dans son équipe Développement

L'équipe technique d'Autrement (Timothée Barray, Christophe Moins et Jérémy Lecour) s'amuse (enfin travaille) avec plein de technos différentes pour produire ses sites web (http://chambresapart.fr/, http://hotelhotel.com/, …) et ses applications mobiles (Apple iOS et Android). Pour ça on manipule des langages aussi variés que Ruby (et Rails), PHP (et Symfony), Objective-C, Java et Javascript, on utilise des bases de données SQL et NOSQL, on fait du design en HTML/CSS, …

Nous recherchons 1 ou 2 stagiaires à qui nous proposons de participer pendant quelques mois à la mise en place, la maintenance et l'évolution de technologies et composants stables/éprouvés autant que chercher du côté d'éléments émergents/innovants pour utiliser au mieux les outils disponibles.

Plus concrè

@jlecour
jlecour / RVM info
Created November 1, 2010 15:53
Passenger Standalone build failure (because of CDPATH)
→ rvm info
ree-1.8.7-2010.02@global:
system:
uname: "Darwin Solaris.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"
rvm:
→ export CDPATH=~:~/Sites
→ rvm install rbx
rbx-1.1.0-20100923 installing #dependencies
rbx-1.1.0-20100923 #downloading (rubinius-1.1.0-20100923.tar.gz), this may take a while depending on your connection...
rbx-1.1.0-20100923 - #extracting
rbx-1.1.0-20100923 - #configuring
rbx-1.1.0-20100923 - #compiling
Error running '/Users/jlecour/.rvm/wrappers/ruby-1.8.7-p302/rake install', please check /Users/jlecour/.rvm/log/rbx-1.1.0-20100923/rake.error.log
There has been an error while running '/Users/jlecour/.rvm/wrappers/ruby-1.8.7-p302/ruby ./configure --prefix=/Users/jlecour/.rvm/rubies/rbx-1.1.0-20100923 --skip-system'.
@jlecour
jlecour / schema.xml
Created April 1, 2011 23:17
Our Solr schema for an autocomplete of Geonames (with custom label)
<?xml version="1.0" encoding="UTF-8"?>
<schema name="sunspot" version="1.2">
<types>
<fieldType name="string"
class="solr.StrField"
sortMissingLast="true"
omitNorms="true"/>
[05/09/2011 22:04] jlecour: Hi everyone
[05/09/2011 22:04] jlecour: It's been at least a month since my RVM implosion
[05/09/2011 22:05] jlecour: but here I am ; SNAFU
[05/09/2011 22:06] jlecour: today, i've run `rvm get head` and it broke
[05/09/2011 22:06] jlecour: I began to see some strange errors, with $rvm_path being set to "/usr/local/rvm" although it has never been this
[05/09/2011 22:07] jlecour: I've removed ~/.rvm from thee and started from scratch
[05/09/2011 22:07] jlecour: If I install the HEAD version, it is exactly the same
[05/09/2011 22:08] jlecour: If I install the latest (stable) version, I can install 1.8.7, but for REE I can't get Rubygems to install correctly
[05/09/2011 22:09] jlecour: wayneeseguin: if by any chance you're around, I'd definitely use some help ;-)
[05/09/2011 22:36] jlecour: wayneeseguin: with a good old `git bisect` I've found the bad commit : https://github.com/wayneeseguin/rvm/commit/f1396f011a47866fb034b3096206965d519ffec6
@jlecour
jlecour / gist:978307
Created May 18, 2011 09:55
How MongoDB (Ruby driver) handle Date/DateTime/Time
>> coll.insert({:date => Date.today})
BSON::InvalidDocument: Date is not currently supported; use a UTC Time instance instead.
>> coll.insert({:date => DateTime.now})
BSON::InvalidDocument: DateTime is not currently supported; use a UTC Time instance instead.
>> coll.insert({:date => Time.now}) #=> BSON::ObjectId('4dd39768b98f703261000003')
@jlecour
jlecour / gist:986555
Created May 23, 2011 11:09
Touch plugin for MongoMapper
# encoding: UTF-8
module MongoMapper
module Plugins
module Touch
extend ActiveSupport::Concern
module InstanceMethods
def touch(key = :updated_at)
raise "InvalidKey" unless self.key_names.include?(key.to_s)
self.set(key => Time.now.utc)
require 'my_namespace/timer'
module MyNamespace
class MyService
include MyNamespace::Timer
def service_name
'the_service_name'
end
if [[ "$TM_SOFT_TABS" = "YES" ]];
then export XMLLINT_INDENT=`ruby -e"print(' ' * ${TM_TAB_SIZE})"`
else export XMLLINT_INDENT=$'\t'
fi
result=`xmllint --format - 2>&1`
if [[ $? > 0 ]];
then exit_show_tool_tip "Errors: $result"
else echo "$result"
fi
@jlecour
jlecour / gist:1108900
Created July 27, 2011 08:02
error compiling ruby-1.9.3-head with RVM 1.6.31
[2011-07-27 09:33:10] make
CC = gcc
LD = ld
LDSHARED = gcc -dynamiclib
CFLAGS = -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch x86_64 -fno-common -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I. -I.ext/include/x86_64-darwin10.8.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/jlecour/.rvm/rubies/ruby-1.9.3-head/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -Wl,-unexported_symbol,_Init_* -Wl,-unexported_symbol,*_threadptr_* -Wl,-u,_objc_msgSend
SOLIBS =
compiling main.c