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 selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
packed_extension_path = '/path/to/packed/extension.crx' | |
options = Options() | |
options.add_extension(packed_extension_path) | |
driver = webdriver.Chrome(options=options) |
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 python | |
# | |
# gexiv2 image Exif date fixer. | |
# Corey Goldberg, 2014 | |
"""Recursively scan a directory tree, fixing dates | |
on all jpg/png image files. | |
Each file's Exif metadata and atime/mtime are all |
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 selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
unpacked_extension_path = '/path/to/unpacked/extension/' | |
options = Options() | |
options.add_argument('--load-extension={}'.format(unpacked_extension_path)) | |
driver = webdriver.Chrome(options=options) |
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 python | |
# Corey Goldberg, 2013 | |
import argparse | |
import pkgtools.pypi | |
""" | |
Command line script to lookup packages on Python Package Index (PyPI). |
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 bash | |
# Corey Goldberg 2018 | |
# | |
# download latest release of Selenium Standalone Server | |
# | |
# requires: | |
# * `curl` | |
# * `xpath` utility from the `XML::XPath` Perl module. On Debian, | |
# this is provided by the `libxml-xpath-perl` package. |
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 python | |
# | |
# image metadata remover and date fixer. | |
# Corey Goldberg, 2014 | |
"""Recursively scan a directory tree for image files, and fix metadata. | |
* removes all metadata (Exif, IPTC, XMP, GPS Info, comment, thumbnail) | |
* sets metadata and file timestamps to oldest datetime found. |
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
## scan music library and create M3U playlists | |
# example shell commands: | |
# 500 random MP3's | |
find /path/to/music -type f -iname "*.mp3" | shuf | head -n 500 > 500_playlist.m3u | |
# All MP3's and FLAC's, sorted | |
find /path/to/music -type f \( -iname '*.mp3' -o -iname '*.flac' \) | sort > full_playlist.m3u |
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 bash | |
# | |
# Installer for WebDrivers | |
# ------------------------ | |
# - Binary webdrivers are required to drive Firefox and Chrome browsers from Selenium. | |
# - This script will fetch the 64-bit binaries (geckodriver/chromedriver) for MacOS or Linux. | |
set -e | |
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 | |
""" | |
helloworld.py | |
Python3 and Qt5 | |
""" | |
from PyQt5 import QtWidgets | |
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 bash | |
# skip to next track on Squeezebox player via SlimServer/LogitechMediaServer | |
SQUEEZEBOX_SERVER='localhost:9000' # server host:port | |
SQUEEZEBOX_PLAYER='00:05:11:23:82:6e' # player MAC address | |
next () { | |
curl -sS -o /dev/null -X POST \ |