Skip to content

Instantly share code, notes, and snippets.

@lisongx
lisongx / tidal.md
Last active December 5, 2016 10:57
setting up tidal
@lisongx
lisongx / buffer.md
Last active October 31, 2016 15:12
buffer piece

New piece on Buffer

For two players on OSCRadio

Utils

(
var idRangeStart = 10000, idRangeEnd = 14000;
@lisongx
lisongx / how-to-set-up-stress-free-ssl-on-os-x.md
Created September 6, 2016 10:32 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

/**
* @author Tadashi Usami
*/
//package oschub;
import java.io.*;
import java.net.*;
import java.util.*;
import de.sciss.net.*;
@lisongx
lisongx / sine_comp.scd
Last active March 1, 2016 12:53
Network piece: Sinusoidal Computation

Syntdef

Each one has two synthdef:

Tadashi: \sin1, \sin2
Sean: \sin3, \sin4
Chris: \sin5, \sin6
Liew: \sin7, \sin8

The Synthdef has the folling signature: SynthDef(\sinx, {|out=0, freq=50, amp=0.3, pan=0, dur=20|

(
SynthDef(\sin_sean1, {|out=0, gate=1, freq=50, amp=0.3, osc1=2.5, osc2=10, range1=1, range2=10|
var sig,env;
range1 = range1.lag(5);
range2 = range2.lag(5);
freq = freq.lag(5);
sig = SinOsc.ar(
[SinOsc.kr(osc1.lag(0.5)).range(-1*range1, range1) +freq , SinOsc.kr(osc2.lag(0.5)).range(-1*range2, range2) + freq]
);
@lisongx
lisongx / aa.md
Last active January 4, 2016 14:19
  1. In a terminal navigate to your userAppSupportDir resp. the directory containing the sources of your quarks.

    • On a mac:

      {% highlight bash %} $ cd ~/Library/Application\Support/SuperCollider/quarks {% endhighlight %}

    • On Linux:

@lisongx
lisongx / gist:8240693
Created January 3, 2014 16:19
build errro
compile done
resolve: Host not found (authoritative)
ERROR: Non Boolean in test.
RECEIVER:
class NetAddr (0x116231fc0) {
instance variables [19]
name : Symbol 'NetAddr'
nextclass : instance of Meta_Nil (0x1109c84c0, size=19, set=5)
superclass : Symbol 'Object'
@lisongx
lisongx / gist:7001310
Created October 16, 2013 01:31
tunnelblick
2013-10-16 09:30:24 *Tunnelblick: OS X 10.8.5; Tunnelblick 3.4beta10 (build 3614)
2013-10-16 09:30:25 *Tunnelblick: Attempting connection with douban using shadow copy; Set nameserver = 9; not monitoring connection
2013-10-16 09:30:25 *Tunnelblick: openvpnstart start douban.tblk 1337 9 0 1 1 305 -ptADGNWradsgnw 2.2.1
2013-10-16 09:30:25 *Tunnelblick: openvpnstart log:
Loading tun.kext
OpenVPN started successfully. Command used to start OpenVPN (one argument per displayed line):
/Applications/Tunnelblick.app/Contents/Resources/openvpn/openvpn-2.2.1/openvpn
--cd
[sean@xdlinux rubygems]$ sudo pacman -S zsh
Password:
resolving dependencies...
looking for inter-conflicts...
Targets (1): zsh-4.3.17-2
Total Download Size: 1.53 MiB
Total Installed Size: 6.72 MiB