Skip to content

Instantly share code, notes, and snippets.

Dan Streeter danstreeter

Block or report user

Report or block danstreeter

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View outputXmlNicely.php
<?php
/* To output XML as a nicely formatted (line breaks and indentations) on screen */
$doc = new \DOMDocument('1.0');
$doc->loadXML($rawXml);
$doc->preserveWhiteSpace = false;
$doc->formatOutput = true;
$xml_string = $doc->saveXML();
echo $xml_string;
@danstreeter
danstreeter / getMysqlTableVersionsFromFrmFiles.sh
Created May 15, 2019
Find MySQL Table Versions from raw versions
View getMysqlTableVersionsFromFrmFiles.sh
for file in *.frm; do echo $file" : "$(hexdump -s 0x33 -n 2 -v -d *.frm | head -1 | rev | awk '{$1=$1};1' | cut -d" " -f1 | rev); done;
@danstreeter
danstreeter / nginx.conf
Created Feb 1, 2019
Nginx Config block for PHP-FPM Status and Ping page requests
View nginx.conf
location ~ ^/(status|ping)$ {
allow 127.0.0.1;
log_not_found off;
access_log off;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_pass php:9000;
# fastcgi_pass unix:/var/run/php7.2-fpm.sock;
}
@danstreeter
danstreeter / Alfred-VSCodeWorkspaces.py
Created Dec 23, 2018
Alfred 3 Workflow to list and open VSCode Workspaces.
View Alfred-VSCodeWorkspaces.py
from os import listdir
from os.path import isfile, join, expanduser
import json
import copy
new_list = list()
new_file_dict = {
"uid": "",
"path": "",
"title": "",
@danstreeter
danstreeter / docker-compose.yml
Created May 27, 2018
Laravel Mix Docker-Compose Asset Compilation
View docker-compose.yml
npm-watch:
image: node:8.11.1
volumes:
- ./:/home/node/app
working_dir: /home/node/app
restart: unless-stopped
command: ['npm', 'run', 'watch']
View keybase.md

Keybase proof

I hereby claim:

  • I am danstreeter on github.
  • I am mrstreeter (https://keybase.io/mrstreeter) on keybase.
  • I have a public key ASD8wSefM39BVYMZS3qa5nPB_PWx0RIATQxY9KKnjFwONgo

To claim this, I am signing this object:

View docker-wordpress-quickstack.sh
# Can be used to quickly spin up Wordpress and MySQL containers for testing something quickly.
# uploads.ini content - Write this to a file local to your running docker command, removing the hashes.
# file_uploads = On
# memory_limit = 64M
# upload_max_filesize = 64M
# post_max_size = 64M
# max_execution_time = 600
View gist.php
<?php
// This is a test gist to test automated implementations into other systems
namespace danstreeter;
class gisttester {
public function __construct($greeting = "hello")
{
You can’t perform that action at this time.