- A search for specified text: [Marked][1].
- A simple software search for [Fantastical][2].
- A simple google search [neat neat neat][3]
- A Last.fm track search [neat neat neat][4] (with specified search terms)
- Mac app store search: [Marked on the MAS][5]
- Mac App Store search [Marked direct][1] with direct dev site link.
- iTunes app search: [Boost 2][6]
- iTunes search, direct dev site link: [Boost direct][6]
- This search: [Purple][7] will have its link text filled in with the title of the first result.
- This is a wikipedia entry for [Sid Vicious][8]
This file contains hidden or 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 | |
# encoding: utf-8 | |
SILENT = ENV['SL_SILENT'] =~ /false/i ? false : true || true | |
VERSION = '2.2.23' | |
# SearchLink by Brett Terpstra 2015 <http://brettterpstra.com/projects/searchlink/> | |
# MIT License, please maintain attribution | |
require 'net/https' | |
require 'uri' |
This file contains hidden or 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
# encoding=utf8 | |
""" | |
formd by Seth Brown, 02-24-12 | |
modified for iOS use (Pythonista) by Brett Terpstra, 10-17-12 | |
""" | |
from sys import stdin, stdout | |
import clipboard | |
import re | |
from collections import OrderedDict |
This file contains hidden or 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
# Google Search for Pythonista (iOS) | |
# Searches Google and copies the first result to the clipboard as | |
# a Markdown link in the form [title](url). | |
# | |
# Inspired by Brett Terpstra's SearchLink: | |
# http://brettterpstra.com/searchlink-automated-markdown-linking-improved/ | |
import clipboard | |
def google(terms): |
This file contains hidden or 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
var bt = {}; // to call the functions outside of the jQuery wrapper because OctoPress is a bit of a JS mess. Hey, that rhymes. | |
(function($){ | |
bt = { | |
checkWinWidth: function() { | |
var width = $(window).width(); | |
if (width <= 500) { | |
if (!$('body').hasClass('mobile')) { | |
$('img').each(function(){ | |
var $this = $(this); |
Video: http://ckyp.us/mLi+
Not all that smart yet, but a little jQuery with Hammer.js:
(function($){
window.scrollTo(0,1);
$("#cough")
This file contains hidden or 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
# create a 150x150 thumbnail of the passed image using `sips` | |
# img is an absolute path to the base image file | |
def thumbnail_image(img) | |
return_dir = Dir.pwd | |
Dir.chdir(File.dirname(img)) | |
width = %x{sips -g pixelWidth #{img.strip}|tail -n 1}.gsub(/pixelWidth: /,'').strip.to_i | |
height = %x{sips -g pixelHeight #{img.strip}|tail -n 1}.gsub(/pixelHeight: /,'').strip.to_i | |
thumb_name = img.strip.gsub(/^(.*?)(\..{3,4})$/,"\\1-150x150\\2").strip | |
thumb = File.expand_path(thumb_name) | |
FileUtils.cp(File.expand_path(img),thumb) |
This file contains hidden or 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
def first_matching_project(fragment) | |
%x{osascript <<'APPLESCRIPT' | |
tell application "TaskPaper" | |
tell front document | |
set projectlist to name of projects | |
set frag to "#{fragment}" | |
repeat with aproject in projectlist | |
if (offset of "#{fragment}" in aproject) > 0 then return (aproject as string) | |
end repeat | |
return "Inbox" |
This file contains hidden or 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
tell application "Google Chrome" to quit | |
do shell script "atsutil server -shutdown" | |
set _running to missing value | |
repeat until _running is equal to "ATSServer is running" | |
set _running to do shell script "atsutil server -ping" | |
delay 1 | |
end repeat |
This file contains hidden or 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
<key>ProgramArguments</key> | |
<array> | |
<string>/path/to/slogger</string> | |
<string>-s</string> | |
</array> |