This file contains hidden or 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 | |
| mkdir -p /app/vendor/openssl | |
| tar zxf openssl-1.0.1e.tar.gz | |
| cd openssl-1.0.1e | |
| ./Configure linux-x86_64 shared --prefix=/app/vendor/openssl | |
| make all install_sw |
This file contains hidden or 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/postgres | |
| CFLAGS='-I/app/vendor/openssl/include' LDFLAGS='-L/app/vendor/openssl/lib -Wl,-rpath,/app/vendor/openssl/lib' ./configure --prefix=/app/vendor/postgres --with-openssl --with-gnu-ld |
This file contains hidden or 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
| (ns interpolation.core) | |
| (defn full-list [prtl-lis st end] | |
| (if (<= st end) | |
| (let [lis (drop-while #(< (first %) st) prtl-lis) | |
| slope (fn slope | |
| [[x1 y1 :as p1] [x2 y2 :as p2]] | |
| (if (and p1 p2) | |
| (/ (- y2 y1) (- x2 x1)) | |
| 0)) |
This file contains hidden or 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
| (define (read-vec port) | |
| (if (eq? (peek-char port) #\]) | |
| (begin (read-char port) '()) | |
| (cons (read) (read-vec port)))) | |
| (set-read-syntax! #\[ (lambda (port) | |
| (cons 'vector (read-vec port)))) | |
| ;; REPL | |
| #1> [1 2 [3 4]] |
This file contains hidden or 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
| (use srfi-69) | |
| (define-record protocol name impls sigs) | |
| (define (protocol-dispatch-type obj) | |
| (cond | |
| ((and (not (##sys#immediate? obj)) | |
| (##sys#generic-structure? obj)) | |
| (##sys#slot obj 0)) | |
| ((pair? obj) 'pair) |
This file contains hidden or 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 <assert.h> | |
| #include <stdbool.h> | |
| #include <string.h> | |
| #include <sys/time.h> | |
| #include <gc.h> | |
| #define MIN(x, y) \ | |
| (((x) < (y)) ? (x) : (y)) |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| type F func(x int) int | |
| func (f F) doit (y int) int { | |
| return f(y) + 3 |
This file contains hidden or 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> require 'webrick' | |
| #=> true | |
| irb> server = WEBrick::HTTPServer.start :Port => 4000 | |
| #=> #<WEBrick::HTTPServer:0x007fc349081ec0 ...> | |
| irb> server.mount_proc("/foo") { |req, res| res.status = 400; res.body = "WHOOPS\n" } | |
| #=> [#<WEBrick::HTTPServlet::ProcHandler:0x007fc34a1131f8 @proc=#<Proc:0x007fc34a113248@(irb):4>>, []] | |
| irb> server.start | |
| # [2014-05-14 10:51:28] INFO WEBrick::HTTPServer#start: pid=77103 port=4000 | |
| # Meanwhile, in the shell... |
This file contains hidden or 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
| From f39fa6b9c44a70123735db1e8333ade226a4485f Mon Sep 17 00:00:00 2001 | |
| From: Jon Distad <jon.distad@gmail.com> | |
| Date: Sat, 17 May 2014 11:44:15 -0400 | |
| Subject: [PATCH] Fix map unquote-splicing | |
| `{~@[1 2]} ;=> {1 2} | |
| (meta `^{~@[:foo :bar]} asdf) ;=> {:foo :bar} | |
| --- | |
| src/jvm/clojure/lang/LispReader.java | 53 +++++++++++++++++++++++++++++++----- | |
| test/clojure/test_clojure/reader.clj | 19 +++++++++++++ |
This file contains hidden or 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
| http://youtu.be/_ahvzDzKdB0 |