Skip to content

Instantly share code, notes, and snippets.

View zelon88's full-sized avatar
🏗️
Building!

Justin Grimes zelon88

🏗️
Building!
View GitHub Profile
@zelon88
zelon88 / LAMP_Install_Instructions_DEBIAN.txt
Created April 7, 2018 00:02
Debian LAMP Server Install Instructions
A solid install process for a capable LAMP server, adapted from https://https://github.com/zelon88/HRCloud2/How-To-Install-HRCloud2.txt.
-----STEP 1 - INSTALL APACHE 2.4-----
-sudo apt-get update
-sudo apt-get install apache2
-sudo apt-get install curl
--------------------------------------------------
-----STEP 2 - INSTALL MYSQL------
-sudo apt-get install mysql-server
@zelon88
zelon88 / Current_CPU_Freq.
Created November 5, 2017 04:05
Realtime Linux CLI CPU Frequency
#From https://stackoverflow.com/questions/1455988/commenting-in-bash-script
watch -n 0 "lscpu | grep 'MHz'"
@zelon88
zelon88 / The_Matrix.html
Created February 15, 2017 18:59
Simple HTML page that displays "The Matrix" in a browser.
<!DOCTYPE HTML>
<!-- This code was tweaked from https://github.com/MinhasKamal/CreepyCodeCollection to be a standalone file. -->
<head></head>
<body style="margin:0">
<canvas id="q" width="1920" height="1080">
@zelon88
zelon88 / LogIPandReturnIMG.php
Created December 27, 2016 06:16
Log client IP on <img> interaction w/PHP.
<?php
$Time = date("F j, Y, g:i a");
$LogFile = '/path/to/logfile.txt';
$ClientIP = $_SERVER['REMOTE_ADDR'];

Keybase proof

I hereby claim:

  • I am zelon88 on github.
  • I am zelon88 (https://keybase.io/zelon88) on keybase.
  • I have a public key whose fingerprint is 2F39 BEF8 8890 1E9C C696 F5CC 41E6 C5C1 7480 8FDB

To claim this, I am signing this object:

@zelon88
zelon88 / GetRemoteXLS.php
Created October 9, 2016 01:11
Made for a reddit post to help a user.
<?php
// / Specify a url to xml file.
$url = 'localhost/file.xls';
// / Define a function that downloads the xml file and returns only the lines of text within it.
function getRemoteData($url) {
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
<form action="TeachingKids.php" method="post">
<p>Name: <input type='text' id='name' name='name' value=''>
<input type="submit"></p>
</form>
<p>
<?php
// Teaching my kids how to code.
$name = $_POST['name'];
$awesomeboys = array('boy', 'dad');
@zelon88
zelon88 / DivScraperNOCURL.php
Last active July 4, 2016 02:08
Display a div from a static webpage with PHP, no CuRL.
<?php
// / This file will load a static page and return a specified div.
// / The strings for $divStart and $divEnd must by IDENTICAL to the
// / way they are displayed in the $divLocation.
$divLocation = file_get_contents('http://somepage.com/somepage.html');
$divStart = '{?><div id=whatever><?php}';
$divEnd = '{something-unique-to-the-end-of-div-whatever}';
$delimiter = '#';
$divData = $delimiter . preg_quote($divStart, $delimiter)
@zelon88
zelon88 / file-sorting-by-date.php
Created July 4, 2016 00:41
Kirby File Sorting by Date
<?php
//Save to site/plugins/file-sorting-by-date.php
kirby()->hook('panel.file.upload', 'uploaddatesort');
kirby()->hook('panel.file.replace', 'sortfiles');
function setdate($file) {
//Reference Date Options:
//"today": Current date.
@zelon88
zelon88 / CloudIndexer.php
Last active July 2, 2016 04:21
Redirect users based on device or screen size
<!DOCTYPE html>
<title>Cloud Authentication</title>
<html lang="en-US">
<html>
<body>
<div align="center"><h1>Configuring your Cloud Drive ...</h1></div>
<div align="center"><img src="http://localhost/wp-content/uploads/2016/03/Cloud-Banner.png" alt="HonestRepair Cloud Storage"</div>
<div align="center"><img src="http://localhost/HRProprietary/pacman.gif" alt="PacMan is gathering information!" height="24" width="24"></div>
<div align="center"><strong>Please wait while we authenticate your account and adjust the Cloud to your device...</strong></div>