Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
(ns xxx.db | |
(:require [clojure.java.io :as io] | |
[clojure.string :as str] | |
[datomic.api :as d]) | |
(:import [datomic Util] | |
[java.util Date])) | |
;; Datomic utils ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(defn read-all |
(ns casino.core) | |
;; Strategies ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; | |
;; A strategy is a function applied to a sequence of turns. | |
(defn crazy-strat1 | |
"Random pick." | |
[_] | |
(rand-nth [true false])) |
(ns mud.sandbox | |
(:require [schema.core :as s] | |
[clojure.java.io :as io] | |
[clojure.string :as str] | |
[clojure.set :as set] | |
[mud.ansi :as ansi]) | |
(:import [java.net ServerSocket] | |
[java.io PrintWriter])) | |
(defn prompt |
(ns scratch.hangman | |
(:require | |
[clojure.java.io :as io] | |
[clojure.string :as str])) | |
(def hangman-frames | |
(str/split | |
(slurp (io/resource "data/hangmen.txt")) | |
#"\n\n")) |
(ns daily.ch-163-fallout-hacking-game | |
(:require | |
[clojure.java.io :as io] | |
[clojure.string :as str])) | |
(def all-words | |
"The entire dictionary of available words." | |
(str/split-lines (slurp (io/resource "enable1.txt")))) | |
(defn word-difference |
DROP TABLE IF EXISTS users CASCADE; | |
CREATE TABLE users ( | |
id serial PRIMARY KEY, | |
uname text NOT NULL UNIQUE, | |
digest text NOT NULL, | |
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP | |
); |
(ns drugcritic.slug | |
(:require [clojure.string :as str])) | |
;;Stop at '-<number>' | |
;;Stop at '.' | |
;;Stop at <number> | |
;;Stop at 'and' | |
;;Stop at ';' | |
;;Stop at '(' | |
;;Stop at 'preservative free' |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
main :: IO () | |
main = do | |
runGame [] | |
runGame :: [Integer] -> IO () | |
runGame nums = do | |
putStrLn "Give me a number (or 0 to stop):" | |
inputStr <- getLine | |
let inputNum = (read inputStr) :: Integer | |
if inputNum == 0 |
RestClient.post("http://localhost:3000/lol", | |
{:id => "peat", :label => "Peat Bakke", :attributes => [{:for => "attribute_name", :value => 1}, {:for => "something_else", :value => "wee"}]}.to_json, | |
:content_type => :json) |