tmux new [-s name] [cmd](:new) - new session
tmux ls(:ls) - list sessionstmux switch [-t name](:switch) - switches to an existing session
| ;; factorial el | |
| (defun ! ( n ) | |
| "Calcula de forma recursiva el factorial de un número." | |
| (if (zerop n) 1 | |
| (* n (! (1- n)))) | |
| ;; (! 5) | |
| ;; > 120 |
| ;; factorial scm | |
| (define (! n) | |
| "Calcula el factorial de un número de forma recursiva." | |
| (if (zero? n) 1 | |
| (* n (! (1- n)))) | |
| ;; (! 5) | |
| ;; > 120 |
| set autoindent | |
| set number | |
| set textwidth=80 | |
| syntax enable |
| # My Gnu/Screen configuration | |
| # ~/.screenrc | |
| # | |
| defutf8 on | |
| utf8 on on | |
| autodetach on | |
| defscrollback 5000 | |
| # Kill startup message | |
| startup_message off | |
| # clear the screen when close the programs |
| IRB.conf[:PROMPT_MODE] = :SIMPLE |
| import rrdtool | |
| def graphSNMP(path, rrdfile, period='d', number=1, name=''): | |
| ret = rrdtool.graphv(path, | |
| "--title=Ancho de Banda de {}".format(name), | |
| '--start', | |
| # "-1%s" %(period), | |
| "-{}{}".format(number, period), | |
| '--step','600', | |
| "--vertical-label=Bits por segundo", |
| import json | |
| from django.contrib.auth.decorators import login_required | |
| from django.http import HttpResponse | |
| from django.utils.decorators import method_decorator | |
| class LoginRequiredMixin(object): | |
| @method_decorator(login_required) | |
| def dispatch(self, request, *args, **kwargs): |
| from django.db import connection | |
| # If using cursor without "with" -- it must be closed explicitly: | |
| with connection.cursor() as cursor: | |
| cursor.execute('select column1, column2, column3 from table where aaa=%s', [5]) | |
| for row in cursor.fetchall(): | |
| print row[0], row[1], row[3] |