Skip to content

Instantly share code, notes, and snippets.

Simon Jenny simonjenny

Block or report user

Report or block simonjenny

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View clean.sh
#!/bin/bash
find . -name '.DS_Store' -type f -delete
@simonjenny
simonjenny / nothing
Created May 8, 2019
Convert Audible
View nothing
brew install chromedriver ffmpeg
sudo easy_install pip
pip install selenium requests
git clone https://github.com/inAudible-NG/audible-activator
cd audible-activator
sed -i '' 's,chromedriver_path = "./chromedriver",chromedriver_path = "/usr/local/bin/chromedriver",' audible-activator.py
./audible-activator.py
ffmpeg -activation_bytes youractivationkey -i input.aax -c copy output.m4b
View nothing
sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Found this computer? Please contact XXXXX. Thank you."
@simonjenny
simonjenny / igit
Created Mar 13, 2019
Git all in one..
View igit
#!/bin/bash
if [ -z "$1" ]
then
echo "Commit Reason is empty"
exit 0
fi
~/Development/./clean.sh
git add .
git commit -m "$1"
git push
@simonjenny
simonjenny / lego.sh
Last active Mar 13, 2019
Find Lego building instructions by set number from the command line and open the PDF in the default browser
View lego.sh
#!/usr/bin/env bash
URL=$(curl --silent "https://www.lego.com//service/biservice/search?fromIndex=0&locale=en-US&onlyAlternatives=false&prefixText=${1}" | jq -r '.products[0].buildingInstructions[0].pdfLocation')
[[ -x $BROWSER ]] && exec "$BROWSER" "$URL"
path=$(which xdg-open || which gnome-open || which open) && exec "$path" "$URL"
echo "Error: Can't find default browser"
@simonjenny
simonjenny / phone
Created Jan 19, 2018
Fairytale Phone - Next Thing Co C.H.I.P Version
View phone
#!/usr/bin/python
import CHIP_IO.GPIO as GPIO
import math, sys, os
import subprocess
import socket
GPIO.setup("XIO-P7", GPIO.IN);
GPIO.setup("XIO-P6", GPIO.IN);
View create-a-pi.sh
#!/bin/bash
command -v pv >/dev/null 2>&1 || { echo "Dieses Script benötigt das Programm pv." >&2; exit 1; }
# Shell Script for creating a pi sd card iwth the latest Rasbian
# Author <simon.jenny@me.com> Simon Jenny
#
# -------------------------------------------
if [ "$1" == "" ]; then
echo "Drive Folder Parameter missing!"
echo "Usage : create-a-pi DRIVE (eg /dev/disk2)"
echo "Here are all your mounted drives:"
@simonjenny
simonjenny / phone.py
Last active Jun 4, 2019
Fairytale Phone
View phone.py
#!/usr/bin/python3
import RPi.GPIO as GPIO
import math, sys, os
import subprocess
import socket
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP)
@simonjenny
simonjenny / midi
Last active Aug 29, 2015
Make a Christmas Tree Blink with Midi Files :)
View midi
#!/usr/bin/php
<?php
// Ip of ETH008 Board
$ip = "192.168.192.168";
$handle = popen("fluidsynth -i /usr/local/share/fluidsynth/GeneralUser\ GS\ FluidSynth\ v1.44.sf2 -v ".$argv[1]." 2>&1", 'r');
while (($line = fgets($handle)) !== false) {
if(strpos($line, "note") > 0){
//Parse Fluidsynth Output
$event = explode("\t",trim($line));
You can’t perform that action at this time.