Skip to content

Instantly share code, notes, and snippets.


jhuesser jhuesser

View GitHub Profile
jhuesser / siriwrapper.php
Created Sep 18, 2018
A quick and dirty json parser for to use it with siri shortcuts
View siriwrapper.php
$departure = "8573710"; // ID of departure
$destination = "8503504"; // ID of destination
// use param transportations[] to filter transport type (train, tram, bus, etc.
$url = "". $departure . " . &to=" . $destination . "&date=" . date('Y-m-d');
$result = json_decode(file_get_contents($url));
// connections[0] seems to be to early, a quick and dirty fix
mkdir -p $backupdir
function getDir {
read -p "Enter the absolute path to the directory: " path
if [ "$(id -u)" != "0" ]; then
echo "Please use sudo"
echo "ERROR: You are not root."
exit 1
apt-get update
apt-get -y install omxplayer
jhuesser / shutdown.scpt
Created Jan 22, 2016
Shutdown your mac on time
View shutdown.scpt
--Shutdown your mac
--by Jonas Hüsser
set timeQuery to 1
--This value is used to stop the repeat
repeat until timeQuery is 0 --start repeat
set HH to ((get time of (current date)) / 3600)
set HH to round HH rounding down
set MM to (((get time of (current date)) - HH * 3600) / 60)
set MM to round MM rounding down
jhuesser / index.html
Last active Jan 22, 2016
Header YT link
View index.html
<meta name="google-site-verification" content="xjhflajsjfdlkjwqoejroiflkhsdkfjöowkljendas" />
<!--Seiteninhalt -->
View imageScaler.scpt
-- Script by Apple Inc.
-- Modified by Jonas Huesser
-- 8th dec 2014
set boo to 0 -- boolean value
set n to 0 -- counter value
repeat until boo is 1
display dialog "How many files do you want to scale?" default answer "1" buttons {"Cancel", "Next"} default button 2 with title "Enter an integer" with icon note -- ask how many files to scale
You can’t perform that action at this time.