Skip to content

Instantly share code, notes, and snippets.

View tgautier-silicon's full-sized avatar

Thomas Gautier tgautier-silicon

View GitHub Profile
---
:update_sources: true
:sources:
- http://gems.rubyforge.org/
- http://gems.github.com
:benchmark: false
:bulk_threshold: 1000
:backtrace: false
:verbose: true
gem: --no-ri --no-rdoc
>> StocksUpdater.new.update!(:non_multithread)
started
Contact LCV...
Echec : end of file reached
Contact LCV (tentative n°2)...
Echec : end of file reached
Contact LCV (tentative n°3)...
Echec : end of file reached
3 tentatives pour contacter LCV
Echec après 3 tentatives
@tgautier-silicon
tgautier-silicon / gist:2305095
Created April 4, 2012 19:50
Le point sur l'interpolation
require 'benchmark'
n = 1000000
m = n.to_s
Benchmark.bm do |x|
x.report("assign single") { n.times do; c = 'a string'; end}
x.report("assign double") { n.times do; c = "a string"; end}
x.report("assign interp") { n.times do; c = "a #{n} string"; end}
x.report("concat single") { n.times do; 'a ' + n.to_s + ' string b ' + n.to_s + ' string'; end}
x.report("concat double") { n.times do; "a " + n.to_s + " string b " + n.to_s + " string"; end}
@tgautier-silicon
tgautier-silicon / resque.rake
Created April 3, 2012 17:56 — forked from denmarkin/resque.rake
My rake task for clearing Resque queues and stats
# see http://stackoverflow.com/questions/5880962/how-to-destroy-jobs-enqueued-by-resque-workers - old version
# see https://github.com/defunkt/resque/issues/49
# see http://redis.io/commands - new commands
namespace :resque do
desc "Clear pending tasks"
task :clear => :environment do
queues = Resque.queues
queues.each do |queue_name|
puts "Clearing #{queue_name}..."
@tgautier-silicon
tgautier-silicon / resque.rake
Created April 3, 2012 17:56 — forked from denmarkin/resque.rake
My rake task for clearing Resque queues and stats
# see http://stackoverflow.com/questions/5880962/how-to-destroy-jobs-enqueued-by-resque-workers - old version
# see https://github.com/defunkt/resque/issues/49
# see http://redis.io/commands - new commands
namespace :resque do
desc "Clear pending tasks"
task :clear => :environment do
queues = Resque.queues
queues.each do |queue_name|
puts "Clearing #{queue_name}..."
@tgautier-silicon
tgautier-silicon / gist:2251341
Created March 30, 2012 13:00
Ubuntu Reminder
sudo locale-gen fr_FR.UTF-8
@tgautier-silicon
tgautier-silicon / gist:1977642
Created March 5, 2012 09:36
My Sublime Text 2 configuration
{
"color_scheme": "Packages/Color Scheme - Default/Espresso Soda.tmTheme",
"theme": "Soda Light.sublime-theme",
// "color_scheme": "Packages/Color Scheme - Default/Monokai Soda.tmTheme",
// "theme": "Soda Dark.sublime-theme",
"detect_indentation": true,
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".svn",
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Example aliases
- (IBAction)buttonPressed:(id)sender {
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Are you sure?"
delegate:self
cancelButtonTitle:@"No Way!"
destructiveButtonTitle:@"Yes, I'm sure!"
otherButtonTitles: nil];
[actionSheet showInView:self.view];
}
<wsdl:WSI2_CreationExpedition>
<wsdl:Enseigne>BDSIZALL</wsdl:Enseigne>
<wsdl:ModeCol>CCC</wsdl:ModeCol>
<wsdl:ModeLiv>24R</wsdl:ModeLiv>
<wsdl:NDossier>M1219002</wsdl:NDossier>
<wsdl:NClient>C122C0B0F</wsdl:NClient>
<wsdl:Expe_Langage>FR</wsdl:Expe_Langage>
<wsdl:Expe_Ad1>SIZALL</wsdl:Expe_Ad1>
<wsdl:Expe_Ad2>SERVICE CLIENT</wsdl:Expe_Ad2>
<wsdl:Expe_Ad3>31 RUE DU GARD</wsdl:Expe_Ad3>