Skip to content

Instantly share code, notes, and snippets.

View quinncomendant's full-sized avatar

Quinn Comendant quinncomendant

View GitHub Profile
View gist:96bbf89a579f763884ceb0b434d73b36
# SPECIFIC: Block #submit #validate #process #pre_render #post_render #element_validate #after_build #value_callback parameters
SecRule REQUEST_FILENAME "(index\.php|\/$)" "chain,id:003294,t:lowercase,t:none,t:utf8toUnicode,t:urlDecodeUni,t:urldecode,block"
SecRule ARGS_NAMES|REQUEST_COOKIES_NAMES "^\#(submit|validate|pre_render|post_render|element_validate|after_build|value_callback|process)$|\[(?:\'|\")?#(submit|validate|pre_render|post_render|element_validate|after_build|value_callback|process)"
# GENERIC: Block all parameters starting with #
SecRule REQUEST_FILENAME "(index\.php|\/$)" "chain,id:003309,t:lowercase,t:none,t:utf8toUnicode,t:urlDecodeUni,t:urldecode,block"
koenrh /
Last active November 6, 2023 11:42
Running Hashcat on Google Cloud's new GPU-based VMs

Running Hashcat on Google Cloud's GPU-based VMs

In February 2017, Google announced the availability GPU-based VMs. I spun up a few of these instances, and ran some benchmarks. Along the way, I wrote down the steps taken to provision these VM instances, and install relevant drivers.

Update April 2019: Updated instructions to use instances with the Tesla T4 GPUs.

jeteon / google-maps-data-parser.js
Last active November 17, 2023 06:49
NodeJS script to parse the Google Maps "data" URL attribute into an array.
View google-maps-data-parser.js
'use strict';
* Basic code to parse the values in the "data" attribute in a Google Maps URL to an Array.
* There will likely still be some work to do to interpret the resulting Array.
* Based on information from:
CMCDragonkai /
Last active December 1, 2023 16:57
Regular Expression Engine Comparison Chart

Regular Expression Engine Comparison Chart

Many different applications claim to support regular expressions. But what does that even mean?

Well there are lots of different regular expression engines, and they all have different feature sets and different time-space efficiencies.

The information here is just copied from:

greim /
Last active August 23, 2022 10:12
Using a Reverse Proxy for Rapid Prototyping

Using a Reverse Proxy for Rapid Prototyping

Note: This will be a contrived example, but hopefully illustrates some real-world trade-offs.

Example scenario: Suppose you're an independent web developer, and a client asks you to prototype a redesign of their website header. You'll be paid for your time, and if the client likes it, you'll be hired to do the full implementation. Your incentive is to show the client a quick, functional demo of the updated header. The problem is that quick and functional tend to be mutually-exclusive.

At One Extreme: Do It Fast

twksos / CiscoVPNConnection.scpt
Last active July 31, 2023 20:50
Cisco VPN connection auto connect AppleScript
View CiscoVPNConnection.scpt
-- Please set your vpn connection name and password here
set VPNName to "VPN name"
set VPNpassword to "VPN password"
tell application "System Events"
tell current location of network preferences
set VPNService to service VPNName
end tell
set isConnected to connected of current configuration of VPNService
younes0 / RateLimitSubscriber.php
Last active December 4, 2015 09:13
Rate Limit Subscriber for Guzzle 4.x + Laravel
View RateLimitSubscriber.php
* Todo: Decouple from Laravel's Caching system
use GuzzleHttp\Collection;
use GuzzleHttp\Event\BeforeEvent;
use GuzzleHttp\Event\CompleteEvent;
use GuzzleHttp\Event\EmitterInterface;
cviebrock / select2-foundation5.css
Created December 20, 2013 15:56
Select2 CSS for Zurb Foundation 5
View select2-foundation5.css
Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
.select2-container {
margin: 0 0 1rem 0;
position: relative;
vertical-align: middle;
font-family: inherit;
-webkit-appearance: none !important;
font-size: 0.875rem;
dergachev /
Last active November 18, 2023 22:29
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF


To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

mickm /
Created November 21, 2012 20:21
Whitelist Pingdom probe-servers in iptables.
# Whitelist Pingdom probe-servers in iptables.
# Create a chain called "PINGDOM" and jump to it somewhere before
# the final REJECT/DROP, e.g.
# # New chain for Pingdom rules
# :PINGDOM - [0:0]