Skip to content

Instantly share code, notes, and snippets.

View milesegan's full-sized avatar
💭
/╲/\╭(ఠఠ益ఠఠ)╮/\╱\

Miles Egan milesegan

💭
/╲/\╭(ఠఠ益ఠఠ)╮/\╱\
View GitHub Profile
@milesegan
milesegan / ExportUI.jsf
Created August 20, 2011 06:22
fireworks scripts for VST development
// -*- javascript -*-
// Install this in your FireWorks extensions directory.
// It exports all elements with a targetText attribute. It also expects that the elements to
// export are instances of a symbol type.
//
// For instance, create a symbol of type "knob", and place several instances of it on your
// UI with targetText attributes pointing to the string name of the parameter that knob controls.
//
var outURL = "/Users/miles/tmp/layout.txt";
@milesegan
milesegan / make_resources.py
Created March 22, 2012 01:13
python retina display resources helper script
#!/usr/bin/env python
#
# Simple script that uses PIL to automatically generate both 1x and 2x resolution
# PNGs from a source directory of 2x files. Handy for iPhone/iPad retina assets.
#
import glob
i
@milesegan
milesegan / 2013_top_ten
Last active December 31, 2015 16:58
top albums of 2013
In no particular order:
* Toro Y Moi - Anything In Return
Brilliant electronic pop/soul record with some very strong songwriting.
* Humble Bee - Henrietta
Sublime ambient hypnosis, for once not only availble in ultra-limited CD run.
* Autechre - Exai
Autechre finally makes the masterpiece they've been orbiting for the last half-decade.
@milesegan
milesegan / gist:9479254
Created March 11, 2014 03:56
vst startup hook
VST_EXPORT AEffect* VSTPluginMain (audioMasterCallback audioMaster)
{
if (!audioMaster(0, audioMasterVersion, 0, 0, 0, 0)) return 0;
AudioEffect* effect = new MyVST(audioMaster);
effect->init(); // <--- implement your own init() method that configures the vst
return effect->getAeffect ();
}

Keybase proof

I hereby claim:

  • I am milesegan on github.
  • I am milesegan (https://keybase.io/milesegan) on keybase.
  • I have a public key whose fingerprint is EB64 08AA C13C 564A 04B3 2524 1D17 ED3F BFCE 581A

To claim this, I am signing this object:

woob - ambient disaster movie
deru - 1979
ssalvia - pantani
lord skywave - cardamon copy
clap clap clap! - tayi bebba
mono/poly - golden skies
east india youth - total strife forever
ital tek - mega city industry
downliners sekt - silent ascent
taylor mcferrin - early riser
@milesegan
milesegan / update_asset_catalog
Created February 13, 2015 07:58
put image assets into correct folder in asset catalog
#!/usr/bin/env ruby
def usage
puts "usage: update_asset_catalog path_to_asset_catalog"
exit(1)
end
def main
if ARGV.length < 1
usage
extension Optional {
public func flatCall(@noescape f: (Wrapped) throws -> Void) rethrows -> Void {
switch self {
case .Some(let wrapped):
try f(wrapped)
case .None:
break
}
}
}
// Adapted from http://blog.helftone.com/demystifying-inner-shadows-in-quartz/
import UIKit
class InnerShadowView: UIView {
var blurRadius = CGFloat(3) {
didSet { setNeedsDisplay() }
}
var offset = CGSize(width: 0, height: 2) {
didSet { setNeedsDisplay() }