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
# headers | |
# URL,Ok Volume (MB),Error Volume (MB),Ok Hits,0xx,200,206,2xx,302,304,3xx,404,4xx,Offloaded Hits,Origin Hits,Origin OK Volume (MB) ,Origin Error Volume (MB) | |
def parse_file(file): | |
lines = [l.split(',') for l in open(file) if not l.startswith('#')] | |
return lines | |
def is_cached(line): |
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/python | |
""" | |
$ rsync -avz -e ssh USER@'HOST:/var/vsftpd/trife/*201209{14,15,16,17,18}*gz' logs/ | |
$ zcat portal*201209{14,15,16,17,18}*gz | waf-summary.py '2012/09/14 00:00' '2012/09/18 00:00' > portal-14-17_final.csv | |
""" | |
import re | |
import sys | |
from datetime import datetime, date, timedelta | |
from dateutil import tz |
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
# Expand tabs in php files. | |
$ for i in $(find ./* -iname "*.php"); do awk '{sub("\t"," ",$0); print $0}' $i > ~/e.tmp && cat ~/e.tmp > $i; done |
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
tell application "System Events" | |
tell current location of network preferences | |
set VPNService to service "SVPN" | |
if exists VPNService then | |
connect VPNService | |
end if | |
end tell | |
end tell |
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
<!doctype html> | |
<html> | |
<head><meta charset="utf-8"></head> | |
<body> | |
<div id="loading"> | |
<h2>Cargando información...</h2> | |
<h3>Esto puede tomar unos minutos</h3> | |
</div> | |
<div id="service-unavailable"> | |
<h2>Por favor intente más tarde, disculpe las molestias</h2> |
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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
<!DOCTYPE html> | |
<html><head><title>Caritas</title></head> | |
<body> | |
<style> | |
body{ padding-left:50px;} | |
#stage { | |
border:1px solid #ccc; | |
cursor:pointer; | |
background:#eee; |
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 () { | |
function getBodyText(win) { | |
var doc = win.document, | |
body = doc.body, | |
selection, range, bodyText; | |
if (body.createTextRange) { | |
return body.createTextRange().text; | |
} else if (win.getSelection) { | |
selection = win.getSelection(); | |
range = doc.createRange(); |
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
// Exports Assembla tickets in XML format to GitHub issues. | |
// | |
// Usage: $ ./export-tickets path/to/tickets.xml repository_name | |
// | |
package main | |
import ( | |
"os" | |
"fmt" |