Skip to content

Instantly share code, notes, and snippets.

View rex's full-sized avatar
🧘
Designing calm systems for 20 years. Available.

ᴘɪᴇʀᴄᴇ ᴍᴏᴏʀᴇ™ rex

🧘
Designing calm systems for 20 years. Available.
View GitHub Profile
@rex
rex / favorite-libraries.md
Last active July 29, 2018 12:50
A list of my favorite libraries, grouped for sanity
@rex
rex / platform-detect.coffee
Created February 26, 2015 00:37
Super, dead simple browser & platform detection. Found on this awesome blog post: http://davidlesches.com/blog/making-browsers-play-nice-with-thin-fonts
$ ->
is_chrome = navigator.userAgent.indexOf('Chrome') > -1
is_explorer = navigator.userAgent.indexOf('MSIE') > -1
is_firefox = navigator.userAgent.indexOf('Firefox') > -1
is_safari = navigator.userAgent.indexOf("Safari") > -1
is_opera = navigator.userAgent.indexOf("Presto") > -1
is_mac = (navigator.userAgent.indexOf('Mac OS') != -1)
is_windows = !is_mac
if is_chrome && is_safari
@rex
rex / locate-largest-git-objects.sh
Created February 15, 2015 05:38
Bash script to find the largest objects in a Git repo. I DID NOT WRITE THIS. I found this in a fantastic blog post by Antony Stubbs - https://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
#!/bin/bash
#set -x
# Shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see https://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs
# set the internal field spereator to line break, so that we can iterate easily over the verify-pack output
@rex
rex / simple-file-operations.rb
Created February 13, 2015 23:39
Easily implement basic file operations in Ruby
# One-liner to write data to a file
File.open(yourfile, 'w') { |file| file.write("your text") }
# And reading is even simpler
File.read(yourfile)
@rex
rex / symbolize_keys.rb
Created February 13, 2015 23:37
Easily add the 'symbolize_keys' method to the Hash class without the ActiveSupport dependency
class Hash
def symbolize_keys
symbolized_hash = Hash.new
self.each { |k, v| symbolized_hash[k.to_sym] = v }
symbolized_hash
end
end
@rex
rex / no-console-protection.js
Created February 13, 2015 20:04
Simple protection against loose console.log() statements killing the JS engine in browsers without console.* methods (ahemIEahem)
// Put this inside a <script></script> tag at the very tippy top of your page to make sure it works properly.
var noop = function() {}
if(window.console == undefined) {
window.console = {
log: noop,
error: noop,
warn: noop,
table: noop
@rex
rex / tracks-to-purchase.md
Last active August 29, 2015 14:14
Tracks that I Need to Purchase (and where I heard them)

Podcast Identifier Legend

Podcast Name Identifier
Drumcode Radio DCR
Jaytech Music Podcast JTM
Phobiq Podcast PHOBIQ

Techno

@rex
rex / font_face.sublime-settings
Last active December 11, 2019 15:30
Sublime Text 'font_face' configuration values
{
// "font_face": "Anonymous Pro",
// "font_face": "Anonymous Pro Bold",
// "font_face": "Anonymous Pro Minus",
// "font_face": "Anonymous Pro Minus Bold",
// "font_face": "Andale Mono",
// "font_face": "AverageMono",
// "font_face": "AverageMono Bold",
// "font_face": "Consola Mono",
// "font_face": "Consola Mono Bold",
@rex
rex / PHBQPD002.md
Last active August 29, 2015 14:14
Phobiq Podcast Track Listings

https://soundcloud.com/d2techno/phobiq002-spektre-320

  1. Gessaffelstein - Control Movement
  2. Spektre - Cyclik [Rhythm Converted]
  3. Spektre - Turbine [Toolroom]
  4. Spektre & Christian Cambas - Rebel Without a Cause [Incorrect]
  5. Markantonio - The Gap (Roberto Capuano Remix) [Analytic Trail]
  6. Axel Karakasis - Back Down (Original Mix) [Rhythm Converted]
  7. Chris Hope & Andre Walter - Tattoo (Tom Laws Remix) [Packed]
  8. Bodyscrub - Regular (Spektre's Irregular Beast) [Driving Forces]
@rex
rex / DCR234.txt
Created February 3, 2015 16:20
Drumcode Radio Track Listings
# https://soundcloud.com/adambeyer/dcr234-drumcode-radio-live-harvey-mckay-live-from-tube-club-belgrade
01. D Unity - Feeling - Rhythm Distrikt
02. Gary Beck - Hey Big Girl - Saved
03. Harvey McKay - Servant Of Two Masters
04. Cocodrills feat _ Ghostface killah - Cherchez LaGhost [Carlio Lio Remix] - Transmit
05. Harvey McKay - The Cure - Drumcode
06. Dj Boris & Jewel Kid - Submissive - Alleanza
07. Dosem - Chase The Link - Suara
08. Gary Beck - Power - BEK Audio