Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc)
hex=$((cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@thespacedoctor
thespacedoctor / isrunning.sh
Last active May 5, 2021 15:59
[is process running?] determine whether or not a named process is running on your machine #process
#!/bin/bash
# USAGE: sh isrunning.sh <processname>
ps_out=`ps -ef | grep $1 | grep -v 'grep' | grep -v $0`
result=$(echo $ps_out | grep "$1")
if [[ "$result" != "" ]];then
echo "Running"
else
echo "Not Running"
fi
@opragel
opragel / ea_get_chrome_extensions_and_permissions.py
Last active October 27, 2018 00:17
ea_get_chrome_extensions_and_permissions.py
#!/usr/bin/python
## Script: #!/usr/bin/python
## Script: get_chrome_extensions_and_permissions.py
## Author: Modifications by Owen Pragel. Written for most by part by Christopher Collins ([email protected]).
###########################################
## Description: This script searches the last logged in user's installed extensions and the permissions of those extensions.
import os

Source: Bear - FAQ and support #@References/Bear 2018-03-09

Editor

Text Styles

⌥⌘1, ⌥⌘2, …, ⌥⌘6 Headings

⌥⌘S Line separator

@bhdicaire
bhdicaire / BearTagIcons.md
Last active May 17, 2018 23:27
Tag Icons in Bear

Bear is a beautiful, flexible writing app for crafting notes and prose. Once you get a decent tag collection going, it can get harder to find the right one in your Sidebar.

This is my current list of small icons, refer to the blog post for more information:

  • academy - school
  • android
  • animals - animal
  • anime - comics
  • app - app
  • apple
  • apple watch
@itst
itst / Pinboard.scpt
Last active January 10, 2024 11:40
Import and regularly replicate your Pinboard bookmarks in DEVONthink.
(* Import and update your Pinboard bookmarks to DEVONthink
Based on work done by Christian Grunenberg on Mon Jan 23 2006,
Rafael Bugajewski to support Pinboard instead of Delicious on Sun Dec 19 2010 and
Andreas Zeitler on Sun Mar 03 2011 to display user feedback when finished.
By Sascha A. Carlin <https://sascha.carlin.de/> on 2018-03-07 to set the creation date of new record, show progress bar, use Pinboard Auth Token, use modification date of folder to fetch only recent items
Copyright (c) 2018. All rights reserved. *)
use framework "Foundation"
@jakebathman
jakebathman / is_backblaze_uploading.sh
Created February 15, 2018 20:25
Determine if Backblaze is currently backing up files on macOS
#!/bin/sh
# This will look at the overviewstatus.xml file and
# determine if Backblaze is currently transmitting a file.
#
# Developed against:
# macOS 10.13.3
# Backblaze 5.2.0.172
BBSTATUS='/Library/Backblaze.bzpkg/bzdata/overviewstatus.xml'
@pdxmph
pdxmph / things_to_reminders.rb
Last active April 9, 2018 22:19
Move your Things inbox and today lists into Reminders.app
#!/usr/bin/env ruby
require 'rb-scpt'
include Appscript
# Needs a list in Reminders called "Things," or adjust this to taste:
target_list_name = "Things"
things_lists = ["Inbox", "Today"]
things = app("Things3")
@haircut
haircut / modify-system-preferences-authorizations.py
Last active January 31, 2025 03:05
Backs up authdb, then modifies them so users can modify Energy Saver, Network, Printers & Scanners, Date & Time, Time Machine
#!/usr/bin/python
'''
Modifies authorizations database to allow standard users to change select
system preferences.
A great guide to available authorization rights can be found at:
https://www.dssw.co.uk/reference/authorization-rights/index.html
USE AT YOUR OWN RISK
'''
@arubdesu
arubdesu / expander
Created February 5, 2018 06:01
services
OUTPUT=$(/usr/bin/basename "$1" | /usr/bin/sed -e "s/.pkg//g")
/usr/sbin/pkgutil --expand "$1" /tmp/"$OUTPUT"
open -a "Archive Utility.app" /tmp/"$OUTPUT"/Payload