Skip to content

Instantly share code, notes, and snippets.

View yozlet's full-sized avatar

Yoz Grahame yozlet

View GitHub Profile
@yozlet
yozlet / gist:2093630a8203517f94b7ddc28f31a33a
Last active October 23, 2025 18:51
Yoz's Winamp talk at Noisebridge's "5 Minutes Of Fame", 2012

YOZ NOTES FROM 2025: I gave this talk at Noisebridge's semi-regular "5 Minutes Of Fame" event on 11 November 2012. (It took me more like ten minutes, but pretty much everyone else overran too.) I gave a longer version of this talk at Notacon 10 in Cleveland, Ohio a year later; you can watch the video online but unfortunately the audio cuts out around the 6 minute mark: https://archive.org/details/NotAConArchiveInfocon/notacon+10+-+2013/Video/Notacon+10+-+Track+2+Talk+13+-+The+Winamp+Imperative+-+Yoz.mp4

You can grab the slides for this talk (10MB PPTX file) here: https://u.pcloud.link/publink/show?code=XZRBh95ZAHRd8NerGxuhDsjmnttePS1l9KDy

This is about Winamp, a 15-year-old music player that I've been obsessed with for a long, long time, even though I haven't really been able to use it since I switched to the Mac six years ago. Since the arrival of MP3, Winamp is the one app that's reflected, better than any other, the changing power structure of music. And it single-handedly kickstarted its own ge

@yozlet
yozlet / flagged-feature.java
Created December 2, 2019 20:17
Sample code from LaunchDarkly "Black Friday" blog post
public List<Comment> getProductComments(Product product) {
// The app contains its own singleton service to hold one instance
// of the LaunchDarkly client.
ldClient = LaunchDarklyService.getClient();
ldUser = LaunchDarklyService.getUserFromContext(context);
boolean showFeature = ldClient.boolVariation("show-comments", user, false);
// If the feature is turned off, just return an empty list of comments
If (!showFeature) {
return Collections.emptyList();
}

This is me testing TIL.

It wants me to explain!

    employee_id = fields.Field(
        attribute="employee",
        column_name="employee_id",
        widget=ForeignKeyWidget(Employee, field='employee_id')
    )
@yozlet
yozlet / gist:09ceafd45a17c252916491f0d764b8c3
Last active May 30, 2018 19:56
Jest --project bugs. Both commands specify a config file, but the second one also specifies project names. Note the missing `globalConfig.projects` object.
MacBook-Pro-2:peops yoz$ npx jest --config=jest-pytest.json --listTests --debug
{
"configs": [
{
"automock": false,
"browser": false,
"cache": true,
"cacheDirectory": "/var/folders/2d/nvqrl0yj67n7dztl2j609_v80000gn/T/jest_dx",
"clearMocks": false,
"coveragePathIgnorePatterns": [
@yozlet
yozlet / admin_controller.rb
Created April 27, 2015 17:59
JSON admin refactor
require 'csv'
class AdminController < ApplicationController
layout 'dashboard'
before_filter :require_admin!
def index
@applications = Doorkeeper::Application.includes(:authorizations)
@yozlet
yozlet / keybase.md
Created June 7, 2014 04:27
keybase verification

Keybase proof

I hereby claim:

  • I am yozlet on github.
  • I am yoz (https://keybase.io/yoz) on keybase.
  • I have a public key whose fingerprint is 3156 EEAA FBEA CE69 B3D7 84AA CF57 D7FA 5B9E B6B1

To claim this, I am signing this object:

@yozlet
yozlet / gist:958071
Created May 5, 2011 22:05
Error when trying to run Persevere with node 0.4.2
yoz@pdp35:~/node/persevere$ bin/node-persvr example/
example/
(node) process.compile should not be used. Use require('vm').runInThisContext instead.
Downloading http://github.com/miksago/node-websocket-server/zipball/v1.4.01
Downloading https://github.com/miksago/node-websocket-server/zipball/v1.4.01
node.js:116
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Error: 400
@yozlet
yozlet / sandbox.js
Created March 18, 2011 05:52
Creation of a limited sandbox in node.js 0.2.x
/**
* sandbox.js - create a single sandbox object with exposed functions and services
*
* by [email protected]
*
*
**/
// Started doing this with proper constructors and stuff. Javascript Patterns
// book has a good Sandbox pattern. However, didn't have time to do that