Skip to content

Instantly share code, notes, and snippets.

View kerim's full-sized avatar

P. Kerim Friedman kerim

View GitHub Profile
@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
@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)
@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.

@danburzo
danburzo / README.md
Last active August 30, 2023 06:52
Scrape your Facebook saved links

Facebook does not provide an easy way to get your saved links out of its system. Here's a quick script that does that for you.

Instructions

Go to your Saved links page and make sure you scroll way down to the bottom so that all your saved items are loaded. This script will generate a simple HTML page with your links, along with an Add to Pinboard action.

Bookmarklet

Drag this to your bookmarks toolbar:

@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}")
--==============================
-- Send Keynote Text to Desktop Markdown File
-- Writted By: Richard Dooling https://github.com/RichardDooling/
-- Based on
-- Send Keynote Presenter Notes to Evernote
-- Version 1.0.1
-- Written By: Ben Waldie <ben@automatedworkflows.com>
-- http://www.automatedworkflows.com
-- Version 1.0.0 - Initial release
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/>
@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
@ccstone
ccstone / BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
Last active March 30, 2024 07:53
BBEdit-TextWrangler Regular Expression Cheat-Sheet
————————————————————————————————————————————————————————————————————————————————————————————————————
BBEdit / BBEdit-Lite / TextWrangler Regular Expression Guide Modified: 2018/08/10 01:19
————————————————————————————————————————————————————————————————————————————————————————————————————
NOTES:
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use.
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete.
@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)