| command | description | 
|---|---|
| ctrl + a | Goto BEGINNING of command line | 
| #!/usr/bin/env python3 | |
| import re | |
| import requests | |
| # Enumerate the cores in Solr to determine if statistics have been sharded into | |
| # yearly shards by DSpace's stats-util or not (for example: statistics-2018). | |
| def get_statistics_shards(): | 
| -- hattip https://github.com/lodestone/hyper-hacks | |
| -- hattip https://gist.github.com/ttscoff/cce98a711b5476166792d5e6f1ac5907 | |
| -- hattip https://gist.github.com/prenagha/1c28f71cb4d52b3133a4bff1b3849c3e | |
| -- A global variable for the Hyper Mode | |
| k = hs.hotkey.modal.new({}, "F17") | |
| -- The following keys are configured as hot keys in their respective apps (or in Keyboard Maestro) | |
| -- d → Dash (configure in Dash preferences) | 
| -- hattip https://github.com/lodestone/hyper-hacks | |
| -- hattip https://gist.github.com/ttscoff/cce98a711b5476166792d5e6f1ac5907 | |
| -- A global variable for the sub-key Hyper Mode | |
| k = hs.hotkey.modal.new({}, 'F18') | |
| -- Hyper+key for all the below are setup somewhere | |
| -- The handler already exists, usually in Keyboard Maestro | |
| -- we just have to get the right keystroke sent | 
| -- A global variable for the Hyper Mode | |
| k = hs.hotkey.modal.new({}, "F17") | |
| -- Trigger existing hyper key shortcuts | |
| k:bind({}, 'm', nil, function() hs.eventtap.keyStroke({"cmd","alt","shift","ctrl"}, 'm') end) | |
| -- OR build your own | |
| launch = function(appname) | 
Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your o
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
tar -xvf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
cd wkhtmltox/bin/
sudo mv wkhtmltopdf  /usr/bin/wkhtmltopdf
sudo mv wkhtmltoimage  /usr/bin/wkhtmltoimage
| From: http://www.labnol.org/software/wget-command-examples/28750/ | |
| How do I download an entire website for offline viewing? How do I save all the MP3s from a website to a folder on my computer? How do I download files that are behind a login page? How do I build a mini-version of Google? | |
| Wget is a free utility – available for Mac, Windows and Linux (included) – that can help you accomplish all this and more. What makes it different from most download managers is that wget can follow the HTML links on a web page and recursively download the files. It is the same tool that a soldier had used to download thousands of secret documents from the US army’s Intranet that were later published on the Wikileaks website. | |
| You mirror an entire website with wget | |
| Mirror an entire website with wget | |
| Spider Websites with Wget – 20 Practical Examples | 
| -------------------------------------------------------------------------------- | |
| -- Unsupported Spaces extension. Uses private APIs but works okay. | |
| -- (http://github.com/asmagill/hammerspoon_asm.undocumented) | |
| spaces = require("hs._asm.undocumented.spaces") | |
| -- Get output of a bash command | |
| function os.capture(cmd) | |
| local f = assert(io.popen(cmd, 'r')) | |
| local s = assert(f:read('*a')) | |
| f:close() | 
