Skip to content

Instantly share code, notes, and snippets.

View arronmabrey's full-sized avatar

Arron Mabrey arronmabrey

View GitHub Profile
For actually making the SuperDrive work in clean and easy way, just read on (but note: while has proven to be a quite safe method, still you’ll be doing this entirely on your own risk! Using sudo and editing system files incorrectly can damage things severely!):
Apparently, Apple engineers had the need to test the superdrive with non-MacBookAir computers themselves, so the driver already has an option built-in to work on officially unsupported machines! All you need to do is enable that option, as follows:
The driver recognizes a boot parameter named “mbasd” (Mac Book Air Super Drive), which sets a flag in the driver which both overrides the check for the MBA and also tweaks something related to USB power management (the superdrive probably needs more power than regular USB allows). So just editing /Library/Preferences/SystemConfiguration/com.apple.Boot.plist and inserting the “mbasd=1″ into the “Kernel Flags” does the trick:
open a terminal
type (on a single line)
sudo pico /Library/Preferences/SystemConfig
@arronmabrey
arronmabrey / gist:7213561
Last active December 26, 2015 21:09
Api::NotificationsController JSON Examples
// General System Notifications
{
"data":[
{
"id":1,
"message":"Lumentus Social will be offline for maintenance.",
"problem_resolution_url":null,
"problem_id":null,
"user_id":100,
"client_id":null,
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶

Keybase proof

I hereby claim:

  • I am arronmabrey on github.
  • I am arronmabrey (https://keybase.io/arronmabrey) on keybase.
  • I have a public key whose fingerprint is C62B 9CD3 263A CC9A 5BCF 3301 B39C 72CF 3B43 0F0B

To claim this, I am signing this object:

@arronmabrey
arronmabrey / index.html
Created August 16, 2014 17:04
A Pen by Arron Mabrey.
<div id="menu-icon">#menu-icon (click me)</div>
<div id="mobile-menu">
<ul>
<li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-16">
<a href="http://goldenshine.harbrdev.com/about-us/">About Us</a>
</li>
<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-79">
<a href="#">Services</a>
<ul class="sub-menu">
<li class="menu-item menu-item-type-post_type menu-item-object-service-locations menu-item-195">
@arronmabrey
arronmabrey / explode_paths.rb
Last active February 22, 2022 18:59
explode_paths.rb
# Inspiration: https://gist.github.com/potatosalad/760726
def explode_paths(input, klass: Hash, key_delimiter: '__', key_transform: ->(key) { key.to_sym })
recursive_hash = klass.new { |hash, key| hash[key] = klass.new(&hash.default_proc) }
result = input.to_h.reduce(recursive_hash) do |recursive_acc, (input_key_path, input_value)|
keys = input_key_path.to_s.split(key_delimiter).map(&key_transform)
tree = keys.map {|key| [:[], key] }
tree.push([:[]=, tree.pop[1], input_value])
tree.reduce(recursive_acc) do |acc, tree_node|
@arronmabrey
arronmabrey / livereload-hotjsloader.js
Created January 27, 2016 20:29
livereload-hotjsloader.js
"use strict";
(function() {
window.LiveReloadPluginHotJSLoader = (function() {
LiveReloadPluginHotJSLoader.identifier = 'livereload-hotjsloader';
LiveReloadPluginHotJSLoader.version = '1.0';
function LiveReloadPluginHotJSLoader(window, host) {
this.window = window;
this.host = host;
@arronmabrey
arronmabrey / shasum-snippet.txt
Last active February 29, 2016 13:51
shasum snippet
find . -type f -print0 | xargs -0 shasum -a 256 | tee shasum256-check.txt
shasum -a 256 -c shasum256-check.txt | tee shasum256-scan.txt
@arronmabrey
arronmabrey / gist:95f1b59c8d0d60d68cb9
Created February 29, 2016 04:16
amazon order/item csv merge
mlr --icsv --ocsv cut -o -f "Order ID","Title","Item Total" then put '$Title=gsub($Title, "\"", "")' items.csv > tmp-items.csv && mlr --icsv --ocsv cut -o -f "Order Date","Order ID","Total Charged","Payment Instrument Type" then nest --implode --values --across-records -f "Total Charged" orders.csv > tmp-orders.csv && mlr --icsv --ocsv join -u -j "Order ID" --lp order_ --rp item_ -f tmp-orders.csv tmp-items.csv > merged.csv && rm tmp-orders.csv tmp-items.csv
@arronmabrey
arronmabrey / graph.dot
Last active July 17, 2016 12:58
graphviz hello world
digraph {
hello [color=red]
world [shape=box color=green]
hello -> gist1
a [color=purple]
b [shape=box color=pink]
c [color=blue]