Skip to content

Instantly share code, notes, and snippets.


Quinn Comendant quinncomendant

View GitHub Profile
dergachev /
Last active Nov 23, 2022
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:

joncave / endpoints.php
Created Jun 7, 2012
WP_Rewrite endpoints demo
View endpoints.php
Plugin Name: WP_Rewrite endpoints demo
Description: A plugin giving example usage of the WP_Rewrite endpoint API
Plugin URI:
Author: Jon Cave
Author URI:
function makeplugins_endpoints_add_endpoint() {
jeteon / google-maps-data-parser.js
Last active Sep 12, 2022
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:
koenrh /
Last active Sep 8, 2022
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.

greim /
Last active Aug 23, 2022
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

vol4ok / gist:2587886
Created May 3, 2012
Split .ape and .flac and convert to .m4a (ALAC) or .mp3 on MacOS X
View gist:2587886
brew install flac ffmpeg cuetools # ставим нужные пакеты
# скачиваем скрипт, например отсюда
ffmpeg -i 1.ape 1.flac # конвертируем во flac, так как libmac для APE не ставится на osx
cuebreakpoints 1.cue | shnsplit -o flac 1.flac #нарезаем на треки
cuetag 1.cue split-track*.flac #прописываем тэги ( ставится отдельно отдельно)
#конвертируем в ALAC
for f in split-track*.flac
twksos / CiscoVPNConnection.scpt
Last active Feb 2, 2022
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
mickm /
Created Nov 21, 2012
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]
RobThree / SoapClientTimeout.class.php
Created Apr 25, 2012
PHP SoapClient with timeout
View SoapClientTimeout.class.php
//Drop-in replacement for PHP's SoapClient class supporting connect and response/transfer timeout
//Usage: Exactly as PHP's SoapClient class, except that 3 new options are available:
// timeout The response/transfer timeout in milliseconds; 0 == default SoapClient / CURL timeout
// connecttimeout The connection timeout; 0 == default SoapClient / CURL timeout
// sslverifypeer FALSE to stop SoapClient from verifying the peer's certificate
class SoapClientTimeout extends SoapClient
private $timeout = 0;
private $connecttimeout = 0;
cviebrock / select2-foundation5.css
Created Dec 20, 2013
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;