Skip to content

Instantly share code, notes, and snippets.

View patrickfuller's full-sized avatar

Patrick Fuller patrickfuller

View GitHub Profile
patrickfuller /
Last active January 29, 2024 16:29
Enables local DNS resolution of Unifi aliases
When run in cron, automatically adds compliant alias names to local DNS.
Use at your own risk.
Patrick Fuller, 25 June 17
import re
import paramiko
import pymongo
DorkForce / scanScope.txt
Last active May 10, 2024 03:08
Console script - Search breakpoint model for value. SYNTAX: scanScope($scope.model, 'Fred');
console.log("Usage Syntax: scanScope(objectToScan, 'scanFor', ['whatToIgnore']); %c(whatToIgnore is optional and can be a string, or an array of strings) (scanScope can be shortened to ss)", 'color: red');
var abortAtLevel = 20,
callStack = 0,
errArray = [],
funArray = [],
scanLoop = function (whatToScan, scanValue, whatToIgnore, parentTree) {
scanValue = scanValue.toLowerCase();
if (Array.isArray(whatToIgnore)) {
whatToIgnore.forEach(function (ignoreVal) {
ignoreVal = lowerCase(ignoreVal);
cslarsen /
Created April 27, 2014 07:14
One way of sending raw Ethernet packets in Python
"""Demonstrates how to construct and send raw Ethernet packets on the
You probably need root privs to be able to bind to the network interface,
$ sudo python
from socket import *
timo22345 / flatten.js
Last active March 13, 2024 17:06
Flatten.js, general SVG flattener. Flattens transformations of SVG shapes and paths. All shapes and path commands are supported.
<!doctype html>
<title>Flatten.js, General SVG Flattener</title>
Random path and shape generator, flattener test base:
Basic usage example:
dergachev /
Last active July 17, 2024 14:20
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:

methane / gist:2185380
Created March 24, 2012 17:28
Tornado Example: Delegating an blocking task to a worker thread pool from an asynchronous request handler
from time import sleep
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
from tornado.web import Application, asynchronous, RequestHandler
from multiprocessing.pool import ThreadPool
_workers = ThreadPool(10)
def run_background(func, callback, args=(), kwds={}):
def _callback(result):
didip /
Created February 12, 2011 17:20
Generates secure cookie secret for Tornado Web Framework