Skip to content

Instantly share code, notes, and snippets.

View micahbrich's full-sized avatar

Micah Rich micahbrich

View GitHub Profile
@seanlilmateus
seanlilmateus / evernote.rb
Last active January 25, 2016 19:24
ScriptingBridge with MacRuby or Rubymotion
#!/Library/RubyMotion/bin/ruby -wKUW0
# if your using MacRuby you might change this to
# => #!/usr/bin/env macruby -wKUW0
framework 'Foundation'
framework 'ScriptingBridge'
# the original is part of an arstechnica article by Ryan
# SOURCE: http://arstechnica.com/apple/2011/09/tutorial-os-x-automation-with-macruby-and-the-scripting-bridge/
# this script with get your favourite songs and create a Evernote Note # German and English
@duncansmart
duncansmart / progressive-ace.htm
Created March 28, 2013 23:29
Integrating ACE Editor in a progressive way
<textarea name="my-xml-editor" data-editor="xml" rows="15"></textarea>
...
<textarea name="my-markdown-editor" data-editor="markdown" rows="15"></textarea>
...
<script src="//d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js"></script>
<script>
// Hook up ACE editor to all textareas with data-editor attribute
$(function () {
@kamiller
kamiller / belkin_n300_router_tomato_setup.md
Created February 21, 2013 23:44
Belkin n300 share router tomato USB flash instructions

TomatoUSB Setup Guide

So, about those instructions. An important thing to know is that the model number of this router is F7D7302, which is just a newer version of the F7D3302. So when you're searching for firmware that's the model you want to use. Now, I've spent some time doing research to get this working with TomatoUSB and finally came with a pretty simple solution. I've noticed a lot of guides want you to install DD-WRT first, which is completely unnecessary.

The best version for this unit right now is the TomatoUSB builds from Toastman. While this may appear to be a lot of steps, it's really not all that complicated.

You're going to want two files for this procedure. Google "tomato toastman 4shared" to find the repository (it's hosted on a download site called 4shared). You'll be looking for the latest version in the RT (MIPSR2) folder (each version will be split into VLAN and STD versions, you'll want the STD one). Inside of that folder will be a bunch of .bin and .trx files. You'll want the .

@davelab6
davelab6 / INSTALL-ttfautohint.md
Last active July 26, 2017 05:33
How to install TTFAutohint 0.92

With HomeBrew

If you have Homebrew and are comfortable with it, you can run

brew edit ttfautohint;

and then replace the file with this one

require 'formula'
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@paulnicholson
paulnicholson / powssl
Last active November 24, 2021 16:40
ssl with pow using stud

Instructions

  • Install stud $ brew install https://raw.github.com/paulnicholson/homebrew/master/Library/Formula/stud.rb
  • Download and install the powssl script $ curl https://gist.githubusercontent.com/paulnicholson/2050941/raw/7e4d2178e3733bed18fdfe737277c3cb72241d39/powssl > ~/bin/powssl $ chmod +x ~/bin/powssl
  • Run powssl to create development certificate and configure stud.
  • $ powssl
@cdcarter
cdcarter / form_helper.rb
Created June 4, 2011 02:52
NS Form Helper Class
class FormHelper
attr_accessor :form
def initialize(nsform=nil)
@form = nsform
end
def length
form.numberOfRows
end
@oisin
oisin / gist:987247
Created May 23, 2011 18:34 — forked from leereilly/gist:987094
API version checking using Sinatra's before filter; supports nested resources
require 'sinatra'
# Set the version of the API being run here
#
MAJOR_VERSION = 1
MINOR_VERSION = 0
VERSION_REGEX = %r{/api/v(\d)\.(\d)}
helpers do
def version_compatible?(nums)
@aaronbrethorst
aaronbrethorst / t2p.rb
Created May 16, 2011 02:32
Twitter Timeline to Cocoa plist
require 'rubygems'
require 'json'
require 'plist'
require 'open-uri'
File.open("/Users/aaron/Desktop/tweets.plist", 'w') {|f| JSON.parse(open("http://api.twitter.com/1/statuses/user_timeline.json?screen_name=cocoacontrols").read).to_plist}
@mattetti
mattetti / fsevents.rb
Created March 18, 2011 07:19
FSEvents API implementation in MacRuby
if RUBY_ENGINE == 'macruby'
framework 'CoreServices'
WATCHED_EXTS = "rb,builder,erb,nokogiri"
PASSENGER_RESTART_FILE = File.expand_path(File.join(File.dirname(__FILE__), "..", "tmp", "restart.txt"))
DELAY = 3
def modified_files(path)
Dir.glob("#{File.expand_path(path)}/*.{#{WATCHED_EXTS}}").map do |filename|
begin