Skip to content

Instantly share code, notes, and snippets.

View neilio's full-sized avatar

Neil Lee neilio

  • Toronto, Canada
View GitHub Profile
# Change bluetooth audio parameters on OSX to solve dropping/choppy audio problems on Yosemite
# (and earlier, reportedly) w/ BT headphones. This is not a perfect solution, but reduces
# the number of interruptions dramatically. It has been tested on exactly one machine with
# iTunes local audio only; please leave a comment if you discover it causes any problems with AirPlay
# or other software.
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 48
defaults write com.apple.BluetoothAudioAgent "Stream - Max Outstanding Packets (editable)" 10
defaults write com.apple.BluetoothAudioAgent "Stream Resume Delay" 0
@omz
omz / FontInstaller.py
Last active August 8, 2023 14:43
FontInstaller
# FontInstaller (by @olemoritz)
# This script installs a custom TTF font on iOS (system-wide).
# It can be used in one of two ways:
# 1. Simply run it in Pythonista, you'll be prompted for the URL of the font
# you'd like to install (if there's a URL in the clipboard, it'll be used by default)
# 2. Use it as an 'Open in...' handler, i.e. select this file in Pythonista's 'Open in...
# menu' setting. This way, you can simply download a ttf file in Safari and open it in
@craigeley
craigeley / sifttter.rb
Last active July 23, 2018 16:37
This script looks for text files in a specific folder that include completed tasks ('@done') and timestamps, and then collects them into a daily log for the Day One journaling application. It works especially well when it's connected to IFTTT. See more details at http://craigeley.com/tagged/sifttter
#!/usr/bin/ruby
# SIFTTTER 1.5: An IFTTT-to-Day One Logger by Craig Eley 2014 <http://craigeley.com>
# Based on tp-dailylog.rb by Brett Terpstra 2012 <http://brettterpstra.com>
# Multiple Date Function by Paul Hayes 2014 <http://paulrhayes.com>
#
# Notes:
# * Uses `mdfind` to locate a specific folder of IFTTT-generated text files changed in the last day
# * The location of your folder should be hardcoded in line 67, and the location of your Day One in line 66
# * Scans leading timestamps in each line matching the selected dates
# * Does not alter text files in any way
@ndaversa
ndaversa / plex.py
Last active August 15, 2021 23:46
Python script that will ping a local Plex Media Server to determine if its responding as expected (if not it will kill it and restart it) Bandaid solution used to cure occasional PMS hang ups. This script should be scheduled to run on an interval (eg. every 5 mins) see: https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSy…
#!/usr/bin/env python
from os import system
import sys
import urllib2
import time
import datetime
#from prowlpy import Prowl
def status():
try:
@dan-blanchard
dan-blanchard / fix_timestamps.py
Created September 29, 2013 16:38
Script to fix timestamps of files based on filenames. Default filename regular expression looks for filenames named by CameraSync. I developed this to fix an annoying issue where timestamps were wrong for files uploaded from my iPhone, which made Aperture/iPhoto sort them incorrectly (because videos don't have EXIF data).
#!/usr/bin/env python
'''
Little script to set timestamps based on filenames for files uploaded to
Dropbox by CameraSync.
:author: Dan Blanchard
:date: September, 2013
'''
from __future__ import print_function, unicode_literals
@rreeger
rreeger / gist:3388024
Created August 18, 2012 16:08
RSS Resources for Slogger

#RSS Feed Resource for Brett Terpstra's Slogger

I hacked this together from numerous places as a resource for those using Slogger (graciously offered by Brett Terpstra).

I have tried to use ALL_CAPS in the feeds to note those areas that will require your specific info.

Feel free to share the list and make additions. And please let me know if there is anything here that needs correcting.

##App.net

  • Feed
@mklabs
mklabs / bootstrap-plugins.txt
Created December 2, 2011 11:23
h5bp + twitter bootstrap integration
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js
@gruber
gruber / gist:647224
Created October 26, 2010 16:26 — forked from dpk/gist:646570
Slight tweaks to dpkendal's script. Gives the BBEdit document a name (rather than "untitled <integer>", and skips the \n to \r stuff, which I don't think is necessary in recent versions of BBEdit.
tell application "Safari"
set _source to do JavaScript "window.document.documentElement.outerHTML" in document 1
set _name to name of document 1
end tell
tell application "BBEdit"
make new text window with properties ¬
{contents:_source, source language:"HTML", name:"Generated source: " & _name}
select insertion point before character 1 of text window 1