Skip to content

Instantly share code, notes, and snippets.

Avatar
🐙
multiplexing

David Alberto Viramontes dviramontes

🐙
multiplexing
View GitHub Profile
@echophon
echophon / orca_x_hydra.js
Last active Aug 11, 2021
orca_x_hydra.js
View orca_x_hydra.js
// Example of OSC control of Hydra video synth w/Orca programming language
// by Yancy Way (echophon)
//
// https://github.com/hundredrabbits/Orca
// https://github.com/ojack/hydra
// https://github.com/ojack/hydra-examples
// https://atom.io/packages/atom-hydra
//
// Prerequisites: Orca, Atom, Atom-hydra extension
//
@zelark
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 https://github.com/remodoy/clj-postgresql
(ns pg-test.types
(:require [cheshire.core :as json]
[clojure.java.jdbc :as jdbc])
(:import [org.postgresql.util PGobject]
[java.sql PreparedStatement]))
;; Writing
(defn- to-pg-json [data json-type]
View how-to-use-owlet.firebase.md

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](https://firebase.google.com/docs/reference/js/firebase.database.Refe

@Smolations
Smolations / epoxy_help.md
Created Sep 22, 2017
`npm run help` in epoxy
View epoxy_help.md
$ npm run help

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

Lifecycle scripts included in epoxy:
  postinstall
    jspm install
  start
@Smolations
Smolations / elmer_help.md
Created Sep 22, 2017
`npm run help` in elmer
View elmer_help.md
$ npm run help

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

Lifecycle scripts included in @tangogroup/elmer:
  start
    webpack-dev-server --config webpack.toolkit.config.js --open
  test
@kartiksura
kartiksura / main.go
Last active Sep 19, 2021
Querying AWS Athena using Golang SDK
View main.go
package main
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/athena"
)
@reborg
reborg / rich-already-answered-that.md
Last active Sep 29, 2021
A curated collection of answers that Rich gave throughout the history of Clojure
View rich-already-answered-that.md

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
ljharb / array_iteration_thoughts.md
Last active Oct 19, 2021
Array iteration methods summarized
View array_iteration_thoughts.md

Array Iteration

https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff

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.

Intro

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
mfikes / source.md
Last active Dec 27, 2016
Source for C and ClojureScript comparison
View source.md
@ralphschindler
ralphschindler / README.md
Last active Apr 16, 2021
Docker For Mac Host Address Alias To Enable PHP XDebug (10.254.254.254 Trick)
View README.md

Docker (Mac) De-facto Standard Host Address Alias

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

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)...