Skip to content

Instantly share code, notes, and snippets.

View adammw's full-sized avatar
👨‍💻
Hacking on Kubernetes Platform @ Zendesk

Adam Malcontenti-Wilson adammw

👨‍💻
Hacking on Kubernetes Platform @ Zendesk
View GitHub Profile
(function(root, factory) {
if(typeof define === 'function' && define.amd) {
define([], factory);
} else {
root.forge = factory();
}
})(this, function() {
/**
* @license almond 0.2.9 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
@adammw
adammw / main.swift
Created July 17, 2020 22:55
App to map next track button to input mute toggle
//
// main.swift
// mediakeymute
//
// Created by Adam Malcontenti-Wilson on 16/6/20.
// Copyright © 2020 Adam Malcontenti-Wilson.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
@adammw
adammw / download.js
Created November 27, 2011 14:29
SoundCloud CLI Downloader
/*
* CLI Tool to download streamable songs from SoundCloud API
* Requires Node.js, Flow-JS and cli libraries
*/
var cli = require('cli').enable('status'),
fs = require('fs'),
flow = require('flow'),
path = require('path'),
SC = require('./node-soundcloud.js');
@adammw
adammw / README.md
Created August 3, 2012 06:30
Node.js for Raspberry Pi

Node.js for Raspberry Pi

Pre-built binaries

Recent releases have been pre-built using cross-compilers and this script and are downloadable below.

If you have found these packages useful, give me a shout out on twitter: @adammw

// how_much_netflix.js
// A script that looks through your Netflix viewing activity and
// tallys up how much time you've spent watching Netflix
//
// INSTRUCTIONS TO USE:
// Open https://www.netflix.com/WiViewingActivity and the developer console
// Copy and paste this script into the developer console and press enter
//
(function() {
var fetchAllViewedItems = function() {
@adammw
adammw / socks.js
Created February 14, 2012 16:21
Socks library snippet for Node.js
var net = require('net'),
util = require('util'),
EventEmitter = require('events').EventEmitter;
var SOCKSClient = module.exports = function() {
var args = normalizeConnectArgs(arguments);
this.state = 'connecting';
this.socket = net.connect(args[0].port, args[0].host, onConnect.bind(this));
this.socket.on('data', onData.bind(this));
this.socket.on('end', onEnd.bind(this));
@adammw
adammw / gist:5605103
Created May 18, 2013 16:54
Spotify AP list
{"ap_list": ["accalia.ash.spotify.com:4070", "neeharika.ash.spotify.com:443", "bernadine.ash.spotify.com:80", "tathra.ash.spotify.com:4070", "frankie.ash.spotify.com:443", "clementine.ash.spotify.com:80", "nediva.ash.spotify.com:4070", "consuelo.ash.spotify.com:443", "gladys.ash.spotify.com:80", "cordelia.ash.spotify.com:4070", "kenyatta.ash.spotify.com:443", "debbie.ash.spotify.com:80", "laurinda.ash.spotify.com:4070", "alma.ash.spotify.com:443", "ainara.ash.spotify.com:80", "dayana.ash.spotify.com:4070", "stacia.ash.spotify.com:443", "rosevear.ash.spotify.com:80", "gypsy.ash.spotify.com:4070", "bhavya.ash.spotify.com:443", "bronnen.ash.spotify.com:80", "felice.ash.spotify.com:4070", "bracha.ash.spotify.com:443", "cauvery.ash.spotify.com:80", "cyrena.ash.spotify.com:4070"]}
require 'aws-sdk-kinesis'
require 'fluent/output'
require 'fluent/test'
require 'fluent/test/driver/output'
require 'fluent/plugin/kinesis'
require 'fluent/plugin/kinesis_helper/aggregator'
require 'fluent/plugin/kinesis_helper/api'
require 'fluent/plugin/kinesis_helper/client'
require 'pry'
@adammw
adammw / libvlc.js
Created May 9, 2012 14:06
Object-orientated libVLC bindings for node.js implemented in javascript using node-ffi. Superseded by https://github.com/adammw/node-vlc-ffi
/*
* node-ffi-vlc v0.0.2
* Object-orientated libVLC bindings for node.js implemented in javascript using node-ffi
* Not for production use, use at your own risk, do with what you will.
* See libvlc docs for more info, http://www.videolan.org/developers/vlc/doc/doxygen/html/group__libvlc.html
*/
var EventEmitter = require('events').EventEmitter,
FFI = require("node-ffi");
var libVLC = new FFI.Library("libvlc", {