-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9f9e31
commit 5adb187
Showing
7 changed files
with
127 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Binary file not shown.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
header( 'Content-Type-Options: nosniff' ); | ||
header( 'X-Content-Type-Options: nosniff' ); | ||
header( 'XSS-Protection: 1; mode=block' ); | ||
header( 'X-XSS-Protection: 1; mode=block' ); | ||
header( 'Vary: Accept-Encoding' ); | ||
header( 'Host: localhost' ); | ||
header( 'viewport: width=device-width' ); | ||
header( 'Accept-Language: en-US,en;q=0.5' ); | ||
header( 'Connection: Keep-alive' ); | ||
header( 'description: localhost' ); | ||
header( 'keywords: localhost' ); | ||
header("Location: ./eyeball.php"); | ||
?> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"index": "eyeball.php" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?php | ||
/* | ||
* Easy PHP Tail | ||
* by: Thomas Depole | ||
* v1.0 | ||
* | ||
* just fill in the varibles bellow, open in a web browser and tail away | ||
*/ | ||
$logFile = "./brain/thoughts/gource.log"; // local path to log file | ||
$interval = 1000; //how often it checks the log file for changes, min 100 | ||
$textColor = ""; //use CSS color | ||
|
||
|
||
|
||
// Don't have to change anything bellow | ||
if(!$textColor) $textColor = "white"; | ||
if($interval < 100) $interval = 100; | ||
if(isset($_GET['getLog'])){ | ||
echo file_get_contents($logFile); | ||
}else{ | ||
?> | ||
<html> | ||
<title>Log</title> | ||
<style> | ||
@import url(http://fonts.googleapis.com/css?family=Ubuntu); | ||
body{ | ||
background-color: black; | ||
color: <?php echo $textColor; ?>; | ||
font-family: 'Ubuntu', sans-serif; | ||
font-size: 16px; | ||
line-height: 20px; | ||
} | ||
h4{ | ||
font-size: 18px; | ||
line-height: 22px; | ||
color: #353535; | ||
} | ||
#log { | ||
position: relative; | ||
top: -34px; | ||
} | ||
#scrollLock{ | ||
width:2px; | ||
height: 2px; | ||
overflow:visible; | ||
} | ||
</style> | ||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script> | ||
<script> | ||
setInterval(readLogFile, <?php echo $interval; ?>); | ||
window.onload = readLogFile; | ||
var pathname = window.location.pathname; | ||
var scrollLock = true; | ||
|
||
$(document).ready(function(){ | ||
$('.disableScrollLock').click(function(){ | ||
$("html,body").clearQueue() | ||
$(".disableScrollLock").hide(); | ||
$(".enableScrollLock").show(); | ||
scrollLock = false; | ||
}); | ||
$('.enableScrollLock').click(function(){ | ||
$("html,body").clearQueue() | ||
$(".enableScrollLock").hide(); | ||
$(".disableScrollLock").show(); | ||
scrollLock = true; | ||
}); | ||
}); | ||
function readLogFile(){ | ||
$.get(pathname, { getLog : "true" }, function(data) { | ||
data = data.replace(new RegExp("\n", "g"), "<br />"); | ||
$("#log").html(data); | ||
|
||
if(scrollLock == true) { $('html,body').animate({scrollTop: $("#scrollLock").offset().top}, <?php echo $interval; ?>) }; | ||
}); | ||
} | ||
</script> | ||
<body> | ||
<h4><?php echo $logFile; ?></h4> | ||
<div id="log"> | ||
|
||
</div> | ||
<div id="scrollLock"> <input class="disableScrollLock" type="button" value="Disable Scroll Lock" /> <input class="enableScrollLock" style="display: none;" type="button" value="Enable Scroll Lock" /></div> | ||
</body> | ||
</html> | ||
<?php } ?> |