Skip to content

Instantly share code, notes, and snippets.

View Porta's full-sized avatar

Julián Porta Porta

View GitHub Profile
@cyx
cyx / lua+uwsgi.sh
Created April 18, 2014 23:31
Install uwsgi with lua support
#!/bin/bash
# The MIT License (MIT)
#
# Copyright (c) 2014 Cyril David <cyx@cyx.is>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@elcuervo
elcuervo / Wishlist.md
Last active August 29, 2015 13:57
The email client of my dreams.
  • Gmail support
  • Gmail shortcuts support
  • Markdown only support (rendered in html & plain md)
  • Task list behaviour (http://www.mailpilot.co/)
  • Zero noise.
  • Code rendering?
@juanje
juanje / gist:3797297
Created September 28, 2012 00:38
Mount apt cache of a Vagrant box in the host to spin up the packages installation

This is a little trick I use to spin up the packages instalation on Debian/Ubuntu boxes in Vagrant.

I add a simple function that checks if a directory named something similar to ~/.vagrant.d/cache/apt/opscode-ubuntu-12.04/partial (it may have another path in Windows or MacOS) and create the directory if it doesn't already exist.

def local_cache(basebox_name)
  cache_dir = Vagrant::Environment.new.home_path.join('cache', 'apt', basebox_name)
  partial_dir = cache_dir.join('partial')
  partial_dir.mkdir unless partial_dir.exist?
 cache_dir
@dhh
dhh / gist:981520
Created May 19, 2011 19:27
bulk api
# Bulk API design
#
# resources :posts
class PostsController < ActiveController::Base
# GET /posts/1,4,50,90
# post_url([ @post, @post ])
def show_many
@posts = Post.find(params[:ids])
end