Skip to content

Instantly share code, notes, and snippets.

View gabamnml's full-sized avatar
:electron:
Focusing

Gabriel Aramburu gabamnml

:electron:
Focusing
View GitHub Profile
@gabamnml
gabamnml / Python SimpleHTTPServer with SSL
Created November 4, 2017 01:19 — forked from rozifus/Python SimpleHTTPServer with SSL
Python SimpleHTTPServer with SSL
# useful for running ssl server on localhost
# which in turn is useful for working with WebSocket Secure (wss)
# copied from http://www.piware.de/2011/01/creating-an-https-server-in-python/
@gabamnml
gabamnml / gist:3afa9f453c48e51c2dc4be8de65e1aa3
Created December 6, 2016 18:53 — forked from dhbradshaw/gist:e2bdeb502b0d0d2acced
Rename field using migrations in django 1.7
To change a field name in django 1.7+
1. Edit the field name in the model (but remember the old field name: you need it for step 3!)
2. Create an empty migration
$ python manage.py makemigrations --empty myApp
3. Edit the empty migration (it's in the migrations folder in your app folder, and will be the most recent migration) by adding
migrations.RenameField('MyModel', 'old_field_name', 'new_field_name'),
to the operations list.

Keybase proof

I hereby claim:

  • I am gabamnml on github.
  • I am aramburu (https://keybase.io/aramburu) on keybase.
  • I have a public key whose fingerprint is BEE6 5C9B 7555 0DCF 90EF 283F 63CB 06F8 A598 BA42

To claim this, I am signing this object:

@gabamnml
gabamnml / fase 3 marvel
Created May 14, 2016 21:15
Fase 3 de marvel
Capitán América: Civil War – 6 de mayo el año 2016
Doctor Extraño – 4 de noviembre el año 2016
Guardianes de la Galaxia, vol. 2 – 5 de mayo de, 2017
Spider-Man: Homecoming – 7 julio 2017
Thor: Ragnarok – 3 noviembre 2017
@gabamnml
gabamnml / redis_and_resque.mkd
Created April 26, 2016 18:36 — forked from Diasporism/redis_and_resque.mkd
How to configure Redis and Resque for your Rails app.

Redis and Resque

What this guide will cover: the code you will need in order to include Redis and Resque in your Rails app, and the process of creating a background job with Resque.

What this guide will not cover: installing Ruby, Rails, or Redis.

Note: As of this writing I am still using Ruby 1.9.3p374, Rails 3.2.13, Redis 2.6.11, and Resque 1.24.1. I use SQLite in development and Postgres in production.

Background jobs are frustrating if you've never dealt with them before. Over the past few weeks I've had to incorporate Redis and Resque into my projects in various ways and every bit of progress I made was very painful. There are many 'gotchas' when it comes to background workers, and documentation tends to be outdated or scattered at best.

@gabamnml
gabamnml / init.lua
Created October 18, 2015 05:59
Hammerspon script to change 'default' profile with custom for USB Keyboard using Karabiner App
local usbWatcher = nil
function usbDeviceCallback(data)
if (data["productName"] == "USB Keyboard") then
if (data["eventType"] == "added") then
hs.execute('/Applications/Karabiner.app/Contents/Library/bin/karabiner select 1')
elseif (data["eventType"] == "removed") then
hs.execute('/Applications/Karabiner.app/Contents/Library/bin/karabiner select 0')
end
end
@gabamnml
gabamnml / tmux-cheatsheet.markdown
Created October 7, 2015 22:09 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@gabamnml
gabamnml / README.md
Created September 25, 2015 23:42 — forked from miguelmota/README.md
Multiple accounts with Mutt E-Mail Client
How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@gabamnml
gabamnml / .slate.js
Last active August 29, 2015 14:07 — forked from gfreezy/.slate.js
var pushRight = slate.operation("push", {
"direction": "right",
"style": "bar-resize:screenSizeX/2"
});
var pushLeft = slate.operation("push", {
"direction": "left",
"style": "bar-resize:screenSizeX/2"
});