Skip to content

Instantly share code, notes, and snippets.

View hoverbird's full-sized avatar
💭
Neo Cab is out now on Apple Arcade, Steam and Nintendo Switch!

Phenry Ewing hoverbird

💭
Neo Cab is out now on Apple Arcade, Steam and Nintendo Switch!
View GitHub Profile
Xcode
http://developer.apple.com/technology/xcode.html
[OR]
Mac OS X install disc 2
GNU wget
http://ftp.gnu.org/gnu/wget/wget-latest.tar.gz
Git
http://code.google.com/p/git-osx-installer/
# Back up your iTunes library to S3
git clone git://github.com/sstephenson/mackerel.git
ruby -rubygems mackerel/examples/itunes_backup.rb amazon-s3://YOUR_ACCESS_KEY_ID:[email protected]/YOUR_BUCKET_NAME/itunes.mackerel
class Hash
def keeping(keys = [])
raise 'Please specify at least one key!' if keys.empty?
strkeys = keys.collect {|k| k.to_s}
self.clone.delete_if {|k,v| !strkeys.include?(k.to_s)}
end
end
# Tests!
h = {:kyle => 'Bragger', :patrick => 'Ewing'}
class Hash
def keeping(keys = [])
raise 'Please specify at least one key!' if keys.empty?
strkeys = keys.collect {|k| k.to_s}
self.clone.delete_if {|k,v| !strkeys.include?(k.to_s)}
end
end
# Tests!
h = {:kyle => 'Bragger', :patrick => 'Ewing'}
@hoverbird
hoverbird / argh.rb
Created July 17, 2011 14:28 — forked from robinsloan/argh.rb
Arghhhh
# 4<w<8, 1<y<10, x and z are 6-sided dice.
HOW_MANY = 100000
def range_rand(min,max)
min + rand(max-min)
end
def test_it
w = range_rand(4,8)
@hoverbird
hoverbird / metakoans.rb
Created July 20, 2011 04:07 — forked from Vaysman/metakoans.rb
Matakoans by ara.t.howard
#
# metakoans.rb is an arduous set of exercises designed to stretch
# meta-programming muscle. the focus is on a single method 'attribute' which
# behaves much like the built-in 'attr', but whose properties require delving
# deep into the depths of meta-ruby. usage of the 'attribute' method follows
# the general form of
#
# class C
# attribute 'a'
# end

guys, dudes, bros

I think you mean team...

I think you mean squad..

I think you mean gang...

I think you mean pals...

@hoverbird
hoverbird / SavWav.cs
Created May 9, 2016 05:29 — forked from darktable/SavWav.cs
Unity3D: script to save an AudioClip as a .wav file.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
@hoverbird
hoverbird / CopyAssetPathContextMenu.cs
Created November 9, 2016 17:12 — forked from HilariousCow/CopyAssetPathContextMenu.cs
Unity3d utility thing. Right Click an asset-> Copy Asset Path. - ideal for use with AssetDatabase.LoadAssetAtPath<>
using UnityEngine;
using UnityEditor;
public static class CopyAssetPathContextMenu
{
[MenuItem("Assets/Copy Asset Path")]
public static void CopyAssetPath()
{
@hoverbird
hoverbird / Fps.cs
Created July 25, 2019 05:00 — forked from mstevenson/Fps.cs
An accurate FPS counter for Unity. Works in builds.
using UnityEngine;
using System.Collections;
public class Fps : MonoBehaviour {
string label = "";
float count;
IEnumerator Start ()
{