Skip to content

Instantly share code, notes, and snippets.

@beesandbombs
beesandbombs / wavingCubes.pde
Created September 11, 2017 22:23
waving cubes
// gif by dave @beesandbombs :)
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@reborg
reborg / rich-already-answered-that.md
Last active February 23, 2024 13:09
A curated collection of answers that Rich gave throughout the history of Clojure

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link in the table of content jumps at the copy of the answer on this page.
  • The link on the answer itself points back at the original post.

Table of Content

Back at the theater in Tripoli, it was the year 1885, the first theater in the Middle East.
The vendor woman, an old Alawite, told us that once they had rolled the red carpet all the
way from the harbor to the theater for Oum Kalthoum to perform at the glorious Ottoman building.
There was nothing but rubble to be seen now, and the sound of diggers and hammers.
The Ingea Theater was no more. Now I recalled, it was Rabih Mroué who had asked Catherine Deneuve
in that film, "You wanted to see, I also want to see but I can't seem to. Do you see that?"
And the truth is that neither of us would see anything, but diggers, hammers and rubble.
It wasn't only the theater, but the city and the whole country, there was nothing to see but rubble.
At some point I wanted to ask him if maybe the whole world was made of rubble now.
As we drove away, he told me: "You know, we, the Lebanese and the Jews, we are perhaps the first
@georgebrock
georgebrock / Info.plist
Last active December 8, 2023 22:12
AppleScript to handle URLs
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<!-- Add this section: -->
<key>CFBundleURLTypes</key>
<array>
<dict>
@shibukawa
shibukawa / goto.c
Last active November 20, 2020 11:27
goto for JS
first:
printf("first\n")
goto third;
second:
printf("second\n");
thrid:
printf("third\n");
@pleasetrythisathome
pleasetrythisathome / form.cljs
Last active May 7, 2016 05:45
om forms - form parent local state as cursor
(def inputs [{:korks :email}
{:korks [:name :first]}
{:korks [:name :last]}])
(defn form [app owner]
(reify
om/IInitState
(init-state [this]
(reduce (fn [state {:keys [korks]}]
(assoc-in state korks nil))
@staltz
staltz / introrx.md
Last active April 15, 2024 10:24
The introduction to Reactive Programming you've been missing
anonymous
anonymous / gist:b1f303426e51f8509a0b
Created June 4, 2014 21:14
processing motion blur
// Processing motion blur
// 'time' runs from 0 to 1
// ignore everything above the /////////
// by Dave @ beesandbombs
int[][] result;
float time;
void setup() {
setup_();
@noprompt
noprompt / slurp.clj
Created February 19, 2014 04:52
How to use slurp from ClojureScript
(ns foo.core
(:refer-clojure :exclude [slurp]))
(defmacro slurp [file]
(clojure.core/slurp file))
;; In CLJS
(ns bar.core
(:require [foo.core :include-macros true :refer [slurp]]))
@thomcc
thomcc / Jelly-Physics.markdown
Created February 2, 2014 20:07
A Pen by Thom Chiovoloni.