
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
(ns primes.core) | |
(defn- primes | |
"returns a lazy list of prime numbers via the sieve of eratosthenes" | |
([] | |
(primes (iterate inc 2))) | |
([[head & tail]] | |
(cons head | |
(lazy-seq (primes (remove #(and (not= % head) | |
(zero? (mod % head))) tail)))))) |
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/local/bin/lumo | |
(ns balanced.core | |
(:require [lumo.core :refer [*command-line-args*]] | |
[clojure.string :refer [join]])) | |
(defn is-pair? [ch1 ch2] | |
(let [pairs {"(" ")" | |
"[" "]" | |
"{" "}"}] | |
(= (get pairs ch1) ch2))) |
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/local/bin/lumo | |
(ns sphere.core | |
(:require [lumo.core :refer [*command-line-args*]] | |
[clojure.string :refer [join]] | |
[cljs.reader :refer [read-string]])) | |
(defn sqr [n] (* n n)) | |
(defn sqrt [n] (.sqrt js/Math n)) | |
(defn cbrt [n] (.cbrt js/Math n)) | |
(defn abs [n] (.abs js/Math n)) |
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
// ==UserScript== | |
// @name aws-login | |
// @source | |
// @downloadURL | |
// @version 0.1.0 | |
// @description login to AWS | |
// @author kolja | |
// @include *://signin.aws.amazon.com/saml | |
// @run-at document-idle | |
// @grant none |
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
var add = function(x) { | |
add.sum = add.sum || 0; | |
add.sum += x; | |
add.valueOf = function() { | |
return add.sum; | |
}; | |
return add; | |
}; |
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
-----BEGIN PGP MESSAGE----- | |
Version: GnuPG/MacGPG2 v2.0.22 (Darwin) | |
Comment: GPGTools - https://gpgtools.org | |
owGbwMvMwMV46WzJSv/3XXsZTx94lsQQYin7oFopKT+lUsmqWik5JzM1rwTEykvM | |
TVWyUspOrUxKLE7Vy8xXyMtPSdXLKlaAqtFRKkstKs7MzwOqMtAz1zNSqtUBKQdp | |
TsvMS08tKijKBJmlZGJsapJskmaSZGZkYmRqZGBoaWmcapZslmKUnGJukmhpkpaa | |
ZpGYlAI0MiO/uATFViWwmfGZKUBRFyNnF3MTR0sTN1c3C0cnF6BcKVgiydzQIikx | |
0dQkycLMPCnJ0MzIwMQ8LSU5xTLZINnUwACksDi1COal/JysRJBjgUJlmcmpSL5N | |
zyzJKE3CobyksgDEL09NiofqjE/KzEsBehU5LAyBKpNLMkFaDU0MjQ2MLI0NDXSU |
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/local/bin/coffee | |
nopt = require 'nopt' | |
nano = require('nano')('http://localhost:5984/dailies') | |
optionDef = | |
"u": String # user | |
"m": String # Message | |
"l": Number | |
"t": [String, Array] # Tags |
NewerOlder