Skip to content

Instantly share code, notes, and snippets.

@eparreno
eparreno / x-plane-addons.md
Last active April 13, 2020 18:51
X-Plane Addons
@eparreno
eparreno / sidekiq_delete_jobs.md
Last active May 31, 2024 20:18
How to delete Sidekiq jobs in a Rails app using ActiveJobs

How to delete Sidekiq jobs in a Rails app using ActiveJobs

Sidekiq jobs can be enqueued or scheduled. Enqueued means that they are gonna be picked up as soon as possible, scheduled jobs will be enqueued at some specific time.

job_id and jid

When using ActiveJobs, Rails will return a job_id after sending the job to ActiveJobs

job = UserMailer.send_invite(params).deliver_later
@eparreno
eparreno / gist:f5ebc58a24a73e85aac9
Last active August 29, 2015 14:26
Gibson Les Paul Supreme WR 2013
Awesome Gibson Les Paul Supreme 2013 Wine Red colour. AAAA maple top and back, gold hardware.
Pictures https://goo.gl/photos/GEzW8Gssib1RH5qc9
From Musicorp:
"This model bears all the hallmarks of an ornate custom-made instrument, with seven-ply top binding, three-ply back binding, a bound Richlite® fingerboard with mother-of-pearl (MoP) split-block inlays, a showpiece headstock trimmed in five-ply binding with deluxe MoP globe inlay and "Supreme" banner, MoP Gibson logo, an engraved brass truss-rod cover, gold hardware, and even gold-tinted frets. With gorgeous flamed maple on both sides of a chambered mahogany body core, the Les Paul Supreme is nothing short of stunning, and your choice of translucent high-gloss Heritage Cherry Burst or Desert Burst finish shows off this exalted wood with real class.
More than just an incredible looker, however, the Les Paul Supreme is also a powerful tone machine. A pair of Gibson's most popular humbucking pickups with genuine Alnico magnets yield a wide array of voices
@eparreno
eparreno / gist:2300165
Created April 4, 2012 10:23
About estimations
P = programmer; NP = non-programmer
NP: How long will it take?
P: It'll take as long as it takes.
NP: I don't understand. What does that mean?
P: When you tell me that the product is finished, it's done.
NP: You mean you can't estimate how long it'll take?
P: I can't estimate when you'll decide that it is done, therefore an
accurate prediction is impossible. From experience I know that a
project like this can take from three to nine months. A lot
@eparreno
eparreno / gist:2045638
Created March 15, 2012 17:55
Deploy with Capistrano + Passenger + Bundle
require "bundler/capistrano"
set :application, "myapp"
set :keep_releases, 3
# Git settings
set :scm, :git
set :repository, '[email protected]:my_github_user/my_app.git'
set :branch, 'master'
set :copy_strategy, :export
@eparreno
eparreno / gist:1845561
Created February 16, 2012 15:17
Install libmagic on Mac OS X via homebrew
$ brew install libmagic
$ brew link libmagic (if the link is already created is going to fail, don't worry about that)
$ env ARCHFLAGS="-arch x86_64" gem install ruby-filemagic -- --with-magic-include=/usr/local/include --with-magic-lib=/usr/local/lib/
@eparreno
eparreno / instructions.md
Created February 15, 2012 13:21 — forked from jodosha/instructions.md
How to install ruby-debug19 and linecache19 on 1.9.3-p0
@eparreno
eparreno / gist:1099220
Created July 22, 2011 10:32
Curso introduccion a Rails en Barcelona (5-9 septiembre)
Más que un curso con clases magistrales es un taller, donde cada uno deberá venir con su portátil preparado para programar. Evidentemente habrá teoría per la intención del curso es, ademas de que salgáis con una base solida de Ruby y Rails, que aprendais a desenvolveros solos, que seáis autónomos y
sepáis donde buscar información, como aprender más cosas, incorporar nuevas librerías... En definitiva que después del curso seáis capaces de empezar una app e ir haciendolo cada vez mejor y con más funcionalidades.
Temario
Introducción a Ruby (5 horas)
1. Instalación de Ruby
2. Sintaxis básica de Ruby
3. Tipos de datos
4. Estructuras de control
5. Iteradores
@eparreno
eparreno / gist:896271
Created March 31, 2011 12:23
My TextMate File Pattern
!(.\.sqlite3|/\.(?!htaccess)[^/]*|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$
@eparreno
eparreno / update_counters
Created November 10, 2010 12:32
Update counters rake task
task :update_counters => :environment do
Tag.reset_column_information
Tag.all.each do |t|
Tag.update_counters(t.id, :taggings_count => t.taggings.count)
end
end