Skip to content

Instantly share code, notes, and snippets.

View johnbendi's full-sized avatar

John Chijioke johnbendi

View GitHub Profile
@johnbendi
johnbendi / Pux output
Created August 1, 2014 07:54
Pux compilation output
/opt/php/Pux/ext $ ./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
@johnbendi
johnbendi / Clojure compilation failure
Created July 31, 2014 03:39
Clojure fails to compile
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building clojure 1.6.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ clojure ---
[INFO]
[INFO] --- build-helper-maven-plugin:1.5:add-source (add-clojure-source-dirs) @ clojure ---
@johnbendi
johnbendi / gist:4191587
Created December 2, 2012 23:35
bundle install error
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/ruby-1.9.3-p237/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
@johnbendi
johnbendi / gist:4191495
Created December 2, 2012 23:04
gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.24
- RUBY VERSION: 1.9.3 (2012-11-10 patchlevel 327) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/ruby-1.9.3-p237/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/local/ruby-1.9.3-p237/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/ruby-1.9.3-p237/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
@johnbendi
johnbendi / package-err
Created November 18, 2012 12:24
package.el error
Debugger entered--Lisp error: (error "Trying to parse HTTP response code in odd buffer: *http marmalade-repo.org:80*-968649")
signal(error ("Trying to parse HTTP response code in odd buffer: *http marmalade-repo.org:80*-968649"))
error("Trying to parse HTTP response code in odd buffer: %s" " *http marmalade-repo.org:80*-968649")
url-http-parse-response()
package-handle-response()
package--download-one-archive(("marmalade" . "http://marmalade-repo.org/packages/") "archive-contents")
#[nil "\301\302\"\207" [archive package--download-one-archive "archive-contents"] 3]()
package-refresh-contents()
call-interactively(package-refresh-contents record nil)
command-execute(package-refresh-contents record)
@johnbendi
johnbendi / thread.clj
Created October 15, 2012 16:44 — forked from richhickey/thread.clj
new thread macros draft
(defmacro test->
"Takes an expression and a set of test/form pairs. Threads expr (via ->)
through each form for which the corresponding test is true."
[expr
& clauses]
(assert (even? (count clauses)))
(let [g (gensym)
pstep (fn [[test step]] `(if ~test (-> ~g ~step) ~g))]
`(let [~g ~expr
~@(interleave (repeat g) (map pstep (partition 2 clauses)))]
@johnbendi
johnbendi / gist:3740062
Created September 17, 2012 22:04
lein deps :tree
[clj-stacktrace "0.2.4"]
[com.cemerick/friend "0.0.9"]
[commons-codec "1.6"]
[net.sourceforge.nekohtml/nekohtml "1.9.10"]
[xerces/xercesImpl "2.8.1"]
[xml-apis "1.3.03"]
[org.apache.httpcomponents/httpclient "4.2-beta1"]
[org.apache.httpcomponents/httpcore "4.2-beta1"]
[org.mindrot/jbcrypt "0.3m"]
[org.openid4java/openid4java-nodeps "0.9.6"]
@johnbendi
johnbendi / gist:3740038
Created September 17, 2012 21:57
project with piggie
(defproject one "1.0.0-SNAPSHOT"
:description "Getting Started with ClojureScript."
:dependencies [[org.clojure/clojure "1.4.0"]
[ring "1.0.0-RC1"]
[compojure "1.0.1"]
[enlive "1.2.0-alpha1"]
[com.cemerick/friend "0.0.9"]
[com.cemerick/piggieback "0.0.1"]
[com.datomic/datomic "0.1.3164"]
[org.mozilla/rhino "1.7R3"]
@johnbendi
johnbendi / piggieback
Created September 17, 2012 21:55
IllegalStateException by piggieback
java.lang.IllegalStateException: Can't change/establish root binding of: *cljs-repl-options* with set
Var.java:233 clojure.lang.Var.set
piggieback.clj:113 cemerick.piggieback/cljs-repl
RestFn.java:421 clojure.lang.RestFn.invoke
NO_SOURCE_FILE:2 user/eval3086
Compiler.java:6511 clojure.lang.Compiler.eval
Compiler.java:6477 clojure.lang.Compiler.eval
core.clj:2797 clojure.core/eval
main.clj:245 clojure.main/repl[fn]
main.clj:266 clojure.main/repl[fn]
@johnbendi
johnbendi / api
Created September 5, 2012 02:01
poor api doc
;; Our file-generating function, `->files` is very simple. We'd like
;; to keep it that way. Sometimes you need your file paths to be
;; templates as well. This function just renders a string that is the
;; path to where a file is supposed to be placed by a template.
;; It is private because you shouldn't have to call it yourself, since
;; `->files` does it for you.
(defn- template-path [name path data]
(io/file name (render-text path data)))
;; A template, at its core, is meant to generate files and directories that