Skip to content

Instantly share code, notes, and snippets.

View mexicat's full-sized avatar

giacomo mexicat

  • 08:02 - 2h ahead
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mexicat on github.
  • I am mejicat (https://keybase.io/mejicat) on keybase.
  • I have a public key ASChzhEylNAl43p5dA_4tDm3tX4yP7OKev8n3yrIzA4vXwo

To claim this, I am signing this object:

@mexicat
mexicat / accents.lua
Created April 10, 2017 13:59
Hammespoon lua conf for Italian accents binding
hs.hotkey.bind({"alt"}, "A", function()
hs.eventtap.keyStrokes(' à')
end)
hs.hotkey.bind({"alt"}, "E", function()
hs.eventtap.keyStrokes('è')
end)
hs.hotkey.bind({"alt", "shift"}, "E", function()
hs.eventtap.keyStrokes('é')
@mexicat
mexicat / fabfile.py
Created October 26, 2012 13:49
a *very* basic fabric git-based deploying script with django 1.4, south, virtualenv and uwsgi-emperor. run with `fab deploy`
from fabric.api import *
# the settings
env.hosts = ['user@host:port'] # change this
env['dir'] = '/var/www/mydir' # where the virtualenv dirs *and* manage.py are located
env['conf'] = '/etc/uwsgi/apps-available/myapp.ini' # your conf file for uwsgi
def deploy():
local('git push origin master') # just to be sure
with cd(env['dir']):
@mexicat
mexicat / json_response.py
Created May 14, 2012 21:10
quick shortcut to JSONify an object and wrap it in an HTTP response for use in a Django view
import json
from django.http import HttpResponse
def json_response(obj):
return HttpResponse(json.dumps(obj), mimetype='application/javascript')