This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pcostesi@hp425 11:50 | |
~ $ ls -lash .ssh | |
total 44K | |
4,0K drwx------ 2 pcostesi pcostesi 4,0K jul 1 17:09 . | |
4,0K drwxr-xr-x 73 pcostesi pcostesi 4,0K jul 6 18:32 .. | |
4,0K -rw------- 1 pcostesi pcostesi 788 may 23 2011 authorized_keys | |
4,0K -rw------- 1 pcostesi pcostesi 337 jul 1 17:09 config | |
4,0K -rw------- 1 pcostesi pcostesi 1,8K abr 3 2011 id_rsa | |
4,0K -rw------- 1 pcostesi pcostesi 396 abr 3 2011 id_rsa.pub | |
20K -rw------- 1 pcostesi pcostesi 17K jul 1 17:00 known_hosts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@split | |
@login_required | |
def hello(): | |
return render_template('hello.html') | |
@hello.for_mimetype("application/json") | |
@login_required | |
def hello(): | |
return jsonify({"hello":"flask"}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
Gootils = window.Gootils || {}; | |
var getEndpoint = function(endpoint, options){ | |
var result = [endpoint + "?"]; | |
for (var key in options) { | |
result.push(key + "=" + encodeURIComponent(options[key])); | |
}; | |
return result.join("&"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from itertools import izip as zip, ifilter as filter, imap as map, product | |
import logging | |
logging.basicConfig(level='INFO') | |
def distance(src, dst): | |
""" Given two tuples, returns the maximum manhattan distance. """ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import SocketServer | |
import struct | |
import shutil | |
import hashlib | |
import zlib | |
from StringIO import StringIO | |
import os | |
try: | |
import wx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def reducer(f): | |
def x(): pass | |
def g(sequence, initial=x): | |
if initial is x: | |
return reduce(f, sequence) | |
return reduce(f, sequence, x) | |
return g | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
clear | |
echo Juntando información | |
DATE=$(date --rfc-3339=date) | |
LOGFILE=~/regnum-$DATE.txt | |
CPU=$(cat /proc/cpuinfo | grep -i "model name") | |
MHZ=$(cat /proc/cpuinfo | grep 'cpu MHz') | |
CACHE=$(cat /proc/cpuinfo | grep 'cache size') | |
KERNEL=$(uname -a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* "Google Now" Card | |
*/ | |
body { | |
background: #e1e1e1; | |
min-height: 100%; | |
margin: auto; | |
} | |
ul.gNow { | |
width: 450px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* "Google Now" Card | |
*/ | |
body { | |
background: #e1e1e1; | |
min-height: 100%; | |
margin: auto; | |
} | |
div.center { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ImageFont, ImageDraw, Image, xlrd | |
font = ImageFont.truetype("arial.ttf", 18) | |
sh = xlrd.open_workbook("the_excel.xls").sheet_by_index(0) | |
data = [[sh.cell_value(rowx=x, colx=y) for y in range(sh.ncols)] | |
for x in range(sh.nrows)] | |
for i, row in enumerate(data): | |
im = Image.open("template.png") | |
draw = ImageDraw.Draw(im) | |
draw.text((0, 0), '\n'.join(row), font=font, fill="#000") | |
im.save("cert-%d.png" % i, "PNG") |