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
# Binary Sig. Because I'm avoiding doing other things | |
# 100000 | |
# 100000 | |
# 100000 | |
# 100000 | |
# 100000 | |
# 100000 | |
# 10000000000000:. | |
# 10000000000:: |
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/ruby | |
input = ENV['POPCLIP_TEXT'] | |
# use a regex to locate all phone numbers | |
phone_numbers = input.scan(/(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?/) | |
# send the first one to Skype via AppleScript (osascript) | |
%x{/usr/bin/osascript -e 'set _cmd to "CALL #{phone_numbers[0].join("")}"' -e 'tell application "Skype" to send command _cmd script name "PCDIALER"'} |
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/ruby | |
require 'shellwords' | |
dayonedir = %x{ls ~/Library/Mobile\\ Documents/|grep dayoneapp}.strip | |
full_path = File.expand_path("~/Library/Mobile\ Documents/#{dayonedir}/Documents/Journal_dayone/entries") | |
if File.exists?(full_path) | |
system "echo \"#{Shellwords.escape(full_path)}\"|tr -d '\n'|pbcopy" | |
puts full_path | |
puts "Escaped version of your Day One entries path is in your clipboard." |
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
javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading…</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://gist.github.com/ttscoff/5834741/raw/grablinks.js?x="+(Math.random());})(); |
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
#!/bin/bash | |
target=$1 | |
filename=`basename $1` | |
image="${TMPDIR}${filename}.png" | |
rsrc="${TMPDIR}icn.rsrc" | |
# Create a thumbnail from the file preview | |
qlmanage -t -s 512 -o ${TMPDIR} $target |
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
# Title: Responsive Lazy Load YouTube embed tag for Jekyll | |
# Author: Brett Terpstra <http://brettterpstra.com> | |
# Description: Output a styled element for onClick replacement with responsive layout | |
# | |
# Syntax {% youtube video_id [width height] ["Caption"] %} | |
# | |
# Example: | |
# {% youtube B4g4zTF5lDo 480 360 %} | |
# {% youtube http://youtu.be/2NI27q3xNyI %} |
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>RawQueryDict</key> | |
<dict> | |
<key>FinderFilesOnly</key> | |
<false/> | |
<key>RawQuery</key> | |
<string>(true) && (((InRange(kMDItemContentCreationDate,$time.today(-1Y),$time.today(+1d)) && ((kMDItemOMUserTags = "*jquery*"cd) || (kMDItemOMUserTags = "*javascript*"cd) || (kMDItemOMUserTags = "*responsive*"cd) || (kMDItemOMUserTags = "*webdesign*"cd) || (kMDItemOMUserTags = "*webdev*"cd) || (kMDItemOMUserTags = "html5*"cdw) || (kMDItemOMUserTags = "*css3*"cd) || (kMDItemKeywords = "*jquery*"cd) || (kMDItemKeywords = "*javascript*"cd) || (kMDItemKeywords = "*responsive*"cd) || (kMDItemKeywords = "*webdesign*"cd) || (kMDItemKeywords = "*webdev*"cd) || (kMDItemKeywords = "*html5*"cd) || (kMDItemKeywords = "*css3*"cd)) && (((kMDItemKind = "Web*"cdw) && ((kMDItemKind = "Internet*"cdw) && (kMDItemKind = "Location*"cdw))) || (kMDItemKind = "Markdown*"cdw) || ((kMDItemKind = "Delish*"cdw) && (kMDItemKind = "Bookmark*"cdw)) || (_kMDItemGroupId = 11)))))</string> | |
<key>SearchSco |
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
javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading…</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://cdn.rawgit.com/ttscoff/6109434/raw/Bullseye.js?x="+(Math.random());})(); |
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 | |
input = STDIN.read | |
input.gsub!(/^\=+\n ?(.*?)\n\=+/,"# \\1") | |
input.gsub!(/^-+\n\d+ (.*?)\n-+/,"## \\1") | |
input.gsub!(/^\d+\.\d+ (.*)/,"### \\1") | |
input.gsub!(/^\d+\.\d+\./,"@") | |
input.gsub!(/^@\d+ /,"- ") | |
input.gsub!(/^@\d+\.\d+ /,"\t- ") |
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/ruby | |
# encoding: utf-8 | |
# Quick conversion to Markdown for Curio list text output (Copy As Plain Text) | |
# Separates notes into subparagraphs, builds headers and lists based on max_headers setting | |
# You can insert a line at the top with "max headers: 5" to override the default setting for that text | |
# Usage: | |
# pbpaste|curio2md.rb > markdown_file.md | |
# Also works as a system service | |
max_headers = 3 |