Skip to content

Instantly share code, notes, and snippets.

@15cm
15cm / compinit-oh-my-zsh.zsh
Last active November 1, 2021 15:01 — forked from ctechols/compinit.zsh
Speed up zsh compinit by only checking cache once a day.
# compinit optimization for oh-my-zsh
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
@mikeatlas
mikeatlas / readme.md
Created March 21, 2018 22:10
maxfiles ulimit on macos
@itst
itst / INSTALL.md
Last active October 26, 2019 22:58
Installling ibooks-highlights on macOS 10.12

Installation

  1. Download/clone https://github.com/matttrent/ibooks-highlights
  2. pip3 install click
  3. brew install libyaml
  4. cd to cloned copy
  5. sudo python3 setup.py install
  6. copy templates from ibook_highlights/templates to /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ibooks_highlights-0.1.0-py3.6.egg
  7. Create directoy to hold your notes. mkdir ~/Documents/Annotations
  8. cd ~/Documents/Annotations
# Mac to stay awake indefinitely via the CLI
$ pmset noidle
# pmset's manual can be found @
# https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/pmset.1.html
#!/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 October 10, 2025 20:19
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"