Skip to content

Instantly share code, notes, and snippets.

Jonas Galvez galvez

View GitHub Profile
View gist:735499
def print_warning(msg):
print fabric.colors.red("WARNING: ") + msg
def print_error(msg):
print fabric.colors.red("ERROR: ") + msg
def print_label(msg):
print fabric.colors.blue("==> ", bold=True) + msg
View gexport.py
#!/usr/bin/env python
"""\
gexport.py
Export Google Docs to a local directory.
Requires the GData Python client library:
http://code.google.com/p/gdata-python-client/
"""
View jquery.or.js
// jQuery.fn.or
//
// $('.dont-exist').or('.does-exist') //=> [.does-exist];
// $('.does-exist').or('.dont-exist') //=> [.does-exist];
$.fn.extend({
or: function(selector, context) {
if ($(this).length > 0) {
return $(this);
} else {
View gist:263457
#!/bin/bash
# ddiff: Improved diff for directories
# ---------------------------------------------------------------------------------
# This is useful for creating a diff file between two directories.
# It's built upon the tradicional diff program.
# With a difference: it will create diff files for each file present only in the first directory.
# So, for given dirs A and B:
# full-diff A B
#
View regioes_br_checkboxes_helper.rb
REGIOES_BRASILEIRAS = {
'Norte' => [
['Acre', 'AC'],
['Amapá','AP'],
['Amazonas', 'AM'],
['Pará', 'PA'],
['Rondônia', 'RO'],
['Roraima', 'RR'],
['Tocantins', 'TO']
],
You can’t perform that action at this time.