This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Use HTTP Basic Authentication for verification | |
$username = 'admin'; | |
$password = 'Passw0rd!'; // Please use your own password!! | |
// Check if the client has provided correct credentials | |
if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] !== $username || $_SERVER['PHP_AUTH_PW'] !== $password) { | |
// Send authentication request headers | |
header('WWW-Authenticate: Basic realm="Restricted Area"'); | |
header('HTTP/1.0 401 Unauthorized'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
#git-cache-meta -- simple file meta data caching and applying. | |
#Simpler than etckeeper, metastore, setgitperms, etc. | |
# 2014-02-25 change filetime from accessed time to modifpeied time by cojad | |
# 2012-03-05 - added filetime, andris9 | |
#modified by n1k | |
# - save all files metadata not only from other users | |
# - save numeric uid and gid | |
#from http://www.kerneltrap.org/mailarchive/git/2009/1/9/4654694 |