Skip to content

Instantly share code, notes, and snippets.

View davidfmiller's full-sized avatar
💭
🤓

David Miller davidfmiller

💭
🤓
View GitHub Profile
@davidfmiller
davidfmiller / localizations.md
Last active January 10, 2024 22:50
Localizations

macOS / iOS Localization Strings

Application

EN FR ES DE NL
About {app} À propos de {app} Acerca de {app} Über „{app}“
Hide {app} Masquer {app} Ocultar {app} „{app}“ ausblenden
Hide Others Masquer les autres Ocultar otros Andere ausblenden
Preferences Réglages Configuración Einstellungen
@davidfmiller
davidfmiller / xmlpretty.py
Created January 30, 2019 20:35
XML Pretty Print
#!/usr/bin/python
import xml.dom.minidom
import sys
input = sys.stdin.read()
dom = xml.dom.minidom.parseString(input)
pretty_xml_as_string = dom.toprettyxml(indent=' ', newl='\n')
@davidfmiller
davidfmiller / bb-launchbar.appleScript
Last active January 18, 2019 18:06
Send BBEdit document to LaunchBar
try
set mydoc to ""
tell application "BBEdit"
set mydoc to file of (document 1 of window 1)
end tell
tell application "LaunchBar"
open mydoc
end tell
@davidfmiller
davidfmiller / 5rings.txt
Last active September 27, 2018 18:26
The Five Rings
Do not ignore the many ways in the world.
Do not seek after pleasures for yourself.
Do not rely on anything whatsoever.
Think little about yourself; think deeply about the world.
Never, in all your life, think greedy or desirous thoughts.
@davidfmiller
davidfmiller / bb-eslint.appleScript
Last active December 12, 2017 19:56
BBEdit ESLint
(* Pipe eslint output into a BBEdit results window *)
try
tell application "BBEdit"
set mydoc to file of (document 1 of window 1)
end tell
set posixPath to POSIX path of mydoc
set cmd to "/usr/local/bin/node /usr/local/bin/eslint -c ~/.eslintrc.js -f unix " & (quoted form of POSIX path of mydoc) & " | /usr/local/bin/bbresults"
do shell script cmd
on error
@davidfmiller
davidfmiller / Copy Command to Clipboard.applescript
Last active December 6, 2017 21:48
Copy a UNIX command to your clipboard to return to the location of your cursor in the current file
(*
Copy UNIX command to return to current location in active BBEdit document
*)
tell application "BBEdit"
set mydocs to every text document in window 1
if (length of mydocs is greater than 0) then
set props to get properties of selection
set mydoc to first item of mydocs
@davidfmiller
davidfmiller / sticky-clipboard.applescript
Created November 24, 2017 21:40
New Sticky From Clipboard
launch application "Stickies"
tell application "System Events" to tell process "Stickies"
click menu item "New Note" of menu "File" of menu bar 1
set frontmost to true
click menu item "Paste" of menu "Edit" of menu bar 1
end tell
@davidfmiller
davidfmiller / bbedit-documents-clipboard.applescript
Last active November 24, 2017 21:34
Copy text document paths in the active BBEdit window to clipboard
(*
Copy paths of all open text documents in the active BBEdit window to your clipboard
*)
tell application "BBEdit"
set mydocs to every text document in window 1
set urls to ""
repeat with doc in mydocs
set myurl to (URL of doc)
if (myurl is not missing value) then
@davidfmiller
davidfmiller / bookmarklet.md
Last active October 27, 2017 18:00
Bookmarklets

Bookmarklets

  • /
@davidfmiller
davidfmiller / safari-bbedit.appleScript
Last active July 5, 2017 18:06
Open source of current Safari document in BBEdit
(*
Open source of current Safari document in BBEdit
David Miller
https://readmeansrun.com
*)
set mycontents to ""
set myname to ""
try