A common and reliable pattern in service unit files is thus:
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
Instuctions available (moved) at REMOTE ORIGIN website: Extract Subtitles From mkv
| #!/usr/bin/osascript -l JavaScript | |
| ObjC.import('Cocoa') | |
| app = Application.currentApplication() | |
| app.includeStandardAdditions = true | |
| ObjC.registerSubclass({ | |
| name: 'MenuAction', | |
| methods: { |
| # FontInstaller (by @olemoritz) | |
| # This script installs a custom TTF font on iOS (system-wide). | |
| # It can be used in one of two ways: | |
| # 1. Simply run it in Pythonista, you'll be prompted for the URL of the font | |
| # you'd like to install (if there's a URL in the clipboard, it'll be used by default) | |
| # 2. Use it as an 'Open in...' handler, i.e. select this file in Pythonista's 'Open in... | |
| # menu' setting. This way, you can simply download a ttf file in Safari and open it in |
I recently had the following problem:
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
| (ns scratchpad.core | |
| (:require [clojure.pprint :as pprint])) | |
| (defn get-dataset | |
| [file] | |
| (with-open [rdr (clojure.java.io/reader file)] | |
| (vec (line-seq rdr)))) | |
| (defn str-len-distance | |
| ;; normalized multiplier 0-1 |
| #!/usr/bin/python | |
| # CLI program to control the mediakeys on OS X. Used to emulate the mediakey on a keyboard with no such keys. | |
| # Easiest used in combination with a launcher/trigger software such as Quicksilver. | |
| # Main part taken from http://stackoverflow.com/questions/11045814/emulate-media-key-press-on-mac | |
| # Glue to make it into cli program by Fredrik Wallner http://www.wallner.nu/fredrik/ | |
| import Quartz | |
| import sys |
| ########## SETTINGS | |
| # On startup, lftp executes ~/.lftprc and ~/.lftp/rc. You can place aliases and 'set' commands | |
| # there. Some people prefer to see full protocol debug, use 'debug' to turn the debug on. | |
| # Certain commands and settings take a time interval parameter. It has the format Nx[Nx...], where N is time amount | |
| # (floating point) and x is time unit: d - days, h - hours, m - minutes, s - seconds. Default unit is second. E.g. | |
| # 5h30m or 5.5h. Also the interval can be 'infinity', 'inf', 'never', 'forever' - it means infinite interval. E.g. | |
| # 'sleep forever' or 'set dns:cache-expire never'. |