lein new NAME # Cria um novo projeto
lein deps # Baixa as dependências
lein repl # Iniciar o REPL
lein compile # Gera o war
Exemplo de project.clj para o Google App Engine
| (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) |
| #!/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 | |
| # |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| 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() |
| // 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(), |
| """ | |
| 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) | |
| """ |
| ### 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: |
| 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}, |