Skip to content

Instantly share code, notes, and snippets.

(
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 / 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|

/**
* @author Tadashi Usami
*/
//package oschub;
import java.io.*;
import java.net.*;
import java.util.*;
import de.sciss.net.*;
@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

@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 / tidal.md
Last active December 5, 2016 10:57
setting up tidal
@lisongx
lisongx / whosdead.sparql
Last active December 5, 2017 02:25
who's dead?
SELECT ?entity ?entityLabel (YEAR(?date) as ?year)
WHERE
{
BIND(MONTH(NOW()) AS ?nowMonth)
BIND(DAY(NOW()) AS ?nowDay)
?entity wdt:P106+ wd:Q639669 .
?entity wdt:P570 ?date .
FILTER (MONTH(?date) = ?nowMonth && DAY(?date) = ?nowDay)
SERVICE wikibase:label {
This file has been truncated, but you can view the full file.
[{"label":"State 0","isSelected":true,"tSNEIteration":584,"tSNEPerplexity":25,"tSNELearningRate":1,"tSNEis3d":false,"pcaComponentDimensions":[0,1,2],"projections":[{"pca-0":-0.3286186754703522,"pca-1":-0.3226933777332306,"pca-2":0.2523862421512604,"pca-3":0.02910321019589901,"pca-4":-0.6257769465446472,"pca-5":0.03413614258170128,"pca-6":0.1760411560535431,"pca-7":0.2884944677352905,"pca-8":-0.3765479028224945,"pca-9":0.07684367895126343,"tsne-0":-1.323298418354418,"tsne-1":2.542111743623574},{"pca-0":-0.18422026932239532,"pca-1":-0.004802474286407232,"pca-2":0.3955268859863281,"pca-3":0.22427526116371155,"pca-4":-0.25748252868652344,"pca-5":-0.06897246092557907,"pca-6":-0.1689326912164688,"pca-7":-0.10199112445116043,"pca-8":-0.6023048162460327,"pca-9":-0.05952564626932144,"tsne-0":16.607514290482822,"tsne-1":-7.485953571444753},{"pca-0":-0.09110171347856522,"pca-1":-0.1458868682384491,"pca-2":-0.3053620755672455,"pca-3":-0.11439351737499237,"pca-4":0.1027631089091301,"pca-5":0.05345134064555168,"pca-6":0.02
SELECT ?item ?cLabel ?itemLabel ?fatherLabel ?motherLabel
WHERE
{
?item wdt:P31 wd:Q5.
?item wdt:P27 ?c.
?item wdt:P22 ?father.
?item wdt:P25 ?mother.
?item wdt:P106 wd:Q2526255.
?father wdt:P106 wd:Q2526255.
?mother wdt:P106 wd:Q2526255.