Skip to content

Instantly share code, notes, and snippets.

gonzaloamadio /
Last active Nov 5, 2019 — forked from chadgh/
python decorators for; debugging, threading
def timeit(function):
'''Decorator used for debugging. Prints the call and how long it took.'''
def timed(*args, **kwargs):
ts = time.time()
result = function(*args, **kwargs)
te = time.time()
print("{0} ({1}, {2}) {3:.2} sec"
.format(function.__name__, args, kwargs, te - ts))
class CreateJob(UseCaseInterface):
def __init__(
repository: JobRepositoryInterface,
self._title = title
gonzaloamadio / linux admin basic commands
Last active Jul 18, 2018
Various linux commands for administrators, and for everyone
View linux admin basic commands
--- Connect to windows via rdesktop ---
> rdesktop -u administrador -g1500x800
--- Connect to linux via ssh ---
> ssh {user}@{ip or dns-name}
> ssh
gonzaloamadio / .vimrc
Last active Jul 6, 2020
My ~/.vimrc configuration. Mostly oriented for python
View .vimrc
" # Fisa-vim-config
" #
" # version: 8.2
" # Other ref:
set encoding=utf-8
let using_neovim = has('nvim')
let using_vim = !using_neovim
View gist:764bb66febcab4a2c0f48f1791a62b13
########## LOGGIN
# Put this inside (if you have separated settings, put it on base setting)
# If DEBUG=True, all logs (including django logs) will be
# written to console and to debug_file.
# If DEBUG=False, logs with level INFO or higher will be
# saved to production_file.
You can’t perform that action at this time.