Skip to content

Instantly share code, notes, and snippets.

View bytenik's full-sized avatar

David Pfeffer bytenik

View GitHub Profile
@balbuf
balbuf / zenfolio-photo-downloader.js
Last active December 16, 2024 13:40 — forked from robwalkerco/zenfolio-photo-downloader.js
Zenfolio photo downloader
(async () => {
const link = document.createElement('a');
document.body.appendChild(link);
// loop through matching images
for (const image of document.querySelectorAll('.pv-inner img:first-child')) {
const path = image.style.backgroundImage.split('"')[1].replace(/-\d.jpg/, '-5.jpg');
// filename of the image
link.download = new URL(path).pathname.replace(/^.*\//, '');
// fetch the image, convert it to a data URL, set as the href of the link element
@rmtsrc
rmtsrc / raspberry-pi-cec-client.md
Created May 13, 2019 09:49
Using cec-client on a Raspberry Pi to control TV power and inputs via HDMI

Using cec-client on a Raspberry Pi

Most modern HDMI connected devices support Consumer Electronics Control (CEC). It allows devices to send commands to each other, typically to get the TV to switch input and control volume. If you have ever turned on a Game Console and had your TV automatically change input to that device you have seen CEC in action. It is very convenient and useful, sort of a universal remote that works.

Every manufacturer seems to have it’s own branding of CEC (e.g. Samsung Anynet+, LG SimpLink, Sharp Aquos Link) but it may need to be enabled. Check your manual for details.

Using a Raspberry Pi connected to a TV that supports CEC, you can use the command line cec-client application to control the inputs and the TV itself. These are notes on how to use cec-client and understand the different options.

Details

@chunter
chunter / pageant-autoload-keys-at-startup.txt
Created June 20, 2017 10:51
Make Pageant autoload keys at startup
To make Pageant automatically run and load keys at startup:
- Find the location of pageant.exe
- Windows key + R to open the 'run' dialog box
- Type: 'shell:startup' in the dialog box
- Create a shortcut to the pageant.exe and put into this startup folder.