This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rvm update | |
rvm 1.0.11 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/] | |
env: bash: No such file or directory | |
__rvm_run:28: command not found: touch | |
__rvm_run:30: command not found: date | |
__rvm_run:31: command not found: tee | |
env: bash: No such file or directory | |
env: bash: No such file or directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(1.9.2): if false | |
?> x = 5 | |
?> end | |
==========> nil | |
irb(1.9.2): x | |
==========> nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install -v emacs --cocoa: | |
==> Build Environment | |
CC: /usr/bin/cc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 | |
CXX: /usr/bin/c++ => /usr/bin/c++-4.2 | |
LD: /usr/bin/cc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 | |
CFLAGS: -O3 -w -pipe | |
CXXFLAGS: -O3 -w -pipe | |
MAKEFLAGS: -j4 | |
==> Downloading http://ftp.gnu.org/pub/gnu/emacs/emacs-23.3.tar.bz2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This works | |
(defn ^:dynamic foo [] "foo") | |
(def o (proxy [Object] [] | |
(toString [] (foo)))) | |
(str o) ;=> "foo" | |
(binding [foo (fn [] "inside binding")] (str o)) ;=> "inside binding" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
int(*outer(int val))() { | |
int inner() { | |
return val; | |
} | |
return inner; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdarg.h> | |
#ifndef __COUNTER__ | |
#error "Your C compiler doesn't support __COUNTER__. Try GCC >= 4.3 or Clang" | |
#endif | |
#define __GENSYM2(x,y) x ## y | |
#define __GENSYM1(x,y) __GENSYM2(x,y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(eval-after-load 'nrepl | |
'(progn | |
(add-hook 'nrepl-mode-hook (lambda () (paredit-mode +1))) | |
(define-key nrepl-mode-map (kbd "RET") (lambda () | |
(interactive) | |
(if (eobp) | |
(funcall 'nrepl-return) | |
(flet ((nrepl-input-complete-p (&rest args) nil)) | |
(funcall 'nrepl-return))))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn pairs-seq [m] | |
(->> (keys m) | |
(mapcat #(partition 2 (interleave (repeat %) (get m %)))))) | |
(defn subset [m n] | |
(reduce #(update-in %1 [(first %2)] (fnil conj []) (second %2)) {} | |
(take n (pairs-seq m)))) | |
(def m1 {:x [1 2] :y [3 4] :z [5]}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Java Version: http://lwjgl.org/wiki/index.php?title=LWJGL_Basics_4_(Timing)#Example | |
(ns lwjgl-tutorial.timer-example | |
(:import [org.lwjgl LWJGLException Sys] | |
[org.lwjgl.input Keyboard] | |
[org.lwjgl.opengl Display DisplayMode GL11])) | |
(defn init-gl! [] | |
(GL11/glMatrixMode GL11/GL_PROJECTION) | |
(GL11/glLoadIdentity) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
curl -L https://github.com/Originate/heroku-ruby200p247-openssl101e/raw/master/openssl-1.0.1e.tgz > /tmp/openssl-1.0.1e.tgz | |
mkdir -p /app/vendor/openssl | |
tar zxf /tmp/openssl-1.0.1e.tgz -C /app/vendor/openssl | |
mkdir -p /app/vendor/ruby | |
autoconf |
OlderNewer