Skip to content

Instantly share code, notes, and snippets.


David Alberto Viramontes dviramontes

View GitHub Profile
echophon / orca_x_hydra.js
Last active Aug 11, 2021
View orca_x_hydra.js
// Example of OSC control of Hydra video synth w/Orca programming language
// by Yancy Way (echophon)
// Prerequisites: Orca, Atom, Atom-hydra extension
zelark / pg_test.types.clj
Last active Dec 13, 2020
Support json and jsonb Postgres types in Clojure.
View pg_test.types.clj
;; For supporting more PG types, see
(ns pg-test.types
(:require [cheshire.core :as json]
[ :as jdbc])
(:import [org.postgresql.util PGobject]
[java.sql PreparedStatement]))
;; Writing
(defn- to-pg-json [data json-type]

Using owlet.firebase

Namespace owlet.firebase serves to integrate a Firebase database into our re-frame web application. We need to talk to Firebase without dropping into evil JS interop — so you shouldn't use .set! But more generally, we must preserve the integrity of our application's re-frame data flow.

re-frame data flow

In the description below, I've tried to be entirely consistent in my use of names; i.e. the scope of any name is this entire document. So when you see your-value or the-db-ref, you can count on those names indicating the same entities when they appear later in the document. Also, "ref" or "reference" refers to an instance of [firebase.database.Reference](

Smolations /
Created Sep 22, 2017
`npm run help` in epoxy
$ npm run help

> epoxy@0.41.2 help /home/vagrant/polymer/epoxy
> npm run & gulp help

Lifecycle scripts included in epoxy:
    jspm install
Smolations /
Created Sep 22, 2017
`npm run help` in elmer
$ npm run help

> @tangogroup/elmer@1.0.0 help /home/vagrant/polymer/elmer
> npm run & gulp help

Lifecycle scripts included in @tangogroup/elmer:
    webpack-dev-server --config webpack.toolkit.config.js --open
kartiksura / main.go
Last active Sep 19, 2021
Querying AWS Athena using Golang SDK
View main.go
package main
import (
reborg /
Last active Sep 29, 2021
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

ljharb /
Last active Oct 19, 2021
Array iteration methods summarized

Array Iteration

While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.


JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it mu

mfikes /
Last active Dec 27, 2016
Source for C and ClojureScript comparison
ralphschindler /
Last active Apr 16, 2021
Docker For Mac Host Address Alias To Enable PHP XDebug ( Trick)

Docker (Mac) De-facto Standard Host Address Alias

This launchd script will ensure that your Docker environment on your Mac will have as an alias on your loopback device ( The command being run is ifconfig lo0 alias

Once your machine has a well known IP address, your PHP container will then be able to connect to it, specifically XDebug can connect to it at the configured xdebug.remote_host.

Installation Of IP Alias (This survives reboot)

Copy/Paste the following in terminal with sudo (must be root as the target directory is owned by root)...