Skip to content

Instantly share code, notes, and snippets.

View danstreeter's full-sized avatar

Dan Streeter danstreeter

View GitHub Profile
@danstreeter
danstreeter / scan-redis.js
Last active July 26, 2024 14:55 — forked from alexander-schranz/scan-redis.js
Scan all keys in redis insight
/*
* Run the following script in browser dev tools when having redis insight open
* to continue searching for the keypattern until the scan is completed
*
* Changelog
* 2022-08-23 - danstreeter - Update to make work in RedisInsightv2 `2.6.0` (Note TODO)
*/
var clickIntervalId = setInterval(
() => {
var button = document.querySelector('[data-testid=scan-more');
@danstreeter
danstreeter / README.md
Created April 23, 2022 19:07
AWS Certified Solutions Architect - Associate 2020 (PASS THE EXAM!) - Youtube Video Section Links

AWS Certified Solutions Architect - Associate 2020 (PASS THE EXAM!) - Youtube Video Section Links

This page is to provide an easy to read/find section link to the youtube video found at https://www.youtube.com/watch?v=Ia-UEYYR44s

The section timings were taken directly from the source video comments by the original author.


☁️ Introduction

@danstreeter
danstreeter / ssh-no-key
Created February 28, 2020 18:42
Connect to a SSH server envforicng password authenticaiton (ignoring keys)
ssh -o PasswordAuthentication=yes -oPreferredAuthentications=keyboard-interactive,password -o PubkeyAuthentication=no user@server
<?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 15:19
Find MySQL Table Versions from raw versions
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 February 1, 2019 13:38
Nginx Config block for PHP-FPM Status and Ping page requests
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 December 23, 2018 19:56
Alfred 3 Workflow to list and open VSCode Workspaces.
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 14:33
Laravel Mix Docker-Compose Asset Compilation
npm-watch:
image: node:8.11.1
volumes:
- ./:/home/node/app
working_dir: /home/node/app
restart: unless-stopped
command: ['npm', 'run', 'watch']

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:

@danstreeter
danstreeter / docker-wordpress-quickstack.sh
Created May 5, 2018 09:16
Local Wordpress QuickStack
# 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