This file contains hidden or 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
-- Minimally modified from: | |
-- http://www.insanelymac.com/forum/topic/59163-detect-displays-by-command-or-script/?p=457644 | |
activate application "System Preferences" | |
tell application "System Events" | |
tell application process "System Preferences" | |
tell window 1 | |
click button "Show All" of group 1 of group 2 of toolbar 1 (* in case another pane is already open *) | |
tell button "Displays" of scroll area 1 | |
repeat until exists (* wait until the object is accessible *) | |
delay 0.2 |
This file contains hidden or 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 | |
"""argparse_logger.py | |
Example script showing a way to increase logging verbosity with argparse and | |
the logging module. | |
https://docs.python.org/2/library/logging.html#logging-levels | |
Usage: | |
- `python3 argparse_logger.py` |
This file contains hidden or 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 | |
# -*- coding: utf-8 -*- | |
"""pyscript.py | |
A simple python script template. | |
http://ajminich.com/2013/08/01/10-things-i-wish-every-python-script-did/ | |
""" | |
import argparse | |
This file contains hidden or 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
{ | |
"bridge": { | |
"name": "Homebridge", | |
"username": "CC:22:3D:E3:CE:30", | |
"port": 51826, | |
"pin": "031-45-154" | |
}, | |
"description": "Example config file to test with a homebridge-dummy switch.", |
This file contains hidden or 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
Desired=Unknown/Install/Remove/Purge/Hold | |
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend | |
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) | |
||/ Name Version Architecture Description | |
+++-=====================================-=========================================-============-=============================================================================== | |
ii acl 2.2.52-2 armhf Access control list utilities | |
ii adduser 3.113+nmu3 all add and remove users and groups | |
ii adwaita-icon-theme 3.14.0-2 all default icon theme of GNOME | |
ii alacarte 3.11.91-2+rpi1 all easy GNOME menu editing tool | |
ii alsa-base 1.0.27+1 |
This file contains hidden or 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
Desired=Unknown/Install/Remove/Purge/Hold | |
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend | |
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) | |
||/ Name Version Architecture Description | |
+++-==============================-==========================-============-=============================================================================== | |
ii acl 2.2.52-2 armhf Access control list utilities | |
ii adduser 3.113+nmu3 all add and remove users and groups | |
ii alsa-utils 1.0.28-1 armhf Utilities for configuring and using ALSA | |
ii apt 1.0.9.8.1 armhf commandline package manager | |
ii apt-utils 1.0.9.8.1 armhf package management related utility programs |
This file contains hidden or 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
Desired=Unknown/Install/Remove/Purge/Hold | |
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend | |
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) | |
||/ Name Version Architecture Description | |
+++-=====================================-=======================================-============-============================================================================ | |
ii adduser 3.113+nmu3 all add and remove users and groups | |
ii alsa-base 1.0.25+3~deb7u1 all ALSA driver configuration files | |
ii alsa-utils 1.0.25-4 armhf Utilities for configuring and using ALSA | |
ii apt 0.9.7.9+rpi1+deb7u7 armhf commandline package manager | |
ii apt-utils 0.9.7.9+rp |
This file contains hidden or 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 | |
# get_nodejs.sh | |
# Quick script to help me download and install latest nodejs 4.x on my | |
# Raspberry Pi B+. May require sudo / root permissions depending on what | |
# destination directories (`node_dest`) you use. Don't forget to `chmod +x` the | |
# script. | |
set -euf -o pipefail |
This file contains hidden or 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
// mint_date_range.js | |
// https://mint.lc.intuit.com/questions/948537-mint-faq-how-can-i-view-transactions-within-a-specific-date-range | |
// jsmin <mint_date_range.js | |
// | |
// Copy the minified version below into a bookmarklet | |
// javascript:(function(){var currentUrl=window.location.href;var destUrl="https://wwws.mint.com/transaction.event?";var today=new Date();var today_str=today.getMonth()+1+"/"+today.getDate()+"/"+today.getFullYear();var startDate=prompt("Start Date? Format: MM/DD/YYYY","");var endDate=prompt("End Date? Format: MM/DD/YYYY",today_str);destUrl+="&startDate="+startDate+"&endDate="+endDate;if(currentUrl.indexOf("wwws.mint.com")>-1){location.href=destUrl;}else{window.open(destUrl);}})(); | |
var currentUrl = window.location.href; | |
var destUrl = "https://wwws.mint.com/transaction.event?"; |
This file contains hidden or 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
"""chrome_se_export.py | |
Export your Chrome search engines to JSON. | |
""" | |
import os.path | |
import sqlite3 | |
import re | |
import json | |
import click |