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
#!/usr/bin/python | |
# ReadingListCatcher | |
# - A script for exporting Safari Reading List items to Markdown and Pinboard | |
# Brett Terpstra 2015 | |
# Uses code from <https://gist.github.com/robmathers/5995026> | |
# Requires Python pinboard lib for Pinboard.in import: | |
# `easy_install pinboard` or `pip install pinboard` | |
import plistlib | |
from shutil import copy | |
import subprocess |
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
-- All code grabbed and requested help with from generous parties and unsuspecting github users. | |
-- | |
-- Create Markdown link from front most tab in safari and append | |
-- to end of current FoldingText document as new list item. | |
-- UNCOMMENT FOR USE IN ALFRED | |
on alfred_script(q) | |
--on run | |
-- -- -- -- -- -- -- -- -- | |
-- |
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
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
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
#!/usr/bin/env ruby | |
# | |
# Locates and removes Homebrew installation | |
# http://brew.sh/ | |
# | |
# Author: Stephen Benner | |
# https://github.com/SteveBenner | |
# | |
require 'optparse' | |
require 'fileutils' |
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
#!/bin/bash | |
echo '#!/bin/bash' | |
echo '' | |
echo 'failed_items=""' | |
echo 'function install_package() {' | |
echo 'echo EXECUTING: brew install $1 $2' | |
echo 'brew install $1 $2' | |
echo '[ $? -ne 0 ] && $failed_items="$failed_items $1" # package failed to install.' | |
echo '}' |
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
#!/bin/bash | |
# Size at the end is * 2048 where 2048 = 1 MB, so 1572864 = 768 MB | |
#DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://1572864` | |
DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://2097152` | |
/usr/sbin/diskutil erasevolume HFS+ "RamDiskCache" $DISK | |
CACHEDIR="/Volumes/RamDiskCache/$USER" |
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
#!/bin/bash | |
tmsupportpath="/Library/Application Support/TextMate" | |
bundlepath="$tmsupportpath/Bundles" | |
if [ ! -d "$bundlepath" ] | |
then | |
echo "First time, eh? Making $bundlepath..." | |
mkdir -p "$bundlepath" | |
fi | |
if [ ! -d "$tmsupportpath/Support" ] |
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
# | |
# This script will install the following Textmate bundles | |
# | |
# Languages | |
# - c https://github.com/textmate/c.tmbundle | |
# - coffeescript https://github.com/jashkenas/coffee-script-tmbundle | |
# - context free https://github.com/textmate/context-free.tmbundle | |
# - erlang https://github.com/textmate/erlang.tmbundle | |
# - haskell https://github.com/textmate/haskell.tmbundle.git | |
# - html https://github.com/textmate/html.tmbundle |
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
// ==UserScript== | |
// @name Benchmark: getValue/setValue | |
// @namespace test | |
// @include http* | |
// @version 1 | |
// @grant GM_getValue | |
// @grant GM_setValue | |
// ==/UserScript== | |
var iters = 40; |
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
on alfred_script(q) | |
set {the_path, file_name} to parse_path(first item of q) | |
tell application "iTerm" | |
set _terminal to make new terminal | |
tell _terminal | |
launch session "Vim" | |
tell the last session | |
write text "cd \"" & the_path & "\"" | |
# Replace e with your vim command |
NewerOlder