This file contains hidden or 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"/> | |
<title>symbol vs string property</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains hidden or 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 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 |
This file contains hidden or 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 | |
"""\ | |
gexport.py | |
Export Google Docs to a local directory. | |
Requires the GData Python client library: | |
http://code.google.com/p/gdata-python-client/ | |
""" |
This file contains hidden or 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
// 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 { |
This file contains hidden or 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 | |
# 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 | |
# |
This file contains hidden or 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
REGIOES_BRASILEIRAS = { | |
'Norte' => [ | |
['Acre', 'AC'], | |
['Amapá','AP'], | |
['Amazonas', 'AM'], | |
['Pará', 'PA'], | |
['Rondônia', 'RO'], | |
['Roraima', 'RR'], | |
['Tocantins', 'TO'] | |
], |