Skip to content

Instantly share code, notes, and snippets.

View danguita's full-sized avatar

David Anguita danguita

View GitHub Profile
@danguita
danguita / myweechat.md
Created January 29, 2017 13:47 — forked from pascalpoitras/config.md
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

Enable mouse support

/mouse enable

Encrypted password in sec.conf

Zero downtime deploys with unicorn + nginx + runit + rvm + chef

Below are the actual files we use in one of our latest production applications at Agora Games to achieve zero downtime deploys with unicorn. You've probably already read the GitHub blog post on Unicorn and would like to try zero downtime deploys for your application. I hope these files and notes help. I am happy to update these files or these notes if there are comments/questions. YMMV (of course).

Other application notes:

  • Our application uses MongoDB, so we don't have database migrations to worry about as with MySQL or postgresql. That does not mean that we won't have to worry about issues with the database with indexes being built in MongoDB or what have you.
  • We use capistrano for deployment.

Salient points for each file:

###
// ==UserScript==
// @name Gmail Monospace
// @namespace http://owns.ch
// @description Make emails and textareas in Gmail monospace
// @author Alen Mujezinovic & David Anguita
// @homepage http://gist.github.com/4536975
// @match http://mail.google.com/*
// @match https://mail.google.com/*
// ==/UserScript==
@danguita
danguita / deploy.rake
Last active December 10, 2015 13:58 — forked from ndbroadbent/deploy.rake
require 'fileutils'
# Warning: The following deploy task will completely overwrite whatever is currently deployed to Heroku.
# The deploy branch is rebased onto master, so the push needs to be forced.
desc "Deploy app to Heroku after precompiling assets"
task :deploy do
deploy_branch = 'heroku'
remote = 'heroku'
deploy_repo_dir = "tmp/heroku_deploy"
@danguita
danguita / hack.sh
Created March 31, 2012 10:53 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it (original):
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#