Skip to content

Instantly share code, notes, and snippets.

@fractaledmind
fractaledmind / Export All Skim Notes with Markdown Reference Links
Created July 24, 2013 04:37
This script will (as the title suggests) export all of you Skim notes to a text editor (either TextEdit or TextMate) in Markdown format, with reference style links. It relies on the GENERATE TOP 3 NOTES WITH SYSTEM URL script that will put 3 notes at the top of the PDF with linking information.
@fractaledmind
fractaledmind / Generate Top 3 Notes in Skim
Last active December 20, 2015 03:59
This script will insert 3 notes at the top of your open Skim PDF. These notes contain linking information that is used in the EXPORT ALL SKIM NOTES script.
(* GENERATE 3 INITIAL SKIM NOTES WITH LINKING INFO (CUSTOM URL VERSION)
-- created by Stephen Margheim
-- 13 July 2013
-- open source
REQUIRED PROGRAMS:
-- Skim
This script requires setting up the custom URL handler described [here](http://hackademic.postach.io/page/create-a-custom-url-scheme-for-free).
-----------------------------------------------------
-- Name: Edit Last Modified Note and Preview in Marked
-- Author: Patrick Welker <http://rocketink.net>
-- Version: 1.1 (October 24, 2014)
-- Credits: Uses ViewInMarked by Robin Trew to align editor and Marked windows: <http://git.io/sLxcgg>
-- For: bloggers, writers and Marked users (<http://markedapp.com>)
-----------------------------------------------------
-- Know problems:
-- * Sometimes, when the editor is closed it first tries top open the default "open" dialog.
-- * The script handles nvALT differently from all editors. It doesn't resize nvALT's window since most users
@alexyoung
alexyoung / tmux.conf
Created July 19, 2013 16:12
tmux cheap powerline
#!/usr/bin/env sh
ioreg -l | grep -i capacity | tr '\n' ' | ' | awk '{printf("%.2f%%\n", $10/$5 * 100)}'
@ttscoff
ttscoff / grab links.bookmarklet
Last active February 20, 2025 09:55
Create a bookmark and paste the code from `grab links.bookmarklet` into the url. Trigger it on a page containing links you want to save and then click the section of the page containing the links. A Markdown list of all links will be generated, and clicking the resulting list will select all for copying.
@ttscoff
ttscoff / finddayone.rb
Last active December 18, 2015 05:29
Locate your Day One entries folder
#!/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."
@dlo
dlo / export_pinboard.py
Last active April 24, 2025 10:08
Export all Pinboard.in bookmarks with a specific tag.
#!/usr/bin/env python
"""
This script is designed to generate a simple HTML file with _all_ of your
Pinboard.in bookmarks.
You should edit the `username`, `password`, `bookmark_filename`, and `tag`
variables.
Requirements:
@ttscoff
ttscoff / linkstopinboard.js
Last active April 30, 2018 18:53
Get links from a selected area of a page and send them to Pinboard. Edit USERNAME and PASSWORD before using.
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(
javascript:window.location='drafts://x-callback-url/create?text='+encodeURIComponent(document.title+'\n')+encodeURIComponent(location.href)+'&action=pinbook-desc'
@dbyler
dbyler / Bless this App.applescript
Last active December 15, 2015 18:59
This script lets you quickly select a version of an application as the primary one by renaming the "blessed" version to [Application name].app and other versions to [Application name]-[version].app.
property applicationsFolder : "/Applications"
property applicationName : "OmniFocus"
property promptBeforeLaunch : false
(*
This script lets you quickly select a version of an application as the primary one by renaming the "blessed" version to [Application name].app and other versions to [Application name]-[version].app.
What it does…
- Prompts you to select which version to 'bless'
- Quits app if running