Skip to content

Instantly share code, notes, and snippets.

View kerim's full-sized avatar

P. Kerim Friedman kerim

View GitHub Profile
anonymous
anonymous / NWT SARC CSL
Created October 9, 2014 00:16
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" page-range-format="chicago">
<info>
<title>NWT Species at Risk Committee Style Format</title>
<id>http://www.zotero.org/styles/nwt-species-at-risk-committee-style-format</id>
<link href="http://www.zotero.org/styles/nwt-species-at-risk-committee-style-format" rel="self"/>
<link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
<author>
<name/>
<email/>
@kerim
kerim / FT2REMARK
Created March 13, 2013 12:16
FoldingText to Remark AppleScript
to searchReplace(thisText, searchTerm, replacement)
set AppleScript's text item delimiters to searchTerm
set thisText to thisText's text items
set AppleScript's text item delimiters to replacement
set thisText to "" & thisText
set AppleScript's text item delimiters to {""}
return thisText
end searchReplace
on write_to_file(this_data, target_file, append_data) -- (string, file path as string, boolean)
@stefanschmidt
stefanschmidt / set-default-paper-size.sh
Last active December 31, 2015 12:59
Set system-wide default paper size for printing via CLI on OS X
# get current default paper size (probably empty)
defaults read /Library/Preferences/org.cups.PrintingPrefs DefaultPaperID
# set paper size for all users to DIN A4
sudo defaults write /Library/Preferences/org.cups.PrintingPrefs DefaultPaperID iso-a4
# remove the default paper size setting
sudo defaults delete /Library/Preferences/org.cups.PrintingPrefs DefaultPaperID
@jerodsanto
jerodsanto / gist:1137337
Created August 10, 2011 16:31
Bookmarklet to uncripple Kindle Cloud Reader
(function() {
function uncrippleFrame() {
var body = this.contentWindow.document.getElementsByTagName('body')[0];
this.contentWindow.onclick = null;
body._frame = this;
body.onmousemove = function() {
this._frame.contentWindow.onclick = null;
this.setAttribute('style', '-webkit-user-select: auto;');
@nimf
nimf / build-notifier.rb
Last active July 3, 2018 13:49 — forked from zoul/build-notifier.rb
Posts a message to the OS X notification center when a Jekyll build is finished. Requires TerminalNotifier, see http://git.io/5X99Eg or “gem install terminal-notifier”.
begin
require 'terminal-notifier'
module Jekyll
class Site
alias jekyll_process process
def process
jekyll_process
TerminalNotifier.notify("🍻 Jekyll rebuild finished")
rescue => e
TerminalNotifier.notify("💥 Jekyll rebuild failed: #{e.message}")
@jgoodall
jgoodall / things.sh
Created November 12, 2012 18:33
shell script to print things tasks to the screen (geektool)
#!/bin/bash
# useful for [geektool](http://projects.tynsoe.org/en/geektool/)
# jg: made lib_dir generic
# Title: Things Extract Script for GeekTool
# Author: Alex Wasserman
# Description: Extracts the currents items from Things database, stores in a temp file. Outputs tmp file if Things DB is locked in use.
# Things SQL Library
export SQL_LIBRARY="ThingsLibrary.db"
@aflores
aflores / youtubedownloader.scpt
Created August 20, 2017 16:05
AppleScript file to download youtube videos
(*
script to download videos from youtube using the youtube-dl program
you can paste this code in a ScriptEditor file or use it inside a
'Run AppleScript' block in an Automator Application
*)
set question to display dialog "Youtube URL to fetch?" default answer "" buttons {"Cancel", "Open in Browser", "Download"} default button 3
set pageURL to (text returned of result)
if pageURL is "" then return "No URL"
set choice to (button returned of question)
@dsanson
dsanson / any2pandoc.sh
Created August 30, 2011 17:52
any2pandoc.sh: script that tries to convert documents thrown at it to pandoc's extended markdown
#!/bin/sh
# any2pandoc.sh
#
# A shell script that tries its best to convert documents thrown at it
# to pandoc's extended markdown.
#
# https://gist.github.com/1181510
#
# Depends on:
@QWxleA
QWxleA / config.edn
Created September 21, 2021 16:15
logseq configuration sept 2021
{;; Currently, we support either "Markdown" or "Org".
;; This can overwrite your global preference so that
;; maybe your personal preferred format is Org but you'd
;; need to use Markdown for some projects.
;; :preferred-format ""
;; Preferred workflow style.
;; Value is either ":now" for NOW/LATER style,
;; or ":todo" for TODO/DOING style.
:preferred-workflow :now
@bjhomer
bjhomer / instructions.md
Last active January 17, 2023 23:03
How to make the Day One command line tool automatically write to Day One 2

Using the Day One CLI with Day One 2

The dayone command line tool was originally written to work with Day One Classic, and by default writes its entries to the default Day One Classic journal directory1. If you want to use the dayone tool to write entries in to Day One 2 instead, there are a couple options.




Option 1. Use this option if you don't use Day One Classic at all.