Skip to content

Instantly share code, notes, and snippets.

@rquigley
rquigley / whois.sh
Created October 26, 2015 11:51
Whois with lookup against registrar
#!/bin/bash
set -e
set -o pipefail
BIN="/usr/bin/whois"
DOMAIN=$1
echo "Fetching domain's whois server..."
RES=$($BIN $DOMAIN)
@rquigley
rquigley / jsperf_phantom.js
Created April 21, 2015 18:15
Run jsperf tests using phantomJS
/* global document, require, setTimeout, phantom, console */
var jsPerfTest = "for-loops-with-caching";
var page = require("webpage").create();
page.open("http://jsperf.com/" + jsPerfTest, function() {
"use strict";
setTimeout(function() {
page.evaluate(function() {
var ev = document.createEvent("MouseEvents");

Keybase proof

I hereby claim:

  • I am rquigley on github.
  • I am rquigley (https://keybase.io/rquigley) on keybase.
  • I have a public key whose fingerprint is D01F DBDE 3501 2B9C B08F FB89 8F2B 85FD D1C2 0A84

To claim this, I am signing this object:

#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@rquigley
rquigley / disable_hover.js
Created December 20, 2013 21:30
Disable hover on scroll
/**
* Scrolling can become janky when elements are rolled over. This
* adds a class to the body that disables all hover-states when
* scrolling is occurring.
*/
disableHoverOnScroll: function() {
var timerInt;
var ticking;
var $body = $('body');
set nocompatible
set number
set ruler
syntax on
" Set encoding
set encoding=utf-8 nobomb
set showmode
@rquigley
rquigley / jquery.equalizeHeights.js
Created January 12, 2012 23:33
equalizeHeights.js, a responsive-layout aware height equalizer
/*!
* equalizeHeights
* Force a number of elements to acquire the height of the tallest element
* Recalculate all heights on page resize
* Author: @rquigley
* Licensed under the MIT license
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@rquigley
rquigley / gist:1356241
Created November 10, 2011 21:10
hahaha
deleteMessageThreads: function(threadUrls) {
var csrfToken = $('#csrf').find('[name=csrfmiddlewaretoken]').get(0).value;
var messagePks = [];
var asyncEvent = function() {
var dfd = new jQuery.Deferred();
var numDone = 0;
var numTotal = threadUrls.length;
var ajaxCalls = _.map(threadUrls, function(url) {
@rquigley
rquigley / jquery.overlaySlideshow.js
Created November 3, 2011 06:21
Overlay zooming slideshow
/**
* overlaySlideshow
*
* Copyright 2011 Ryan Quigley
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@rquigley
rquigley / gist:1147580
Created August 15, 2011 19:39
Extract any valid emails from a string
<?php
/**
* Extract any valid emails from a string
*
* @param string $str
* @return array matched email addresses
*/
function extractEmails($str)
{