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
#!/bin/bash | |
PEMFILEPATH=$1 | |
DEV_EMAIL=$2 | |
BUCKET=$3 | |
echo "CREATING 200MB Random File"; | |
dd if=/dev/urandom of=file.in bs=1M count=1 | |
echo "FINISHED CREATING 1MB Random File" | |
echo "$(ls -ltra file.in)" | |
cat <<EOF > testcase.js | |
var gcloud = require("gcloud"); |
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
(defun rmap-over-list (function list) | |
(when list | |
(cons (funcall function (first list)) | |
(rmap-over-list function (cdr list))))) | |
(defun imap-over-list (function list) | |
(loop for value in list collect (funcall function value))) | |
(defun add7 (number) (+ number 7)) |
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
added this: | |
(ps:chain ($ "div#blog a") (embedly (ps:create "maxWidth" 450))) | |
and this: | |
(setf (ps:getprop (ps:chain $ embedly defaults) "key") | |
,*embedly-key*) | |
now I will test gist on my site |
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
;;Jonathan Smith 2010 | |
;;inspired by esessoms clj-interface | |
;;http://github.com/esessoms/clj-interface | |
(ns libs.erlang (:import | |
[com.ericsson.otp.erlang | |
OtpErlangAtom | |
OtpErlangBinary | |
OtpErlangBoolean | |
OtpErlangChar |
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
(defmodule imp (export (bar 0))) | |
(eval-when-compile | |
(defun import-function-1 (module function) | |
;(: io format '"~p~p~n" (list module function)) | |
(let ((mod-fun (list_to_atom | |
(: lists concat (list module '":" function))))) | |
; (: io format '"~p~n" (list mod-fun)) |
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
(defmethod emit-special 'aget! [type [set! var idx]] | |
(str (emit var) "[" (emit idx) "]")) |
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
If you look at test_macro.lfe | |
(defmacro let@ | |
(((vb . vbs) . b) `(let (,vb) (let@ ,vbs . ,b))) | |
((() . b) `(begin . ,b))) | |
(defsyntax let& | |
([(vb . vbs) . b] [let (vb) (let& vbs . b)]) | |
([() . b] [begin . b])) |
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
(defmodule resource4 | |
(author '[email protected]) | |
(export (out 1))) | |
(include-file "/home/jon/clyawjure/yaws-1.85/include/yaws_api.lfe") | |
(defun out (arg) | |
(let* ((url (: yaws_api request_url arg)) | |
(method (http_request-method (arg-req arg))) | |
(path (: string tokens (url-path url) '"/"))) |
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
(defn mouse-click [[x y] state] | |
(let [ul (:upper-left state) | |
lr (:lower-right state) | |
coord (map / [x y] (:dim state))] | |
(update-bounds | |
(assoc state | |
:offset (map + ul (map * coord (map - lr ul))))))) | |
(defn key-press [key s] | |
(if-let [dispatch-fn ({:Z (fn [state] |
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
(defmap rgb-color-fractal | |
(let [val % | |
z (.xy val) | |
n (.z val) | |
normalized-count (/ (- n (log2 (log2 (sqrt (+ (* (.x z) (.x z)) (* (.y z) (.y z))))))) | |
(float max-iterations))] | |
(? (< 4.0 (dot z z)) | |
(color3 normalized-count normalized-count (mix 0.2 1.0 normalized-count)) | |
(color3 0.0 0.0 0.0)))) |
NewerOlder