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 CHEATSHEET | |
;; | |
;; * :require makes functions available with a namespace prefix | |
;; and optionally can refer functions to the current ns. | |
;; | |
;; * :import refers Java classes to the current namespace. | |
;; | |
;; * :refer-clojure affects availability of built-in (clojure.core) | |
;; functions. |
1) Use build_flymake.sh to compile flymake.erl into the eflymake script. | |
2) Replace your existing eflymake script with the newly built one. | |
NOTE: Don't forget to make a back up copy of your original eflymake in case this one has bugs! |
-module(netstat). | |
-compile([export_all]). | |
-record(sock, {port, local, peer, stat, proc}). | |
retinfo({State, Term}) when is_atom(State) -> | |
Term. | |
sockinfo(Port, PortInfo) -> | |
Proc = proplists:get_value(connected, PortInfo), |
# -*- coding: utf-8 -*- | |
""" | |
Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html | |
Original script: Ola Sitarska <ola@sitarska.com> | |
Improved version: Cristian Dinu <goc9000@gmail.com> | |
This script requires python-epub-library: http://code.google.com/p/python-epub-builder/ | |
The checking facility requires epubcheck: http://code.google.com/p/epubcheck/ | |
Embedding the 'Roots of Lisp' paper requires the programs ps2pdf and pdftoppm |
{:live-repl {:repl-options {:port 4555}} | |
:user {:plugins [[lein-clojars "0.9.1"]] | |
:aliases {"live" ["with-profile" "default,live-repl" "repl"]}}} |
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
This gist is deprecated in favor of https://github.com/ninenines/cowboy/blob/master/doc/src/guide/specs.asciidoc which has a formatted version at https://ninenines.eu/docs/en/cowboy/2.0/guide/specs/
(def stats-graph
{:n (fnk [xs] (count xs))
:m (fnk [xs n] (/ (sum identity xs) n))
:m2 (fnk [xs n] (/ (sum #(* % %) xs) n))
:v (fnk [m m2] (- m2 (* m m)))})