Skip to content

Instantly share code, notes, and snippets.

View juliancheal's full-sized avatar

Julian Cheal juliancheal

View GitHub Profile
@juliancheal
juliancheal / user-data-wifi.yml
Created March 15, 2019 15:10 — forked from DieterReuter/user-data-wifi.yml
HypriotOS cloud-init configuration for RPi3 WiFi Client
#cloud-config
# vim: syntax=yaml
#
# The current version of cloud-init in the Hypriot rpi-64 is 0.7.9
# When dealing with cloud-init, it is SUPER important to know the version
# I have wasted many hours creating servers to find out the module I was trying to use wasn't in the cloud-init version I had
# Documentation: http://cloudinit.readthedocs.io/en/0.7.9/index.html
# Set your hostname here, the manage_etc_hosts will update the hosts file entries as well
@juliancheal
juliancheal / A Hypriot K8S install.md
Created January 3, 2019 22:24 — forked from elafargue/A Hypriot K8S install.md
K8s (v1.10.5) on Hypriot (July 2018)
@juliancheal
juliancheal / sonoff.rb
Created August 30, 2018 13:26 — forked from krtschmr/sonoff.rb
controll a sonoff-tasmota device via ruby
# Free to use. if you modify it, pls let me know, i might need your code aswell :-)
# github: krtschmr
# tim@krtschmr.de
# USAGE
# Straightforward
# Sonoff.on!("192.168.1.53")
# Sonoff.off!("192.168.1.53")
@juliancheal
juliancheal / LoadConfig.rb
Created November 1, 2017 22:19 — forked from guyhughes/LoadConfig.rb
Ruby: Load the best available config file using ::YAML, of course
require 'thor'
class_option :config, :type => :string, :aliases => "-c", :desc => "Use an alternative YAML config file."
def initialize(*args)
super
config_files = Array.new
config_files.push(options[:config]) if options[:config]
config_files.push("#{ENV['XDG_CONFIG_HOME']}/awesomeness/awesomeness.yaml") if ENV['XDG_CONFIG_HOME']
config_files.push("#{ENV['HOME'] || '~'}/.config/awesomeness.yaml")
@juliancheal
juliancheal / extract_ovirt.sh
Created May 9, 2017 18:30 — forked from durandom/extract_ovirt.sh
extract a provider
#!/usr/bin/env bash
~/src/scratch/manageiq/extract_provider_gem.sh \
-n ovirt \
-d "app/models/manageiq/providers/redhat spec/models/manageiq/providers/redhat spec/vcr_cassettes/manageiq/providers/redhat" \
-l \
-e ~/src/manageiq \
-r \
-g ~/src/manageiq \
-p durandom \
@juliancheal
juliancheal / README.md
Created March 13, 2016 23:28 — forked from xavriley/README.md
Original NES Mario Theme for Sonic Pi

Making Chiptune Music using Sonic Pi v2.0

Warning: this might not work on a RaspberryPi yet

I was curious about making retro gaming sounds using Sonic Pi. A couple of months and a lot of Googling later, here's the original Mario Bros theme as it was heard on the NES console.

I'm (just about) old enough to remember rushing home from school to play this game at Philip Boucher's house, sitting cross-legged in front of the TV till my feet got pins and needles. Working out how to recreate it for Sonic Pi was a lot of fun!

Getting the sounds of the NES chip

@juliancheal
juliancheal / ruby-ldap-sample.rb
Last active August 29, 2015 14:26 — forked from jeffjohnson9046/ruby-ldap-sample.rb
Some VERY basic LDAP interaction in Ruby using Net::LDAP.
#######################################################################################################################
# This Gist is some crib notes/tests/practice/whatever for talking to Active Directory via LDAP. The (surprisingly
# helpful) documentation for Net::LDAP can be found here: http://net-ldap.rubyforge.org/Net/LDAP.html
#######################################################################################################################
require 'rubygems'
require 'net/ldap'
#######################################################################################################################
# HELPER/UTILITY METHOD
@juliancheal
juliancheal / gist:1846007
Created February 16, 2012 16:02 — forked from jacksonj04/gist:1845849
HTML Limerick cos I'm cool
var limerick = (function() {
return "Y U NO RUBY"
})();