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 | |
case "$1" in | |
*_EDITMSG|*MERGE_MSG|*_TAGMSG ) | |
/usr/local/bin/vim "$1" | |
;; | |
*.md ) | |
/usr/local/bin/mmdc "$1" | |
;; | |
*.txt ) |
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 | |
# everwatch.rb by Brett Terpstra, 2011 | |
# http://brettterpstra.com/2011/11/14/marked-scripts-nvalt-evernote-marsedit-scrivener/ | |
# http://support.markedapp.com/kb/how-to-tips-and-tricks/marked-bonus-pack-scripts-commands-and-bundles | |
# Updated for latest Evernote configuration (2013) and quick launch of Marked.app - spetschu | |
# | |
# Watch Evernote for updates and put the current content of the editor into a preview file for Marked.app | |
# <http://markedapp.com> | |
require 'shellwords' |
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 'rubygems' | |
require 'json' | |
require 'net/https' | |
class KeyChain | |
def initialize(user=nil) | |
@user ||= %x{dscl . -read /Users/$(whoami)|grep "EMailAddress:"|sed 's/^EMailAddress: //'} | |
@host="com.brettterpstra.gauges" |
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
#custom filters for Octopress | |
require './plugins/backtick_code_block' | |
require './plugins/post_filters' | |
require './plugins/raw' | |
require './plugins/date' | |
require 'rubypants' | |
require 'cgi' | |
module OctopressFilters | |
include BacktickCodeBlock |
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: utf-8 | |
# | |
# Brett's misc filters | |
require './plugins/post_filters' | |
require 'fileutils' | |
module Jekyll | |
module Filters | |
def keyword_string(keywords) | |
keywords.join(" ") |
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 | |
# | |
# Updated 2017-10-25: | |
# - Defaults to large size (512) | |
# - If ImageMagick is installed: | |
# - rounds the corners (copped from @bradjasper, https://github.com/bradjasper/Download-iTunes-Icon/blob/master/itunesicon.rb) | |
# - replace original with rounded version, converting to png if necessary | |
# | |
# Retrieve an iOS app icon at the highest available resolution |
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
{ | |
// TextMate Command-Return (Command Enter) | |
"@\U000D" = (moveToEndOfParagraph:, insertNewline:); | |
// Insert blank line above paragraph (Command Shift Enter) | |
"@$\U000D" = (moveToBeginningOfParagraph:, moveLeft:, insertNewline:); | |
} |
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
# gist is defunkt, use jist | |
alias gist="jist -p -c" | |
# private gist | |
alias gistp="jist -Ppo" | |
# jump to top level of git repo | |
alias gt="cd \$(git rev-parse --show-toplevel)" |
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
Funky Boss 1:36 Beastie Boys Check Your Head Rap/Hip Hop 7 |
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:var user='USERNAME',pass='PASSWORD';(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.9",function($,L){$(document).ready(function(){$("div,table").on("mouseover mouseout click",function(a){a.type==="mouseover"?$(this).css({outline:"1px solid red"}):$("div,table").css({outline:"none"});if(a.type==="click"){a.preventDefault();var i,linkage=$(this).find('a');linkage.each(function(link,i){console.log($(this).attr('href'));var t=open('https://'+user+':'+pass+'@pinboard.in/add?later=yes&noui=yes&jump=close&url='+encodeURIComponent($(this).attr('href'))+'&title='+encodeURIComponent($(this).text()),'Pinboard'+i,'toolbar=no,width=100,height=100');t.blur( |