Skip to content

Instantly share code, notes, and snippets.

View djtech42's full-sized avatar

Dan Turner djtech42

View GitHub Profile
@djtech42
djtech42 / logicproxScripterEvents
Created October 11, 2015 01:21
Logic Pro X MIDI Scripter Javascript Events
//-----------------------------------------------------------------------------
// EventTypes.js
//-----------------------------------------------------------------------------
// required event class definitions for MIDI events
//-----------------------------------------------------------------------------
// Event : base class for all events
//-----------------------------------------------------------------------------
@djtech42
djtech42 / audio_extensions
Last active April 6, 2020 01:00 — forked from egel/audio_extensions
Big group of extensions (audio, text)
.2sf Nintendo DS Sound File
.2sflib Nintendo DS Audio Library File
.3ga 3GPP Audio File
.4mp 4-MP3 Database File
.5xb Line 6 POD HD500X Edit Bundle
.5xe Line 6 POD HD500X Edit Preset File
.5xs Line 6 POD HD500X Edit Setlist File
.669 UNIS Composer 669 Module
.6cm Six Channel Module
.8cm Eight Channel Module
@djtech42
djtech42 / revertosxrootless.sh
Last active May 1, 2018 18:11
Disable Rootless Feature (System Integrity Protection) in OS X El Capitan (Updated)
#!/bin/bash
#Beta 4 to Final Public Release (Must be run in Recovery Mode)
csrutil disable
#Beta 1-3
sudo nvram boot-args="rootless=0";sudo reboot
@djtech42
djtech42 / jekyllServe.sh
Created December 8, 2015 16:52
Run Jekyll Local Server In the Background Without Output to the Console
jekyll serve > /dev/null 2>&1 &
@djtech42
djtech42 / changeShellToFish.sh
Created December 13, 2016 14:39
Change User Shell to Fish
chsh -s `which fish`
@djtech42
djtech42 / airportLink.sh
Created October 11, 2015 03:46
Create a Symbolic Link to Airport Command Line Tool in OS X
@djtech42
djtech42 / examples.swift
Last active August 25, 2017 02:11
Swift Regular Expression Checks Using Pattern Matching Examples
// *** different ways a string can match using our pattern matching operator ***
enum StringMatchType {
case literal
case escapedRegularExpression
case regularExpression(withOptions: NSRegularExpression.Options)
}
/* *** example function that returns how the string matches against
a literal string and a regex pattern in default and case insensitive modes *** */
func typeOfMatch(for string: String) -> StringMatchType? {
@djtech42
djtech42 / PatternMatchOperator.swift
Last active August 25, 2017 02:07
Swift Regular Expression Checks Using Pattern Matching PatternMatchOperator
/* *** implementation for using the RegexPattern struct that can specify both a
regex pattern and options in pattern matching *** */
func ~=(lhs: RegexPattern, rhs: String) -> Bool {
return
try! NSRegularExpression(
pattern: lhs.pattern,
options: lhs.options
)
.numberOfMatches(
in: rhs,
@djtech42
djtech42 / RegexPattern.swift
Created August 25, 2017 01:52
Swift Regular Expression Checks Using Pattern Matching RegexPattern
struct RegexPattern {
let pattern: String
let options: NSRegularExpression.Options
init(_ pattern: String, options: NSRegularExpression.Options) {
self.pattern = pattern
self.options = options
}
}
@djtech42
djtech42 / icloudAlias.sh
Last active August 18, 2017 10:35
Create Alias for iCloud Drive
#!/bin/bash
ln -s ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/ iCloud