Skip to content

Instantly share code, notes, and snippets.

@electrum
electrum / build-native-mac.sh
Last active July 16, 2020 06:34
Compile native libraries on Mac OS X
brew install snappy
CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ant compile-native
chmod 644 build/native/Mac_OS_X-x86_64-64/lib/*
ls -l /usr/local/lib/libsnappy.dylib
ls -l build/native/Mac_OS_X-x86_64-64/lib/libhadoop.dylib
@rmoorman
rmoorman / install-ghc-cabal.md
Created November 22, 2012 10:28 — forked from ion1/install-ghc.md
Installing GHC and Cabal under the home directory

Installing GHC and Cabal under the home directory

  1. Install libgmp-dev libgmp3c2 or equivalent using the system package manager.
  2. Add export PATH="$HOME/.ghc/bin:$HOME/.cabal/bin:$PATH" to your .<shell>rc.
  3. Also run the command above now.
  4. Get the [GHC binary tarball][ghc] and extract it.
  5. ./configure --prefix="$HOME/.ghc" && make install
  6. Get the [cabal-install source tarball][cabal] and extract it.
  7. EXTRA_CONFIGURE_OPTS=-p sh bootstrap.sh
  8. cabal update

mogemoge


hogehogehogeaaaaaaaaaa

see Wikipedia

Markdown is a lightweight markup language, originally created by John Gruber and Aaron Swartz allowing people "to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML)".

@ishikawa
ishikawa / index-of-any.clj
Created September 23, 2010 09:16
index-of-any - Programming Clojure "2. Exploring Clojure" p71
;; Programming Clojure "2. Exploring Clojure" p71
;;
; NOTE: The ``indexed`` function already exists as part of
; clojure-contrib (coljure.contrib.seq/indexed).
(defn indexed
"Returns a lazy sequence of [index, item] pairs, where items
come from 'coll' and indexes count up from zero."
[coll]
(map vector (iterate inc 0) coll))
@ishikawa
ishikawa / square-roots-by-newtons-method.clj
Created September 22, 2010 15:47
SICP 1.1.7 "Squre Roots by Newton's Method"
;; SICP 1.1.7 "Squre Roots by Newton's Method"
;;
;; user=> (load-file "sicp/square-roots-by-newtons-method.clj")
;; #'user/sqrt
;; user=> sqrt
;; #<user$sqrt user$sqrt@1b0c6cfc>
;; user=> (sqrt 9)
;; 3.00009155413138
;; user=> (sqrt (+ 100 37))
;; 11.704699917758145