cd /opt
sudo mkdir graphite
sudo chown `logname` graphite
virtualenv --distribute graphite
cd /opt/graphite
source bin/activate
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
// Nao esqueca de mudar o iframe no console do Chrome antes de rodar. | |
// Com os dados impressos pelo console.log, importe eles no | |
// http://batchgeo.com/ | |
console.log("City\tState\tAddress\tZip\tName\tPhone Number"); | |
$('#pnResult').find('table.tabela_dados').each(function() { | |
var a = { | |
"address": $(this).find('th:contains("Endereço")').next().text(), | |
"name": $(this).find('th:contains("Razão Social")').next().text(), |
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
package recfun | |
import common._ | |
object Main { | |
def main(args: Array[String]) { | |
println("Pascal's Triangle") | |
for (row <- 0 to 10) { | |
for (col <- 0 to row) | |
print(pascal(col, row) + " ") | |
println() |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 ruby | |
# | |
# Runs during git flow hotfix start | |
# | |
# Positional arguments: | |
# $1 Version | |
# | |
# Return VERSION - When VERSION is returned empty, git-flow will stop as the | |
# version is necessary | |
# |
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
(defn make-dict [] | |
(let [vals (range 256)] | |
(zipmap (map vector vals) vals))) | |
(defn compress- [{:keys [dict index w out] :as a} b] | |
(let [buffer (conj w b)] | |
(if (contains? dict buffer) | |
(assoc a :w buffer) | |
{:dict (assoc dict buffer index) |
NewerOlder