import os
import subprocess
def popen(*args, **kwargs):
output = kwargs.get('output', False)
directory = kwargs.get('dir')
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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"> | |
<array> | |
<dict> | |
<key>Activate</key> | |
<string>Normal</string> | |
<key>CreationDate</key> | |
<real>582833929.55457795</real> | |
<key>Macros</key> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use application "System Events" | |
property process : a reference to (first process whose frontmost = true) | |
property window : a reference to front window of my process | |
property display : a reference to scroll area 1 of process "Finder" | |
if not (my window exists) then return | |
set [width, height] to size of my window | |
set [screenX, screenY] to size of my display |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' | |
A script to recursively compare two directories (including file size and file hash changes) | |
Usage: python3 compare_dirs.py DIR1 DIR2 | |
''' | |
import os, sys, hashlib, unicodedata | |
COMPARE_FILES = True # should file sizes be compared if their names are the same? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const runJxa = require("run-jxa"); | |
const _ = require('lodash'); | |
(async () => { | |
const result = await runJxa(() => { | |
var of = Application("OmniFocus"); | |
var doc = of.defaultDocument; | |
return getTasks(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
parent_short_id=$1 | |
parent_id=`docker inspect --format '{{.Id}}' $1` | |
get_kids() { | |
local parent_id=$1 | |
docker inspect --format='ID {{.Id}} PAR {{.Parent}}' $(docker images -a -q) | grep "PAR ${parent_id}" | sed -E "s/ID ([^ ]*) PAR ([^ ]*)/\1/g" | |
} | |
print_kids() { |
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DevonThink Search operators | |
In the toolbar search field, as well as in both the interactive and the simple web interface, you can use standard and extended Boolean operators, parenthesis, and more to fine tune your search. | |
The syntax of the operators is compatible to DEVONagent and EasyFind, the Finder, Spotlight, common search engines as well as common programming languages such as C, C++, Objective-C, Java, and JavaScript. The complexity of the query is unlimited. | |
Case | |
All terms are case-insensitive. You may, if you wish, use capitalization for proper names in a query, but DEVONthink Pro Office will ignore case in interpreting the query. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof exports === 'undefined') exports = {} | |
function timer (repeats, func, delay) { | |
var args = Array.prototype.slice.call(arguments, 2, -1) | |
args.unshift(this) | |
var boundFunc = func.bind.apply(func, args) | |
var operation = $.NSBlockOperation.blockOperationWithBlock(boundFunc) | |
var timer = $.NSTimer.timerWithTimeIntervalTargetSelectorUserInfoRepeats( | |
delay / 1000, operation, 'main', null, repeats | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From "A simple unix/linux daemon in Python" by Sander Marechal | |
# See http://stackoverflow.com/a/473702/1422096 and http://web.archive.org/web/20131017130434/http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ | |
# | |
# Modified to add quit() that allows to run some code before closing the daemon | |
# See http://stackoverflow.com/a/40423758/1422096 | |
# | |
# Modified for Python 3 (see also: http://web.archive.org/web/20131017130434/http://www.jejik.com/files/examples/daemon3x.py) | |
# | |
# Joseph Ernest, 20200507_1220 |
NewerOlder