Skip to content

Instantly share code, notes, and snippets.

View matthewflannery's full-sized avatar

Matthew Flannery matthewflannery

View GitHub Profile

Keybase proof

I hereby claim:

  • I am synthetec on github.
  • I am mflannery (https://keybase.io/mflannery) on keybase.
  • I have a public key ASBdrTkX4kG6h6Gzydd6pZYI4Bxh6jy0u6TZsImfSo6yGgo

To claim this, I am signing this object:

@matthewflannery
matthewflannery / init.pp
Created August 9, 2016 16:14
Elegant way of handling multiple pool/sites IIS with Puppet
class iis_server (
$log_dir = 'E:\logs',
$app_dir = 'E:\apps',
Array[Hash] $site_instances = []
) {
# FYI, IIS allows pools of websites to be run in their own process and pool can have many sites
# IIS sites can also have many applications that run under the site context
Class['iis_server::install'] -> Class['iis_server::defaults']
@matthewflannery
matthewflannery / reflectrequest.py
Created November 9, 2016 05:44
From Defcon 18 - Constricting the Web: Offensive Python for Web Hackers
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
request_path = self.path
print("\n----- Request Start ----->\n")
// Get siblings of DOM node
function siblings(selector) {
let element = document.querySelector(selector)
let childElements = Array.from(element.parentNode.children)
return childElements.filter(child => child !== element)
}
// Find closest DOM node
function closest(element, query) {
#XLarge DBInstanceClassMemory = 15892177440 = 14.8GB
#/32 = 496630545 = 473MB
#/64 = 248315272 = 236MB
#/128 = 124157636 = 118MB
#/256 = 62078818 = 59MB
#/512 = 31039409 = 29MB
#/12582880 = 1263 #default same divisor as max_connections = 4041.6MB = 4237924762
#/25165760 = 623 # half of max_connections = 1993.6MB
#/50331520 = 315 # quarter of max_connections = 1008MB = 1056964608
#*(3/4) #default innodb pool size = 11922309120