Skip to content

Instantly share code, notes, and snippets.

View duracell80's full-sized avatar

Lee Jordan duracell80

  • Nashville, TN
View GitHub Profile
@duracell80
duracell80 / gist:168f780b293994578619916644848a07
Last active February 23, 2024 03:54
VR180 Photo Flatten Scripts for Lenovo Mirage Camera
#!/bin/bash
# Feel free to change filename to $1 and implement amd or nvida hwa
# sudo apt install intel-media-va-driver-non-free -- non-free needed to encode
GPU_INTEL=$(ffmpeg -hide_banner -loglevel error -encoders | grep h264_qsv | wc -l)
GPU_DRIVR=$(ffmpeg -hide_banner -loglevel error -h encoder=h264_qsv | grep -i "Supported hardware devices: qsv qsv qsv" | wc -l)
mkdir -p .meta
@duracell80
duracell80 / cast_hdradio.sh
Last active July 23, 2023 18:37
NRSC5, FM and HLS to Icecast MP3
# Send a HDRadio program (Hybrid Digital) to icecast for listening across network on audio apps and standalone internet radios without HDRadio tuners onboard
# https://github.com/theori-io/nrsc5
# sudo apt install icecast2
nrsc5 -q -d 0 107.5 0 -o - | ffmpeg -re -i pipe:0 -codec:a libmp3lame -b:a 192k -f mp3 -content_type audio/mpeg icecast://source:rdo@192.168.1.10:3345/hdradio
@duracell80
duracell80 / gist:888456a7fc9878963acdd50c8dd82596
Created July 15, 2023 22:53
HDHomeRun to Icecast - Audio Only
ffmpeg -re -i http://192.168.2.221:5004/auto/v4.1 -vn -codec:a libmp3lame -b:a 128k -f mp3 -content_type audio/mpeg icecast://source:yourpassword@192.168.x.x:3345/hd-4-1
@duracell80
duracell80 / pips.py
Last active July 6, 2023 07:15
BBC Pips Greenwhich Time Signal
#pip install pysinewave==0.0.7
from pysinewave import SineWave
def pips_bbc():
sinewave = SineWave(pitch = 23, decibels = -20)
pips = [0.1, 0.1, 0.1, 0.1, 0.1, 0.5]
for i in range(len(pips)):
sinewave.play(); time.sleep(float(pips[i]))
sinewave.stop(); time.sleep(float(1-pips[i]))
@duracell80
duracell80 / gist:b23f9f47dcca364df195f82a3d63b187
Created June 24, 2023 13:36
Python find active hosts on LAN
#!/usr/bin/python3
import os, socket
# Perform LAN scan
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("1.1.1.1", 80))
h = s.getsockname()[0].split(".")
h = str(h[0] + "." + h[1] + "." + h[2])
s.close()
@duracell80
duracell80 / ocean_digital_internet_radio_WR-26F.txt
Last active June 10, 2023 04:30
Ocean Digital Internet Radio WR-26F Web API
Can store 150 stations
favCapacity:150
Download favourites (stored stations as encrypted download, not plain text csv or pls)
http://xxx.xxx.x.xx/php/saveFav.php
Add local station as FM via favorites form input field
fm://9030/FM 90.30 MHz
Store a station:
@duracell80
duracell80 / install-pcsx2.sh
Created February 10, 2023 02:51
Compile PCSX2 for Linux Mint
# Flathub No No No
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh 14
sudo apt install cmake g++-10-multilib libaio-dev libasound2-dev libcairo2-dev libegl-dev \
libegl1-mesa-dev libgdk-pixbuf2.0-dev libgirepository-1.0-1 libgl-dev libgl1-mesa-dev \
libgl1-mesa-dri libgles-dev libgles-dev libgles2-mesa-dev libglib2.0-dev libglu1-mesa-dev \
@duracell80
duracell80 / yt-add.sh
Last active January 31, 2022 05:26
Faster youtube-dl
#!/bin/bash
echo "$1" >> ./yt-dl.txt
@duracell80
duracell80 / gist:f1d4b31712cd56bf24bc8d36cf7da74b
Created September 28, 2021 15:18
Liferay Content Page Edit Mode Detection
<script>
$( document ).ready(function() {
/* DON'T DO THIS IN EDIT MODE */
if (!$('body').hasClass('has-edit-mode-menu')) {
console.log("You're in Page View Mode");
} else {
@duracell80
duracell80 / liferay-navigation-adt-template.html
Created August 5, 2021 21:59
Liferay - ADT Navigation Widget Template Data Discovery
<!--${themeDisplay.getLayout().getLayoutSet().getGroup()}-->
${themeDisplay.getCompanyLogo()}
<#assign page_name = themeDisplay.getLayout().name
site_home = themeDisplay.getLayout().getLayoutSet().getGroup().friendlyURL
site_id = themeDisplay.getLayout().getLayoutSet().groupId
site_name = themeDisplay.getLayout().getLayoutSet().getGroup().name
site_logo_id = themeDisplay.getLayout().getLayoutSet().logoId
site_logo = themeDisplay.getCompanyLogo()