Skip to content

Instantly share code, notes, and snippets.

/home/cag/cag/current/public/dispatch.cgi:10ndor/rails/railties/lib/dispatcher.rb:41:in `dispatch'0:in `process'4:in `sass_old_process'gement_support'
We couldn’t find that file to show.
Installation steps (untested, sorry no CentOS machine)
install file at /etc/init.d/marmalade
change PATH TO NODE BINARY
change PATH TO MARMALADE
change user if desired
#add script to rc.d
sudo chkconfig --add marmalade
(defn doc-from-ns-form
"Extract the docstring from a given ns form without evaluating the form. The docstring returned should be the return value of (:doc (meta namespace-symbol)) if the ns-form were to be evaluated."
[ns-form]
(let [meta-docstring (:doc (meta (second ns-form)))
references (next (next ns-form))
docstring (when (string? (first references)) (first references))
references (if docstring (next references) references)
attribute-docstring (:doc (when (map? (first references)) (first references)))]
(or attribute-docstring docstring meta-docstring)))
@ryantm
ryantm / test-obsolete.el
Last active January 2, 2016 06:19
Macro for maintaining backward compatibility with functions declared obsolete without byte-compilation warnings
(defun <-running-version (version)
(let* ((split-version (split-string version "\\."))
(major-version (string-to-number (first split-version)))
(minor-version (string-to-number (second split-version))))
(or (< major-version emacs-major-version)
(and (eq major-version emacs-major-version)
(< minor-version emacs-minor-version)))))
(defmacro call-obsolete-function (name new-name when &rest rest)
(let ((function-name (if (<-running-version when)
@ryantm
ryantm / gist:8272318
Created January 5, 2014 18:55
Emacs safe Local variables
(let ((vars nil)) (mapatoms (lambda (atom) (when (get atom 'safe-local-variable) (push atom vars)))) vars)
a = 1
puts local_variables.inspect #=> [:a]
proc { |;a|
puts local_variables.inspect #=> [:a,:a,:a]
}.call
tlbounce.core=> (defrecord A [a b c])
tlbounce.core.A
tlbounce.core=> (clojure.tools.reader.edn/read-string "#tlbounce.core.A{:a 1 :b 2 :c 3}")
ExceptionInfo No reader function for tag tlbounce.core.A clojure.core/ex-info (core.clj:4327)
extern crate num;
use num::bigint::BigInt;
use std::from_str::FromStr;
fn main () {
println!("{}", BigInt::from_str("1"));
}
import Control.Arrow
main = return ()
printFile = readFile >>> print