Skip to content

Instantly share code, notes, and snippets.

View dlackty's full-sized avatar
😇

Richard Lee dlackty

😇
View GitHub Profile
.DS_Store
build
Build
*.pbxuser
*.perspectivev3
*.mode1v3
*.xcworkspace
xcuserdata
*.pyc
@dlackty
dlackty / gist:3483170
Created August 26, 2012 20:00
OS X Rails Setup
#! /usr/bin/env bash
# llvm-gcc
if `type -P llvm-gcc &>/dev/null`; then
echo "Command Line Tools found."
else
echo "Command Line Tools not found."
echo "Please go https://developer.apple.com/downloads and install **Command Line Tools for Xcode**" && exit 0;
fi
@dlackty
dlackty / speakerdeckexpander.js
Created December 26, 2012 04:11
Propane caveatPatchor.js snippet to embed SpeakerDeck slide inline.
Campfire.SpeakerDeckExpander = Class.create({
initialize: function(chat) {
this.chat = chat;
var messages = this.chat.transcript.messages;
for (var i = 0; i < messages.length; i++) {
this.detectSpeakerDeckURL(messages[i]);
}
},
detectSpeakerDeckURL: function(message) {
@dlackty
dlackty / oclint.rb
Created February 7, 2013 09:57
Homebrew formula for OCLint 0.6.
require 'formula'
class Oclint < Formula
homepage 'http://oclint.org'
url 'http://archives.oclint.org/releases/0.6/oclint-0.6-x86_64-apple-darwin12.tar.gz'
version '0.6'
sha1 '9fb4bdfb6dbce14986d863d8b672870c0ae08ec8'
depends_on 'llvm'
@dlackty
dlackty / gist:5320376
Created April 5, 2013 15:50
Flipboard mobile redirection.
<iframe id="appLoader" style="display:none;"></iframe>
<script>
var flipboardURL = 'flipboard://showSection/flipboard%2Fsingleurl%252Fhttp%253A%252F%252Fwww.wired.com%252Fmagazine%252F2013%252F04%252Ffacebookqa?resetStack=true&referrer=facebook&createDevice=api&canAddToFlipboard=false&createAction=shareWithComment&showPreselectedItem=true';
var appStoreURL = "http://ax.itunes.apple.com/us/app/flipboard/id358801284?mt=8";
var googlePlayURL = "https://play.google.com/store/apps/details?id=flipboard.app&feature=nav_result#?t=W251bGwsMSwyLDNd";
// try and launch Flipboard with the add section url
if(navigator.userAgent.match(/android/i) != null){
document.getElementById("appLoader").setAttribute("src", flipboardURL);
}
@dlackty
dlackty / config.ru
Created April 16, 2013 11:05
HTTP simple redirection as heroku app.
# This example allows requests for example.com and localhost.
# If any other domain is requested it redirects to the first domain on the
# list - example.com preserving path and query string from the first request.
require "rack/domain_redirect"
# This is how you use and configure Rack::DomainRedirect middleware
use Rack::DomainRedirect, ['icook.tw']
run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['Hello World!']] }
@dlackty
dlackty / ngrok.rb
Last active December 22, 2015 05:09
Homebrew formula for ngrok
require 'formula'
class Ngrok < Formula
homepage 'https://ngrok.com/'
url 'https://dl.ngrok.com/darwin_amd64/ngrok.zip'
sha1 '3c34a7d2b44226ab99b9b51fadc7808db7ace8ff'
version '1.6'
def install
bin.install 'ngrok'

FR24 to gpx

  1. Go to Flightradar24 flights database and find your flight
  2. Get URL like this: http://www.flightradar24.com/data/flights/UA853/#38ae207
  3. ./fr24togpx.rb 38ae207 > FILENAME.gpx
  4. Check you output file using GPS Visualizer

Keybase proof

I hereby claim:

  • I am dlackty on github.
  • I am dlackty (https://keybase.io/dlackty) on keybase.
  • I have a public key whose fingerprint is 8596 0733 47FC D9A6 8F3A 7388 9A21 FD8D 5C03 84FD

To claim this, I am signing this object: