Skip to content

Instantly share code, notes, and snippets.

View jamespo's full-sized avatar
🏠
Working from home

J.P jamespo

🏠
Working from home
View GitHub Profile
@jamespo
jamespo / zip2lha.sh
Created May 3, 2020 07:50
zip2lha.sh - convert zip files (for WHDLOAD) into lha for retropie / amiberry
#!/bin/bash
# zip2lha.sh - convert zip files (for WHDLOAD) into lha for retropie / amiberry
# USAGE: zip2lha.sh zipfilename.zip
# or to do whole directory: find . -name '*.zip -exec zip2lha.sh {} \;
# set TMPDIR & DESTDIR in script
# REQUIREMENTS: unzip & jlha-utils (NOT lha package) on raspbian
# BE CAREFUL! This script removes contents of TMPDIR after each conversion
FN=$1
@jamespo
jamespo / parsephpchain.py
Created June 29, 2012 20:45
parse phpchain xml export to csv format for import by keepass 2
#!/usr/bin/env python
# -*- coding:utf-8 -*-
'''parsephpchain.py - parse phpchain XML export to CSV'''
import xml.etree.ElementTree as ET
import sys
def parse(file):
tree = ET.parse(file)
@jamespo
jamespo / footssh.sh
Created April 24, 2022 13:04
Shell function & alias to stop foot terminal confusing ssh
footssh()
{
if [[ $TERM = "foot" ]]; then
TERM=linux ssh $@
else
ssh $@
fi
}
alias ssh=footssh
{
"FAUXMO": {
"ip_address": "AUTO"
},
"PLUGINS": {
"SimpleHTTPPlugin": {
"DEVICES": [
{
"port": 12340,
"off_cmd": "http://192.168.1.107/admin/api.php?disable=600&auth=YOUR_AUTH_CODE",
@jamespo
jamespo / ibroadcast-uploader.py
Created February 15, 2024 12:44
Patched version of ibroadcast-uploader.py that skips synology @eadir
#!/usr/bin/env python
import requests
import json
import glob
import os
import hashlib
import sys
import traceback