Skip to content

Instantly share code, notes, and snippets.

View xavriley's full-sized avatar

Xavier Riley xavriley

View GitHub Profile
Routine {
s = Server.default;
s.waitForBoot;
// max buffer duration
~dur = 8.0;
// 4-channel buffer: pitch, clar, amp, flatness
~buf = Buffer.alloc(s, s.sampleRate * ~dur, 4);
@neanias
neanias / fresh_setup
Last active February 26, 2024 17:11
[UNMAINTAINED] Portable neovim setup
#!/bin/bash
cd ~
echo "Linking .nvimrc into home directory (~)"
if [ -z "$XDG_CONFIG_HOME" ]; then
export XDG_CONFIG_HOME=~/.config
fi
if [ ! -d $XDG_CONFIG_HOME/nvim ]; then
echo "Creating $XDG_CONFIG_HOME/nvim..."
@philandstuff
philandstuff / clojurex-2014.org
Last active June 30, 2017 21:39
Clojure eXchange 2014

Korny Sietsma, Pragmatic Performance Testing

quotes

  • “we don’t care about perf”
  • “clojure should be fast”
  • “we’re using mongo!”
  • “clojure might not be fast enough, we should use type hints”

JMeter

@rjbriody
rjbriody / sigma.plugins.community.js
Last active August 29, 2015 14:04
Hacked POC for sigma community plugin using https://github.com/upphiminn/jLouvain
var jLouvain = function () {
//Constants
var __PASS_MAX = -1
var __MIN = 0.0000001
//Local vars
var original_graph_nodes;
var original_graph_edges;
var original_graph = {};
var partition_init;
@caged
caged / scale.rb
Created November 22, 2012 04:04
Linear scale interpolation in Ruby based on d3.js's implementation
# Returns a lambda used to determine what number is at t in the range of a and b
#
# interpolate_number(0, 500).call(0.5) # 250
# interpolate_number(0, 500).call(1) # 500
#
def interpolate_number(a, b)
a = a.to_f
b = b.to_f
b -= a
lambda { |t| a + b * t }