Skip to content

Instantly share code, notes, and snippets.


Jonas Galvez galvez

View GitHub Profile
View index.html
<!DOCTYPE html>
<meta charset="utf-8"/>
<title>symbol vs string property</title>
<script src=""></script>
<script src="./suite.js"></script>
<h1>Open the console to view the results</h1>
View regioes_br_checkboxes_helper.rb
'Norte' => [
['Acre', 'AC'],
['Amazonas', 'AM'],
['Pará', 'PA'],
['Rondônia', 'RO'],
['Roraima', 'RR'],
['Tocantins', 'TO']
View gist:735499
def print_warning(msg):
print"WARNING: ") + msg
def print_error(msg):
print"ERROR: ") + msg
def print_label(msg):
print"==> ", bold=True) + msg
#!/usr/bin/env python
Export Google Docs to a local directory.
Requires the GData Python client library:
View jquery.or.js
// jQuery.fn.or
// $('.dont-exist').or('.does-exist') //=> [.does-exist];
// $('.does-exist').or('.dont-exist') //=> [.does-exist];
or: function(selector, context) {
if ($(this).length > 0) {
return $(this);
} else {
View gist:263457
# 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