Skip to content

Instantly share code, notes, and snippets.

😍
Thrilling our customers.

Don MacAskill onethumb

😍
Thrilling our customers.
Block or report user

Report or block onethumb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@onethumb
onethumb / mysql_splitdump.sh
Created Aug 15, 2016 — forked from jasny/mysql_splitdump.sh
Split MySQL dump SQL file into one file per table or extract a single table
View mysql_splitdump.sh
#!/bin/bash
####
# Split MySQL dump SQL file into one file per table
# based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump
####
if [ $# -lt 1 ] ; then
echo "USAGE $0 DUMP_FILE [TABLE]"
exit
View onename-passcard-verification.txt
Verifying I am +d0n on my passcard. https://onename.com/d0n
View default.vcl
vcl 4.0;
import directors;
probe health {
.url = "/ping/";
.expected_response = 200;
.timeout = 1s;
.interval = 1s;
}
View varnishlog.log
* << BeReq >> 3
- Begin bereq 2 fetch
- Timestamp Start: 1400090851.519220 0.000000 0.000000
- BereqMethod GET
- BereqURL /1234/Video-Tests-Dec-2013/Exploratorium-2012/i-gSNfWFW/0/SMIL/gSNfWFW.smil/media_b917414.abst/Seg1-Frag1
- BereqProtocol HTTP/1.1
- BereqHeader Host: 10.100.10.169
- BereqHeader User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36
- BereqHeader Accept: */*
- BereqHeader Referer: http://inside.smugmug.net/test/don/flowplayer.mg?ImageKey=gSNfWFW&videoService=varnish
@onethumb
onethumb / keybase.md
Created Mar 6, 2014
Keybase proof claim
View keybase.md

Keybase proof

I hereby claim:

  • I am onethumb on github.
  • I am don (https://keybase.io/don) on keybase.
  • I have a public key whose fingerprint is B604 9E2D B637 CC82 514F 70A6 2ED5 219C F9FB 4656

To claim this, I am signing this object:

@onethumb
onethumb / php-bug-53458-pdo-problem.php
Created Mar 19, 2013
PHP Bug #53458 reproduce script. When fetching 10K rows using prepared statements, PDO takes ~6 seconds. When fetching the same 10K rows in 1K chunks, PDO takes ~0.5 seconds. Non-prepared fetches take ~0.25 seconds. There's some sort of non-linear falloff in performance. See: https://bugs.php.net/bug.php?id=53458
View php-bug-53458-pdo-problem.php
<?php
/**
* For some reason, SELECT ... WHERE Id IN ( .. ) queries using prepared
* statements in PDO (either emulated or not) cause severe performance
* degradation over 1000 rows.
*
* Normal SELECT queries, including SELECT * FROM table, with hundreds of
* thousands of rows don't exhibit this problem, only WHERE IN queries.
*
*
You can’t perform that action at this time.