Skip to content

Instantly share code, notes, and snippets.

@7468696e6b
7468696e6b / okular-appleSilicon.md
Last active August 9, 2025 21:25
how to install Okular viewer on macOS Big Sur, using M1/Apple Silicon/arm64
  1. Install homebrew from https://brew.sh/ (follow the instructions there)
  2. tap the https://invent.kde.org/packaging/homebrew-kde/ repo, brew tap kde-mac/kde https://invent.kde.org/packaging/homebrew-kde.git
  3. brew edit okular, workaround now is to comment out or delete the line depends_on "chmlib" (won't compile on macos arm64 for now as of 2021-08-18), then save (if using vim you need to first press i to insert/type, when saving then <esc> then :wq then <enter>.
  4. brew install okular, wait for stuff to compile and/or install
  5. It may ask for keychain credentials (to sign the binaries? because of mac arm64 security policy https://eclecticlight.co/2021/01/26/when-you-dont-have-permission-to-run-an-app-on-an-m1-mac/)
  6. $(brew --repo kde-mac/kde)/tools/do-caveats.sh
  7. Now okular is in your $HOME/Applications/KDE folder, and will show up in Launchpad! You can view pdf, djvu, etc documents.

Edit: as of 2025 there is now a precompiled nightly binary available for download at https://okul

@ttscoff
ttscoff / init.lua
Last active June 6, 2025 19:31
Hammerspoon config examples for hyper key
-- A global variable for the Hyper Mode
k = hs.hotkey.modal.new({}, "F17")
-- Trigger existing hyper key shortcuts
k:bind({}, 'm', nil, function() hs.eventtap.keyStroke({"cmd","alt","shift","ctrl"}, 'm') end)
-- OR build your own
launch = function(appname)
@lisamelton
lisamelton / convert-mkv-to-mp4.sh
Last active October 17, 2021 13:51
Convert Matroska video file into MP4 format without transcoding.
#!/bin/bash
#
# convert-video.sh
#
# Copyright (c) 2013-2014 Don Melton
#
about() {
cat <<EOF
$program 2.0 of December 3, 2014
@derickfay
derickfay / tpsort.py
Created February 8, 2014 22:10
Python script to sort text by the dates in @Due(YYYY-MM-DD) tags. Made for use with TaskPaper files.
#!/usr/bin/env python
import re
import sys
# first & only argument is the text to be parsed
theText = sys.argv[1]
theList=[]
j=""
@lisamelton
lisamelton / convert-mp4-to-mkv.sh
Last active May 24, 2024 17:41
Convert MP4 video file into Matroska format without transcoding.
#!/bin/bash
#
# convert-video.sh
#
# Copyright (c) 2013-2014 Don Melton
#
about() {
cat <<EOF
$program 2.0 of December 3, 2014
@lisamelton
lisamelton / transcode-video.sh
Last active April 29, 2025 20:17
Transcode video file (works best with Blu-ray or DVD rip) into MP4 (or optionally Matroska) format, with configuration and at bitrate similar to popular online downloads.
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2015 Don Melton
#
about() {
cat <<EOF
$program 5.13 of April 8, 2015
@fractaledmind
fractaledmind / Create and Autolink to new Evernote Note from Selection
Last active April 21, 2020 12:06
This script takes text selected from within an Evernote note and (1) creates a new note whose titles matches the selected text in the same notebook, (2) embeds a link to the original note as the first line of the new note, and (3) replaces the selected text with a link to the newly created note. This allows you to easily create a wiki-like envir…
@fractaledmind
fractaledmind / Markdown2Evernote
Created November 9, 2013 08:06
REQUIREMENTS: MultiMarkdown, Evernote. This script accepts text from the clipboard in (Multi)Markdown format and passes it to Evernote as HTML. The script also accepts 3 lines of metadata: Title, Notebook, and Keywords.
property markdownloc : "/usr/local/bin/multimarkdown"
property tid : AppleScript's text item delimiters
set mdSource to the clipboard
--check for Title metadata
try
if text item 1 of paragraph 1 of mdSource = "#" then
if not text item 2 of paragraph 1 of mdSource = "#" then
set theTitle to text items 3 thru -1 of paragraph 1 of mdSource as string
@fractaledmind
fractaledmind / Get Evernote URL
Created October 22, 2013 16:42
This Applescript will get the local url for the currently selected Evernote note.
tell application "Evernote"
set x to selection
repeat with i from 1 to count of x
set theurl to note link of item i of x
end repeat
end tell
@lisamelton
lisamelton / batch.sh
Last active December 18, 2015 05:59
Batch control for the "transcode-video.sh" script.
#!/bin/bash
# batch.sh
#
# Copyright (c) 2013-2014 Don Melton
#
# This version published on October 22, 2014.
#
# Batch control for the "transcode-video.sh" script.
#