Skip to content

Instantly share code, notes, and snippets.

View weednation12's full-sized avatar

Lasse Andersen weednation12

  • Chopenhagen, Denmark
View GitHub Profile
@weednation12
weednation12 / startb
Last active September 16, 2016 08:35
Raspberry Pi Kiosk-Mode, Remember to "sudo nano /etc/rs.local" and "sudo xinit ./home/pi/startB &" before exit
#!/bin/sh
xset -dpms # disable DPMS (Energy Star) features.
xset s off # disable screen saver
xset s noblank # don't blank the video device
matchbox-window-manager -use_cursor no -use_titlebar no &
WEBKIT_DISABLE_TBS=1 epiphany-browser -a --profile /home/pi/.config http://site
@weednation12
weednation12 / https.php
Created October 16, 2017 22:29
PHP HTTP -> HTTPS
<?php
if(empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "off"){
$redirect = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header('HTTP/1.1 301 Moved Permanently');
header('Location: ' . $redirect);
exit();
}
?>