Skip to content

Instantly share code, notes, and snippets.

View munshkr's full-sized avatar

Damián Silvani munshkr

  • Buenos Aires, Argentina
  • 13:00 (UTC -03:00)
  • X @munshkr
View GitHub Profile
@munshkr
munshkr / App.jsx
Last active January 28, 2024 15:40
Hydra Synth hook for React
import { useHydra } from './useHydra'
import { useEffect } from 'react'
function App() {
const [canvasRef, hydraLoaded] = useHydra()
useEffect(() => {
if (!hydraLoaded) return;
// when it's loaded, run this script:
@munshkr
munshkr / CODE_OF_CONDUCT_GITTER.md
Created July 20, 2022 23:35
Dymaxion Labs Code of Conduct

Welcome!

We want this to be a fun, pleasant, and harassment-free experience for everyone, regardless of gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, or religion. We do not tolerate harassment of participants in any form. Participants asked to stop any harassing behavior are expected to comply immediately.

The current admins are:

@munshkr
munshkr / CODE_OF_CONDUCT_ES.md
Last active July 12, 2022 13:56
Código de Conducta de Dymaxion Labs Community

Código de conducta de Dymaxion Labs

¡Bienvenidos!

Dymaxion Labs Community es un espacio de Slack dedicado a debatir temas en la intersección de GIS, Teledetección y Machine Learning.

Los administradores actuales son:

@munshkr
munshkr / CODE_OF_CONDUCT.md
Last active July 12, 2022 13:35
Dymaxion Labs Community CoC

Dymaxion Labs Community Code of Conduct

Welcome!

Dymaxion Labs Community is a Slack space dedicated for discussing topics at the intersection of GIS, Remote Sensing and Machine Learning.

The current admins are:

@munshkr
munshkr / build-osx.sh
Last active June 13, 2020 17:00
Package dynamically-linked Haskell binary on OSX
#!/bin/bash
# Based on http://gelisam.blogspot.com/2014/12/how-to-package-up-binaries-for.html
# This assumes binary file is called `hello-world-exe`
#
# You can test this by creatiung a new stack project:
# $ stack new hello-world
#
# Copy this file on the directory and run:
# $ chmod +x build-osx.sh
# $ ./build-osx.sh
#!/bin/bash
set -eu -o pipefail
text="
# Add global npm packages to PATH
export PATH=\$HOME/.npm-global/bin:\$PATH"
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo $text >> $HOME/.profile
@munshkr
munshkr / README.md
Last active November 20, 2019 22:38
Script for running TidalCycles from the command line (for Linux and macOS only)

TidalCycles wrapper script

This script wraps GHCI and loads TidalCycles using the bundled bootloading script. Only works on Linux and macOS.

Install

Run the following on your terminal

@munshkr
munshkr / test-image.js
Last active December 29, 2022 20:20
an example using an attached image as source #hydra
var img = document.createElement('img');
img.crossOrigin = "anonymous";
img.src = 'https://pbs.twimg.com/media/EAbCHCoXYAAsLwO?format=jpg&name=large';
img.onload = function() {
// use dynamic: true for videos
s0.init({ src: img, dynamic: false });
src(s0)
.scrollX(0, 0.01)
@munshkr
munshkr / test04.js
Last active July 25, 2019 01:53
#hydra
// moire
// by Olivia Jack
// twitter: @_ojack_
let pattern = () => osc(200, 0).kaleid(200).scale(1, 0.4)
//
pattern()
.scrollX(0.1, 0.01)
.mult(pattern())
.out()
@munshkr
munshkr / test03.js
Last active July 25, 2019 01:51
another test, by @flordefuego4 #hydra
// by @flordefuego4
osc(10,0.5,0.2).color(1,0.2,1).modulate(o0)
.modulate(osc(10).kaleid(100))
.modulateRotate(osc(10).kaleid(100))
.mult(shape(200,0,1.5).scale(0.7,0.5))
.add(src(o0).scale(0.8),0.5)
.modulate(src(o0).scrollX(()=>Math.tan(0.1*time)*2),0.1)
.modulate(o0)
.out()