Skip to content

Instantly share code, notes, and snippets.

wvengen wvengen

  • Amsterdam, NL
Block or report user

Report or block wvengen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wvengen
wvengen / README.md
Last active May 21, 2019
Ruby memory analysis over time
View README.md

Finding a Ruby memory leak using a time analysis

When developing a program in Ruby, you may sometimes encounter a memory leak. For a while now, Ruby has a facility to gather information about what objects are laying around: ObjectSpace.

There are several approaches one can take to debug a leak. This discusses a time-based approach, where a full memory dump is generated every, say, 5 minutes, during a time that the memory leak is showing up. Afterwards, one can look at all the objects, and find out which ones are staying around, causing the

@wvengen
wvengen / README.md
Last active Oct 5, 2015
Running a VST with Carla in a VM using netjack
View README.md

Testing Carla's VST bridge in a VM with netjack

Install Ubuntu Server 15.04 in VirtualBox and enable OpenSSH. Then:

sudo apt-get install -yy apt-transport-https software-properties-common wget
wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_9.2.0~kxstudio1_all.deb
sudo dpkg -i kxstudio-*.deb
sudo apt-get update
@wvengen
wvengen / README.md
Last active Nov 10, 2018
d3.chart.sankey (interactive demo)
View README.md
@wvengen
wvengen / README.md
Last active Jan 19, 2017
d3.chart.sankey (energy demo)
View README.md
@wvengen
wvengen / README.md
Last active Nov 15, 2018
d3.chart.sankey (product demo)
View README.md

d3.chart.sankey: Reusable D3 Sankey diagram using d3.Chart.

This diagram shows how the ingredients may contribute to the total sustainability of a chocolate bar through different issues.

@wvengen
wvengen / select2-freeform.png
Last active Dec 23, 2015
Form input to choose from existing values, while allowing to add new ones (based on select2).
@wvengen
wvengen / genbooks.rb
Last active Aug 29, 2015
HTML Book matrix generator
View genbooks.rb
#!/usr/bin/env ruby
#
# Basic script to retrieve book metadata.
#
# Usage: genbooks.rb <isbn> [<isbn> [...]] >books.json
# Outputs json file with book metadata, for use as input to genpage.rb
#
# TODO
# - add bol.com
# - add amazon.com books
@wvengen
wvengen / create_artifact_bundle_for_maven_central.sh
Last active Aug 29, 2015
Create artifact bundle for Maven Central upload
View create_artifact_bundle_for_maven_central.sh
#!/bin/sh
#
# I found the instructions for setting up Maven Central upload in pom.xml too involved.
# This does the job as well, though it requires manually uploading it in Maven Central's
# web interface as an artifact bundle.
#
# Usage:
# 1. Make sure your project is ready and the release version checked out
# 2. Change GPGKEY to point to your key in this script
# 3. Run this script in the directory containing pom.xml
@wvengen
wvengen / install_scrapyd.sh
Last active May 31, 2019
Installation script for scrapyd
View install_scrapyd.sh
#
# Installation script for scrapyd on Debian/Ubuntu
# http://scrapyd.readthedocs.org/
#
# - Latest scrapyd from Scrapy package repository
# - Password protection with http basic auth
# - HTTPS with self-signed certificate
# - Works on Amazon EC2
#
FQDN=scrapy.example.com
@wvengen
wvengen / delegate_assign.rb
Created Jan 7, 2015
Active Record mixin to also delegate setters
View delegate_assign.rb
# Also delegate setters with Rails.
#
# If you find yourself wanting to use this, please look at nested attributes first.
# http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html
# When that doesn't fit, you may consider the approach shown here.
#
# Example:
#
# class User < ActiveRecord::Base
# include DelegateAssign
You can’t perform that action at this time.