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
// 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
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
// 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
### Keybase proof | |
I hereby claim: | |
* I am canassa on github. | |
* I am canassa (https://keybase.io/canassa) on keybase. | |
* I have a public key whose fingerprint is 45B8 8E66 CE7F FB3D E5A2 531B 003D 4D74 F252 5084 | |
To claim this, I am signing this object: |
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
local display = { | |
{1, 0, 0, 0, 0, 0, 0, 0}, | |
{0, 1, 0, 0, 0, 0, 0, 0}, | |
{0, 0, 1, 0, 0, 0, 0, 0}, | |
{0, 0, 0, 1, 0, 0, 0, 0}, | |
{0, 0, 0, 0, 1, 0, 0, 0}, | |
{0, 0, 0, 0, 0, 1, 0, 0}, | |
{0, 0, 0, 0, 0, 0, 1, 0}, | |
{0, 0, 0, 0, 0, 0, 0, 1}, |
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
""" | |
Replaces unittest style asserts (e.g.: self.assertEqual) with py.test style asserts | |
Usage: | |
from lib2to3.refactor import RefactoringTool | |
refactoring_tool = RefactoringTool(['fix_pytest']) | |
refactoring_tool.refactor(['input.py'], write=True) | |
""" |
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) |
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
local POLLING = 2 | |
local Sand = 'minecraft:sand' | |
local CFSpray = 'IC2:itemFoamSprayer' | |
local Scaffold = 'IC2:blockIronScaffold' | |
local Reinforced = 'IC2:blockAlloy' | |
local function SelectByName(name) | |
for i=1,16 do | |
local detail = turtle.getItemDetail(i) | |
if detail and detail.name == name then |
OlderNewer