Skip to content

Instantly share code, notes, and snippets.

View jhuesser's full-sized avatar

jhuesser jhuesser

View GitHub Profile
-- Script by Apple Inc.
-- Modified by Jonas Huesser
-- 8th dec 2014
-- http://jonas.xn--hsser-kva.ch
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
@jhuesser
jhuesser / index.html
Last active January 22, 2016 21:48
Header YT link
<html>
<head>
<meta name="google-site-verification" content="xjhflajsjfdlkjwqoejroiflkhsdkfjöowkljendas" />
<title>Titel</title>
</head>
<body>
<!--Seiteninhalt -->
</body>
</html>
@jhuesser
jhuesser / shutdown.scpt
Created January 22, 2016 22:02
Shutdown your mac on time
--Shutdown your mac
--by Jonas Hüsser
--https://www.hüsser.ch/jonas/mac-zeitgesteuert-ausschalten/
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
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "Please use sudo configure_sound.sh."
echo "ERROR: You are not root."
exit 1
fi
apt-get update
apt-get -y install omxplayer
#!/bin/bash
backupdir="/BACKUP/"
mkdir -p $backupdir
latestbak=${backupdir}/latest/
function getDir {
read -p "Enter the absolute path to the directory: " path
}
@jhuesser
jhuesser / siriwrapper.php
Created September 18, 2018 13:54
A quick and dirty json parser for opentransportdata.ch to use it with siri shortcuts
<?php
$departure = "8573710"; // ID of departure
$destination = "8503504"; // ID of destination
// use param transportations[] to filter transport type (train, tram, bus, etc.
$url = "http://transport.opendata.ch/v1/connections?from=". $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
@jhuesser
jhuesser / docker-compose.yml
Created January 22, 2021 18:56
docker compose let's encrypt Nginx
version: '3'
networks:
ext:
volumes:
certs:
vhosts:
html:
services:
nginxproxy:
image: jwilder/nginx-proxy