This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
An OSA script to replace disc numbers in album names with the disc number attribute. | |
Accepts album names in any of these formats: | |
LCD Soundsystem (Disc 1) | |
Mellon Collie and the Infinite Sadness (Disc 1: Dawn to Dusk) | |
The Wall: Live in Berlin (Disc 2) [Live] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'plist' | |
require 'tempfile' | |
require 'terminal-table' | |
class Hash | |
def without(*keys) | |
copy = self.dup | |
keys.each { |key| copy.delete(key) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lowercaseWords = ['a', 'an', 'and', 'at', 'but', 'by', 'for', 'in', 'nor', 'of', 'on', 'or', 'so', 'the', 'to', 'with'] | |
.map(word => ` ${word.toLowerCase().replace(/(^| )(\w)/g, s => s.toUpperCase())} `).join('|') | |
const iTunes = Application('iTunes'), | |
selection = iTunes.selection() | |
let songsToFix = [] | |
selection.forEach((song) => { | |
const newName = song.name(), | |
newAlbum = song.album(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cask 'phoneview' do | |
version :latest | |
sha256 :no_check | |
url do | |
customer_center = ENV['PHONEVIEW_REGISTRATION_LINK'] | |
markup = `curl -L '#{customer_center}' 2>&1` | |
markup.scan(%r{href="([^"]+.dmg)"}).flatten.first | |
end | |
name 'PhoneView' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ARTIST = '' | |
let TRACKS = [] | |
const app = Application('iTunes') | |
const destinationPlaylist = app.userPlaylists.whose({name: {_equals: ARTIST}})[0] | |
TRACKS.forEach((name) => { | |
const matchedNames = app.playlists.whose({name: 'Library'})[0].tracks | |
.whose({name: {_equals: name}}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -L https://www.dropbox.com/sh/xxx/yyy > project.git.zip | |
mkdir project.git | |
unzip project.git.zip -d project.git | |
git clone project.git | |
rm project.git.zip | |
rm -rf project.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'uri' | |
cask 'pixelsnap' do | |
version '1.4.1' | |
sha256 '13831053af6c1774107619b9419253a3127e2b4eb02e52f8099108e260dcf1d7' | |
url "file://#{URI.encode(File.expand_path(File.dirname(ARGV[1] || '')))}/PixelSnap-1.4.1.dmg" | |
name 'PixelSnap' | |
homepage 'https://getpixelsnap.com/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require('node-fetch'); | |
const parse = require('parse-link-header'); | |
async function githubCommits(owner, repository) { | |
const response = await fetch(`https://api.github.com/repos/${owner}/${repository}/commits`); | |
let link; | |
if (response.headers) { | |
for (let pair of response.headers.entries()) { | |
if (pair[0] === 'link') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// clang -framework Carbon iOSKeyboardEscapeKeyEnablerBluetooth.c -o iOSKeyboardEscapeKeyEnablerBluetooth | |
// sudo ./iOSKeyboardEscapeKeyEnablerBluetooth | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <Carbon/Carbon.h> | |
void TriggerEscKey() | |
{ | |
CGEventRef event; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Weatherspect < Formula | |
desc "Virtual weather environment in ASCII" | |
homepage "http://robobunny.com/projects/weatherspect/html/" | |
url "http://robobunny.com/projects/weatherspect/weatherspect_v1.11.tar.gz" | |
sha256 "6186b41c7db8529eaf98864c2760837a2664cf107d1fa53620beef686c2dc1b8" | |
depends_on "openssl" | |
resource "Curses" do | |
url "https://cpan.metacpan.org/authors/id/G/GI/GIRAFFED/Curses-1.34.tar.gz" |