Skip to content

Instantly share code, notes, and snippets.


Lewis Cowles Lewiscowles1986

View GitHub Profile
jessfraz / boxstarter.ps1
Last active Aug 12, 2022
Boxstarter Commands for a new Windows box.
View boxstarter.ps1
# Description: Boxstarter Script
# Author: Jess Frazelle <>
# Last Updated: 2017-09-11
# Install boxstarter:
# . { iwr -useb } | iex; get-boxstarter -Force
# You might need to set: Set-ExecutionPolicy RemoteSigned
# Run this boxstarter by calling the following from an **elevated** command-prompt:
View google-dorks-2015.txt
intitle:index.of .bash_history
intitle:index.of .sh_history
intitle:"Index of" index.html.bak
intitle:"Index of" index.php.bak
intitle:"Index of" index.jsp.bak
intitle:"Index of" ".htpasswd" htpasswd.bak
inurl:backup intitle:index.of inurl:admin
"Index of /backup"
intitle:"Index of" index.html~
intitle:"Index of" index.php~
jlong / uri.js
Created Apr 20, 2012
URI Parsing with Javascript
View uri.js
var parser = document.createElement('a');
parser.href = "";
parser.protocol; // => "http:"
parser.hostname; // => ""
parser.port; // => "3000"
parser.pathname; // => "/pathname/"; // => "?search=test"
parser.hash; // => "#hash"; // => ""
lyshie / config-deb-i386.json
Last active Aug 7, 2022
Scratch Desktop (Scratch 3.0 Offline Editor) on GNU/Linux
View config-deb-i386.json
"src": "/tmp/scratch-desktop/",
"dest": "/tmp/",
"arch": "i386",
"icon": "/tmp/scratch-desktop/resources/Icon.png",
"categories": [
yoavniran /
Last active Aug 6, 2022
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
QuantumGhost / example.puml
Last active Aug 5, 2022
A simple template for PlantUML to draw ER diagram.The basic idea comes from
View example.puml
' uncomment the line below if you're using computer with a retina display
' skinparam dpi 300
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
' we use bold for primary key
' green color for unique
' and underscore for not_null
!define primary_key(x) <b>x</b>
!define unique(x) <color:green>x</color>
!define not_null(x) <u>x</u>
cheynewallace / ExportSchema.ps1
Last active Aug 2, 2022
Export MSSQL schema with PowerShell. This script will export your schema definitions for tables, stored procs, triggers, functions and views to .sql files
View ExportSchema.ps1
# Usage: powershell ExportSchema.ps1 "SERVERNAME" "DATABASE" "C:\<YourOutputPath>"
# Start Script
Set-ExecutionPolicy RemoteSigned
# Set-ExecutionPolicy -ExecutionPolicy:Unrestricted -Scope:LocalMachine
function GenerateDBScript([string]$serverName, [string]$dbname, [string]$scriptpath)
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null
magnetikonline /
Last active Aug 2, 2022
Setting Nginx FastCGI response buffer sizes.
glombard /
Created Dec 9, 2014
Python anonymous object
# Sometimes it's handy to create small anonymous objects instead of explicitly defining a class for it, especially while prototyping.
def new(name, data):
return type(name, (object,), data)
person = new('Person', { 'name': 'Joe', 'age': 30 })
ciaranmcnulty /
Last active Jul 27, 2022
Notes on using Docker on ARM Macs (November 2021)

Docker for Mac

On M1 machines, Docker for Mac is running a lightweight linux ARM VM, then running containers within that, so containers are essentially running natively. Don't be fooled by the fact the UI or binary CLI tools (e.g. docker) might require Rosetta.

Within that VM is an emulation layer called QEmu. This can be used by docker to run Intel containers. This does not use Rosetta at all, and has a roughly 5-6X performance penalty. (If you just upgraded your CPU this may result in a similar performance to your old machine!)

Pulling and running with Docker

Many images in public registries are multi-architecture. For instance at the time of writing on Docker Hub the php:8.0-cli image has the following digests: