Skip to content

Instantly share code, notes, and snippets.


Pablo Acuña pacuna

  • Lyft
  • Austin, TX
View GitHub Profile
pacuna / composer.json
Created Dec 19, 2013
composer.json file for running Laravel 4 on dokku
View composer.json
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.1.*",
"way/generators": "dev-master",
"cartalyst/sentry": "2.0.*",
"jasonlewis/basset": "dev-master",
View posts_controller_spec.rb
describe 'POST #create' do
it "saves the post to the db" do
post :create, :post => {:title => "The title", :body => "The Body"}
}.to change(Post, :count).by(1)
it "redirects to @post" do
@post = {:title => 'The title', :body => 'The body'}
post :create, :post => @post
pacuna / gist:801d594051967542139a6f3b9a4fd7e2
Created Feb 28, 2017
Install Vim 8 with Python, Python 3, Ruby and Lua support on Ubuntu 16.04
View gist:801d594051967542139a6f3b9a4fd7e2
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev python3-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd ~
View kubernetes dockerhub
DOCKER_USER=Type your dockerhub username, same as when you `docker login`
DOCKER_EMAIL=Type your dockerhub email, same as when you `docker login`
DOCKER_PASSWORD=Type your dockerhub pw, same as when you `docker login`
kubectl create secret docker-registry myregistrykey \
--docker-server=$DOCKER_REGISTRY_SERVER \
--docker-username=$DOCKER_USER \
--docker-password=$DOCKER_PASSWORD \
View why-i'

I have been an aggressive Kubernetes evangelist over the last few years. It has been the hammer with which I have approached almost all my deployments, and the one tool I have mentioned (shoved down clients throats) in almost all my foremost communications with clients, and it was my go to choice when I was mocking my first startup (

A few weeks ago Docker 1.13 was released and I was tasked with replicating a client's Kubernetes deployment on Swarm, more specifically testing running compose on Swarm.

And it was a dream!

All our apps were already dockerised and all I had to do was make a few modificatons to an existing compose file that I had used for testing before prior said deployment on Kubernetes.

And, with the ease with which I was able to expose our endpoints, manage volumes, handle networking, deploy and tear down the setup. I in all honesty see no reason to not use Swarm. No mission-critical feature, or incredibly convenient really nice to have feature in Kubernetes that I'm go

View execpod
function execpod(){
kubectl exec -it $(kubectl get pods | grep -m1 $1 | grep -o '^\s*\S\+') /bin/bash
pacuna /
Created Apr 2, 2018 — forked from davidpelayo/
Simple mbox parser to csv in Python
import mailbox
import csv
writer = csv.writer(open("mbox-output.csv", "wb"))
for message in mailbox.mbox('file.mbox/mbox'):
writer.writerow([message['message-id'], message['subject'], message['from']])
View karabiner_pok3r.json
"title": "Use CAPS LOCK for pok3r navigation",
"rules": [{
"description": "CAPS LOCK + ijkl to arrow keys",
"manipulators": [{
"type": "basic",
"from": {
"key_code": "k",
"modifiers": {
"optional": [
View docker-compose.yml
version: '3'
driver: local
image: postgres