Skip to content

Instantly share code, notes, and snippets.

View gcollazo's full-sized avatar

Giovanni Collazo gcollazo

View GitHub Profile
body {
background: transparent url('/img/bkg.jpg') top left fixed;
}
#!/usr/bin/env python
# encoding: utf-8
"""
csv_to_xml.py
This script coverts a csv file to an XML.
The script takes 2 paramenters
* filename
* row node name
#!/bin/bash
# To run do: curl https://theurl.com/bootstrap.sh | bash && source ~/.profile
#
# Based on Amazon EC2 AMI ID ami-ccf405a5 Ubuntu Server 10.10
# This script must install the following requirements
# * apache2
# * mod_wsgi
# * mysql
# * pip
#!/bin/bash
# To run do:
# wget https://gist.github.com/raw/850359/ea02e22f021b7ebf2f602811461677ab4a3f2a9e/bootstrap.sh && chmod +x bootstrap.sh && ./bootstrap.sh && source ~/.profile
#
# Based on Amazon EC2 AMI ID ami-ccf405a5 Ubuntu Server 10.10
# This script will:
# * install/config apache2
# * install mod_wsgi
# * install/config nginx
#!/usr/bin/env python
"""
fabfile.py
Copyright (c) 2011 Giovanni Collazo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# grep color
export GREP_OPTIONS='--color=auto'
# ls color
export CLICOLOR=1
export LSCOLORS=dxfxcxdxbxegedabagacad
<s:TileGroup id="cardsTileGroup" requestedColumnCount="3">
from hashlib import sha1
def main():
print hashfile("~/Desktop/lift-columns.png")
def hashfile(path):
f = open(path)
file_hash = githash(f.read())
f.close()
@gcollazo
gcollazo / udp_hole_punch_tester.py
Created July 16, 2011 15:16 — forked from somic/udp_hole_punch_tester.py
UDP Hole Punching test tool
#!/usr/bin/env python
#
# udp_hole_punch_tester.py - UDP Hole Punching test tool
#
# Usage: udp_hole_punch_tester.py remote_host remote_port
#
# Run this script simultaneously on 2 hosts to test if they can punch
# a UDP hole to each other.
#
# * remote_port should be identical on 2 hosts.
<script language="JavaScript">
$(window).ready(function() {
$.Edge.symbol.get($("#stage"))._getTimeline("Default Timeline").addObserver({ onComplete: function() {
$.Edge.symbol.get($("#stage")).play("Default Timeline");
}});
});
</script>