Skip to content

Instantly share code, notes, and snippets.

View JonasNielsen's full-sized avatar

Jonas Bylov JonasNielsen

View GitHub Profile
@maxdbn
maxdbn / sidekiq.config
Last active May 23, 2021 12:05
Gracefully restarting Sidekiq on Elasticbeanstalk, only after it's done with the running jobs. Tested on: 64bit Amazon Linux 2016.09 v2.3.0 running Ruby 2.3 (Puma). Thanks to ssaunier for the original gist! https://gist.github.com/ssaunier/44bbebb9c0fa01953860
# Sidekiq interaction and startup script
commands:
create_post_dir:
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post"
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh":
mode: "000755"
owner: root
group: root
@joeguilmette
joeguilmette / gist:ef231d10554da29c6782
Last active October 1, 2015 05:41
Bangkok for Jean and Chris

#Bangkok Survival Guide This is by no means complete or anything, but hopefully it'll give you a quick rundown of how I learned to enjoy and indeed fall in love with Bangkok. It is by no means everyone's cup of tea, so I will take no offense if you hate it, hate my ideas of what to do, or whatever. So... Here we go!

PS I didn't proofread this at all.

##Stay Near Saphan Taksin It has a BTS station and a boat pier. The neighborhood sucks but you wont spend any time there. You'll get the fuck out and thanks to the public transit available there you'll be able to go anywhere in the city ASAP regardless of traffic.

##Transportation The key to the city is access to transportation next to your bed. Once you have access, you just need to understand the different ways to get around, how they are effected by traffic, and how to mitigate those effects. Kind of like any city in the world.

@coopermaruyama
coopermaruyama / vendor-ffmpeg-heroku
Created October 27, 2012 08:39
Install FFMpeg on heroku (Rails)
## Get FFMpeg working on heroku by building binaries using vulcan
gem install vulcan
vulcan create foo
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
cd ffmpeg
@seanlilmateus
seanlilmateus / gist:1427886
Created December 3, 2011 19:24
Video Recording using Macruby & AVFoundation Framework;
#!/usr/local/bin/macruby
framework 'Cocoa'
framework 'AVFoundation'
# because we love blocks, we make NSTimer blocks :-)
class NSTimer
def self.scheduledTimerWithTimeInterval interval, repeats: repeat_flag, block: block
self.scheduledTimerWithTimeInterval interval,
target: self,
selector: 'executeBlockFromTimer:',
@dhh
dhh / gist:1014971
Created June 8, 2011 18:09
Use concerns to keep your models manageable
# autoload concerns
module YourApp
class Application < Rails::Application
config.autoload_paths += %W(
#{config.root}/app/controllers/concerns
#{config.root}/app/models/concerns
)
end
end