Skip to content

Instantly share code, notes, and snippets.

Avatar

Lasse Andersen weednation12

  • Chopenhagen, Denmark
View GitHub Profile
@weednation12
weednation12 / https.php
Created Oct 16, 2017
PHP HTTP -> HTTPS
View https.php
<?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();
}
?>
@weednation12
weednation12 / startb
Last active Sep 16, 2016
Raspberry Pi Kiosk-Mode, Remember to "sudo nano /etc/rs.local" and "sudo xinit ./home/pi/startB &" before exit
View startb
#!/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