Skip to content

Instantly share code, notes, and snippets.

View sleexyz's full-sized avatar

Sean Lee sleexyz

View GitHub Profile
@sleexyz
sleexyz / default.nix
Created September 8, 2016 20:42
ngrok fhsuserenv
with import <nixpkgs> {}:
let fhs = pkgs.buildFHSUserEnv {
name = "ngrok-env";
targetPkgs = pkgs: with pkgs;
[ glibc
];
};
in pkgs.stdenv.mkDerivation {
name = "ngrok";
buildInputs = [
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ViewPatterns #-}
module Jam_2016_10_05 where
-- tempo sync
import Hylogen.WithHylide
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ViewPatterns #-}
module Jam_2016_10_05 where
-- tempo sync
import Hylogen.WithHylide
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
module Jam_2016_10_10 where
import Util
output = toProgram (remix rgba uvN)
{-# LANGUAGE GADTs #-}
module Jam_2016_10_29 where
import Util
output = toProgram $ vec4 (v, v, v, 1)
& over (webcamF (texture2D channel2) uvN)
& mix 0.1 (bbF (texture2D backBuffer) uvN)
{-# LANGUAGE GADTs #-}
module Jam_2016_10_29 where
import Util
output = toProgram $ (bbF (texture2D channel2) uvN)
bbF x = x
& lmap (view norm)
{-# LANGUAGE GADTs #-}
module Jam_2016_10_29 where
import Util
output = toProgram $ vec4 (v, v, v, 1)
& (+(bbF (texture2D backBuffer) uvN * copy osc7))
bbF x = x
& lmap (view norm)
& lmap (*0.99)
#!/usr/bin/env bash
# example:
#
# > ./together "foo" "bar" "baz"
#
# runs foo, bar, baz as child processes
# ctrl-c will kill all
PID="$$"
@sleexyz
sleexyz / vis.hs
Last active November 20, 2016 01:05
visualize bytebeat
{-# LANGUAGE BangPatterns #-}
-- | Visualize bytebeat. currently doesn't print fast enough...
module Main where
import Control.Monad
import Data.Bits
import qualified Data.Char as C
import Data.List
import System.IO
import System.Environment
@sleexyz
sleexyz / vis.go
Created November 20, 2016 03:51
bytebeat visualization... too slow...
package main
import "os"
import "bufio"
func main() {
filename := os.Args[1]
audioFile, err := os.OpenFile(filename, os.O_APPEND|os.O_WRONLY, 0600)