Skip to content

Instantly share code, notes, and snippets.

View drew-wallace's full-sized avatar

Drew Wallace drew-wallace

  • Turner Broadcasting
  • Atlanta, GA
View GitHub Profile
@drew-wallace
drew-wallace / main.js
Created February 23, 2017 17:27
Deep JSON Equality performance
const _ = require('lodash');
const deepEqual = require('deep-equal');
const value_equals = require('toubkal/lib/util/value_equals');
const request = require("request");
const rp = require('request-promise');
let url = "https://gist.githubusercontent.com/drew-wallace/3dd411fc6b969648cd67a02de58b0329/raw/82b2ec2e8c193f0d1affac047a114e95fa159b74/JMdict-all.json";
rp({
uri: url,
@drew-wallace
drew-wallace / custom filter
Created March 10, 2017 16:52
Block open.spotify.com audio adds with adblock filter
/mp3-ad/*$domain=open.spotify.com
@drew-wallace
drew-wallace / private.xml
Last active March 20, 2017 17:39
Macally keyboard mappings for Karabiner
<?xml version="1.0"?>
<root>
<item>
<name>Rotate Delete, Home, and Save (F13) counter-clockwise</name>
<identifier>private.rotate_delete_home_save_f13_counter_clockwise</identifier>
<block>
<!--Macally-->
<device_only>DeviceVendor::RawValue::0x2222, DeviceProduct::RawValue::0x0018</device_only>
<autogen>__KeyToKey__ KeyCode::HOME, KeyCode::FORWARD_DELETE</autogen>
<autogen>__KeyToKey__ KeyCode::FORWARD_DELETE, KeyCode::S, ModifierFlag::COMMAND_L</autogen>
@drew-wallace
drew-wallace / 0-manual_setup
Last active February 18, 2023 04:23
Set up Raspberry Pi for PC streaming with Parsec
sudo raspi-config
# Change password (1)
# Change hostname if you want (2)
# Change locale/timezone/keyboard/wifi region in Localisation (4)
# Enable ssh in Interfacing (5)
@drew-wallace
drew-wallace / get-joystick-guid
Created June 3, 2017 16:55
SDL Joystick GUID finder
#!/usr/bin/env ruby
class JoystickGUID
EVIOCGID = 0x80084502
# Derive an SDL-style GUID from bus type, vendor, product, version
def JoystickGUID::ReadGUID(filename)
input = [0,0,0,0].pack('SSSS')
success = 0
File.open(filename, File::RDONLY|File::NONBLOCK){ |file|
// ==UserScript==
// @name sketchfab2obj
// @description Save Sketchfab models as obj
// @author <anonimus>
//
// Version Number
// @version 1.62
//
// Urls process this user script on
// @include /^https?://(www\.)?sketchfab\.com/models/.*
@drew-wallace
drew-wallace / getBroadcastDateRange.js
Created July 31, 2018 20:38 — forked from sonyseng/getBroadcastDateRange.js
Given a Gregorian Date, get the Broadcast Date Ranges for Week, Month, Quarter, and Year
(function (url, onLoad) {
var script = document.createElement('script');
script.addEventListener('load', onLoad);
script.src = url;
document.getElementsByTagName('head')[0].appendChild(script);
}('https://cdn.jsdelivr.net/npm/moment@2.19.2/moment.min.js', function () {
const fmt = 'MM/DD/YYYY';
function getBroadcastWeek(momentDate) {
@drew-wallace
drew-wallace / jamf.md
Created August 27, 2019 18:53 — forked from a7ul/jamf.md
removing all restrictions on jamf managed macos device - Provided you have root access.

REMOVE JAMF RESTRICTIONS ON MAC

REMOVE ONLY RESTRICTIONS

sudo jamf removeMDMProfile removes all restrictions

sudo jamf manage brings back all restrictions and profiles

REMOVE ALL RESTRICTIONS AND DISABLE JAMF BINARIES WHILE KEEPING YOUR ACCESS TO VPN AND OTHER SERVICES

sudo jamf removeMDMProfile removes all restrictions

// ==UserScript==
// @name Auto Check-In to Southwest Flights
// @namespace http://www.ryanizzo.com/southwest-auto-check-in/
// @version 1.8
// @author Nicholas Buroojy (http://userscripts.org/users/83813)
// @contributor Ryan Izzo (http://www.ryanizzo.com)
// @contributor JR Hehnly (http://www.okstorms.com @stormchasing)
// @contributor Trevor McClellan (github.com/trevormcclellan)
// @description Automatically check in to Southwest Airline flights at the appropriate time.
// @include https://www.southwest.com/air/check-in/index.html*