Skip to content

Instantly share code, notes, and snippets.

@potatowire
potatowire / kindleExcerptMerge.js
Created March 26, 2017 05:36
In iOS Copied app, merges excerpts from Kindle app in markdown blockquote format
// A clipping object is a JavaScript object that contains the following properties. Properties values may be null.
// title - String
// text - String
// url - String
// saveDate - Date
// Merge function receives an array of clipping objects and returns the merged string
function merge(clippings) {
var footnoteString = '\n', footnoteCounter = 1, merged = clippings.reduce(function(string, clipping) {
@potatowire
potatowire / kindleExcerptFormat.js
Last active March 26, 2017 05:40
In iOS Copied App, formats excerpt from Kindle app as markdown blockquote
// A clipping object is a JavaScript object
// that contains the following properties.
// Properties values may be null.
// title (String)
// text (String)
// url (String)
// saveDate (Date)
// Return true if the clipping can be reformatted with this script.
@potatowire
potatowire / xmonad.hs
Created December 28, 2016 04:58 — forked from altercation/xmonad.hs
Dirty XMonad config WIP
---------------------------------------------------------------------------
-- --
-- _| _| _| _| _| --
-- _| _| _|_| _|_| _|_| _|_|_| _|_|_| _|_|_| --
-- _| _| _| _| _| _| _| _| _| _| _| _| --
-- _| _| _| _| _| _| _| _| _| _| _| _| --
-- _| _| _| _| _|_| _| _| _|_|_| _|_|_| --
-- --
---------------------------------------------------------------------------
-- Ethan Schoonover <es@ethanschoonover.com> @ethanschoonover --
@potatowire
potatowire / browser.sh
Created November 1, 2016 22:51 — forked from altercation/browser.sh
Per workspace browser launcher
#!/usr/bin/env zsh
setopt EXTENDED_GLOB NO_UNSET
unsetopt NO_MATCH
# launch different browser profiles automatically on any named i3 workspace
# plain numbered workspaces (or those listed in DEFAULT_WS) launch the normal
# browser profile
# expected names for chromium/google-chrome executable
#browsers=(chromium google-chrome google-chrome-${^=:-stable unstable beta dev})
@potatowire
potatowire / gist:8403582
Last active January 3, 2016 03:39
I use [Pinboard](http://pinboard.in) for all of my links, including "read later" items that I used to send to [Instapaper](http://www.instapaper.com/). I am often subject to a spotty network and [primitive browsres](http://www.microsoft.com/en-us/download/internet-explorer-7-details.aspx), and the [supplied "read later" bookmark](https://pinboar…
javascript:if(document.getSelection){s=document.getSelection();}else{s='';};document.location='https://pinboard.in/add?later=yes&noui=yes&jump=close&next=same&url='+encodeURIComponent(location.href)+'&description='+encodeURIComponent(s)+'&title='+encodeURIComponent(document.title)