Skip to content

Instantly share code, notes, and snippets.

View syntaxseed's full-sized avatar
😁

SyntaxSeed syntaxseed

😁
View GitHub Profile
@syntaxseed
syntaxseed / passHash.php
Last active September 30, 2023 13:19
Legacy Password Hashing (Do not Use)
<?php
class PassHash {
//blowfish
private $algo = '$2a';
// cost paramter
private $cost = '$10';
private $salt = '';
@syntaxseed
syntaxseed / fetch-files.php
Created October 21, 2021 15:09
PHP: Fetch files from above the web root.
<?php
/******************************************************************
* This script will stream files that are stored above the web root.
* Public domain. Author: Sherri Wheeler. SyntaxSeed.com.
* Provided "as is" with no warranty.
*******************************************************************/
// CHECK FOR MEMBER LOGGED IN HERE, or include this into a file
// which already checks for member logged in.
@syntaxseed
syntaxseed / php-barchart.php
Last active October 21, 2021 15:07
Simple bar chart function in PHP.
<?php
// A PHP function to output simple HTML/CSS bar charts.
// Usage:
makeBarChart(Array("J", "F", "M", "A", "M"), Array(5000, 11200, 14580, 13000, 17400), 20000, 0, "DOLLARS");
/* Function makeBarChart
* $xAxis - Array of string labels for the bars that appear along the bottom axis.
* $yAxis - Array of numeric values for the height of the bars. Treated as float values.
@syntaxseed
syntaxseed / apache-wildcard-sites
Last active May 10, 2021 19:40
Set Up Local Wildcard Apache Sites
1) Add to your /etc/hosts file, one line per site/project.
```
127.0.0.1 project1.dev.test
127.0.0.1 sandbox.dev.test
127.0.0.1 slim.dev.test
```
2) Set up a wildcard in Apache2's sites:
[Desktop Entry]
Encoding=UTF-8
Name=Tilix Term
Comment=Launch Tilix
Exec=tilix --session /home/sherriw/Applications/Tilix/Sessions/default.json
Icon=com.gexperts.Tilix
Type=Application