Skip to content

Instantly share code, notes, and snippets.

@mcoms
mcoms / wishlist.md
Last active December 10, 2015 21:28
This is a list of random junk which I'm looking for, for various projects.

Wishlist

This is a list of random junk which I'm looking for, for various projects. In the spirit of http://uk.freecycle.org/, I like to recycle things where I can. I also have a box of odds and ends, so if you're looking for something electrical or mechanical, let me know as I might have it :)

  • Fire extinguisher/air tank
    • Doesn't have to work, but should be airtight
      • Ideally not a CO2 extinguisher
      • To be used as a 100psi air compression chamber
  • Arc welder/welding supplies
    • For welding steel, etc.
@mcoms
mcoms / Dockerfile
Created October 20, 2015 12:56
Elixir Dockerfile (en_GB.UTF-8)
FROM debian:latest
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq wget locales
RUN dpkg-reconfigure locales && \
locale-gen C.UTF-8 && \
/usr/sbin/update-locale LANG=C.UTF-8
RUN echo 'en_GB.UTF-8 UTF-8' >> /etc/locale.gen && \
locale-gen
ENV LC_ALL C.UTF-8
@mcoms
mcoms / ntwbfswtf.rb
Created December 14, 2012 19:49
Quick script to use WIT (http://wit.wiimm.de/) to move Wii (WBFS) backup files to a standard directory structure. Works with standard .wbfs files on a FAT/NTFS filesystem, for example.
require 'fileutils'
# Set the directory containing your backup files (they can be in sub-directories of this path)
f = Dir.glob './**/*.wbfs'
f.each do |n|
x = `wwt LIST \"#{n}\"`
if $?.success?
# WBFS containers can have multiple games in them. Here, we select just the first one for naming.
# Nearly always, you will have only backed up a single game per container anyway.
(id, name) = x.split("\n")[3].split(/\s{2,}/)
if id && name
@mcoms
mcoms / Gemfile
Created November 8, 2012 00:21
WiringPi PWM Test
source 'https://rubygems.org'
gem 'wiringpi'
@mcoms
mcoms / boot-sonic-pi.sh
Created May 28, 2015 21:55
MPR121 Fruit Piano (Pi-only version)
#!/bin/bash
eval $(dbus-launch --auto-syntax)
/opt/sonic-pi/app/server/bin/sonic-pi-server.rb

Keybase proof

I hereby claim:

  • I am mcoms on github.
  • I am mcoms (https://keybase.io/mcoms) on keybase.
  • I have a public key whose fingerprint is 7A08 89B7 BD6A 2DF7 4716 2FBD 8F2D 8965 5AF4 E06A

To claim this, I am signing this object:

@mcoms
mcoms / helper.rb
Last active August 29, 2015 14:11
Morse code bitstream
def bitstream_to_text(bitstream)
bitstream.join.gsub('111', '-').gsub('1', '.').gsub('0',' ')
end
@mcoms
mcoms / Gemfile
Last active August 29, 2015 14:05
How many combinations of 2 grand piano keys are there?
source 'https://rubygems.org'
gem 'midilib', '~> 2.0.4'
@mcoms
mcoms / ubuntu-minimal-installer.ipxe
Last active August 29, 2015 13:56 — forked from robinsmidsrod/ubuntu-amd64-installer.ipxe
Install Ubuntu 12.04 minimal, i386, non-pae
#!ipxe
dhcp
echo Starting Ubuntu 12.04 i386, non-pae installer for ${hostname}
set base-url http://archive.ubuntu.com/ubuntu/dists/precise-updates/main/installer-i386/current/images/netboot/non-pae/ubuntu-installer/i386
kernel ${base-url}/linux
initrd ${base-url}/initrd.gz
boot ||
# If everything failed, give the user some options
echo Boot from ${base-url} failed
prompt --key 0x197e --timeout 2000 Press F12 to investigate || exit
@mcoms
mcoms / Dockerfile
Created February 24, 2014 22:34
Wemux demonstration container
# Wemux demonstration container
# =============================
# docker build -t wemux .
# docker run -t -i -d -p 2255:22 wemux
#
# ssh -p 2255 root@<host>
# root : screencast
# ssh -p 2255 user@<host>
# user : password
#