Skip to content

Instantly share code, notes, and snippets.

View matagus's full-sized avatar
🐿️
I miss the old Github activity stream

Matías Agustín Méndez matagus

🐿️
I miss the old Github activity stream
View GitHub Profile
@matagus
matagus / 0-opbeat_middleware.py
Last active May 24, 2016 20:18
How to integrate a Falcon Framework (python) app with Opbeat, tracking errors and performance! Tested on pypy 5.0.1 and pypy-3.2 :)
import opbeat.instrumentation.control
from opbeat.utils import build_name_with_http_method_prefix
from settings import DEBUG
opbeat_is_debug_mode = DEBUG
opbeat.instrumentation.control.instrument()
@matagus
matagus / tasks.py
Last active March 9, 2016 16:51
Task base class for Spotify's Luigi framework to force a task to clean-up its outputs, ie reset and re-run a task. Credits to https://github.com/spotify/luigi/issues/595#issuecomment-194323344
import luigi
class ForceableTask(luigi.Task):
force = luigi.BoolParameter(significant=False, default=False)
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# To force execution, we just remove all outputs before `complete()` is called
@matagus
matagus / 0-intro.md
Created March 1, 2016 13:59
Controling luigid (Luigi daemon) using supervisord.
  • create a user called luigid.
  • create /home/luigid/logs directory. luigid user must have write permissions.
  • copy luigi-daemon.conf to /etc/supervisor/conf/
  • sudo supervisorctl update
  • check that luigid is running (ps ax | grep luigid)
@matagus
matagus / countryinfo.py
Created February 11, 2016 14:38 — forked from pamelafox/countryinfo.py
Python list of country codes, names, continents, capitals, and pytz timezones
countries = [
{'timezones': ['Europe/Andorra'], 'code': 'AD', 'continent': 'Europe', 'name': 'Andorra', 'capital': 'Andorra la Vella'},
{'timezones': ['Asia/Kabul'], 'code': 'AF', 'continent': 'Asia', 'name': 'Afghanistan', 'capital': 'Kabul'},
{'timezones': ['America/Antigua'], 'code': 'AG', 'continent': 'North America', 'name': 'Antigua and Barbuda', 'capital': "St. John's"},
{'timezones': ['Europe/Tirane'], 'code': 'AL', 'continent': 'Europe', 'name': 'Albania', 'capital': 'Tirana'},
{'timezones': ['Asia/Yerevan'], 'code': 'AM', 'continent': 'Asia', 'name': 'Armenia', 'capital': 'Yerevan'},
{'timezones': ['Africa/Luanda'], 'code': 'AO', 'continent': 'Africa', 'name': 'Angola', 'capital': 'Luanda'},
{'timezones': ['America/Argentina/Buenos_Aires', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/Tucuman', 'America/Argentina/Catamarca', 'America/Argentina/La_Rioja', 'America/Argentina/San_Juan', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Ushuai
@matagus
matagus / index.html
Created November 14, 2015 04:29
Firefox Add-on installation page
<script type="application/javascript">
<!--
function install (aEvent)
{
for (var a = aEvent.target; a.href === undefined;) a = a.parentNode;
var params = {
"Foo": { URL: aEvent.target.href,
IconURL: aEvent.target.getAttribute("iconURL"),
Hash: aEvent.target.getAttribute("hash"),
toString: function () { return this.URL; }
@matagus
matagus / .gitconfig
Last active February 15, 2016 11:58
My .gitconfig with a lot of aliases 👽
[user]
name = matagus
email = me@matagus.com
[color]
ui = auto
[color "status"]
added = cyan
changed = green
@matagus
matagus / .vimrc
Last active February 12, 2022 12:46
My current .vimrc file. Using vim-bundle, with support for Python, Django, Markdown, HTML, Javascript, Scala, node.js and CSS.
" disable vi compatibility
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle
Bundle 'gmarik/vundle'
@matagus
matagus / SourceCodeSearchEngines.md
Created October 7, 2015 09:39 — forked from phillipalexander/SourceCodeSearchEngines.md
Source Code Search Engines You Can Use For Programming Projects

Source Code Search Engines

NOTE: This list is almost entirely copy/pasted from THIS awesome article. I've made my own personal edits (adding some additional content) which is why I keep it here.

Every day meanpath crawls over 200 million websites capturing the visible text, HTML source code, CSS and Javascript. This information is used by many companies to monitor the growth of web facing technology.

@matagus
matagus / APIs-webliography.md
Last active June 24, 2022 00:03
Links to posts, talks and slides talking about API design, arquitecture, testing, tools, etc