Skip to content

Instantly share code, notes, and snippets.

@jklein
jklein / gist:43b328977efbf4b1ed05
Last active August 29, 2015 14:22
API Prod / Registrations diff
Only in /Users/jonathanklein/development/api/: .editorconfig
Only in /Users/jonathanklein/development/api/: .git
Only in /Users/jonathanklein/development/api/: .gitignore
diff -r ./Gemfile /Users/jonathanklein/development/api/Gemfile
5d4
< gem 'rails', '4.1.1'
8c7
< gem 'capistrano', '3.2.1'
---
> gem 'capistrano', '3.4.0'
@jklein
jklein / repos.txt
Created January 31, 2015 21:22
Etsy Repos
Total repos: 47
Stars:
statsd: 6934
AndroidStaggeredGrid: 3017
deployinator: 1526
logster: 1408
Hound: 1321
skyline: 1295
MIDAS: 589
oculus: 570
bash-4.1$ ./bin/sherlockd --prod
2015/01/16 15:25:52 Searcher started for Search
2015/01/16 15:25:52 Searcher started for BigData
2015/01/16 15:25:53 Searcher started for Chef
2015/01/16 15:25:53 Searcher started for EtsyApp
2015/01/16 15:25:54 Searcher started for AndroidApp
panic: exit status 1
goroutine 16 [running]:
runtime.panic(0x77f180, 0xc20803a2b8)
@jklein
jklein / fastly-gzip-issues.md
Last active August 29, 2015 14:08
Investigating intermittent lack of gzip for CSS/Font files from Fastly

Occasionally CSS and font files served from www.etsy.com via Fastly (and only Fastly) are not gzipped. None of our other CDNs appear to have this issue.

We have seen this effect via Zoompf alerts, Catchpoint tests, and can reproduce it with curl (again, intermittently):

curl -k -H "Host: www.etsy.com" -H "Accept-Encoding:gzip" -v "https://global-ssl.fastly.net/assets/dist/css/base.20141024160711.edge.css" -v > /dev/null

Compare to origin:

curl -k -H "Host: www.etsy.com" -H "Accept-Encoding:gzip" -v "https://origin-www.etsy.com/assets/dist/css/base.20141024160711.edge.css" -v > /dev/null

@jklein
jklein / gist:2503e35decf3516fa6c1
Last active August 29, 2015 14:08
Fastly GZIP CSS
~$curl -k -H "Host: www.etsy.com" -H "Accept-Encoding: gzip, deflate" -v "https://global-ssl.fastly.net/assets/dist/css/base.20141024160711.edge.css" -v > /dev/null
* Adding handle: conn: 0x7fa671004000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fa671004000) send_pipe: 1, recv_pipe: 0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to global-ssl.fastly.net port 443 (#0)
* Trying 23.235.39.184...
@jklein
jklein / gist:bd7eb84f3628f4049b31
Last active August 29, 2015 14:08
Fastly NO GZIP CSS
~$curl -k -H "Host: www.etsy.com" -H "Accept-Encoding: gzip, deflate" -v "https://global-ssl.fastly.net/assets/dist/css/base.20141024160711.edge.css" -v > /dev/null
* Adding handle: conn: 0x7ff029004000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7ff029004000) send_pipe: 1, recv_pipe: 0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to global-ssl.fastly.net port 443 (#0)
* Trying 199.27.76.184...
* Adding handle: conn: 0x7ff082004000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7ff082004000) send_pipe: 1, recv_pipe: 0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to www.etsy.com port 443 (#0)
* Trying 23.66.223.53...
* Connected to www.etsy.com (23.66.223.53) port 443 (#0)
#14 __construct() /EtsyORM/Query/RawSql.php:907
#13 realExecute() /EtsyORM/Query/Base.php:265
#12 retrieveResultData() /EtsyORM/Query/Base.php:329
#11 execute() /EtsyORM/Finder/Base.php:106
#10 getAndExecute('find', [68183450], , 1) /EtsyORM/Finder/Table.php:226
#9 findRecordInDb([68183450], 1) /EtsyORM/Finder/Table.php:318
#8 findByPK([68183450], 1, 1) /EtsyORM/Finder/Table.php:208
#7 normalizeAndFind([68183450], 1) /EtsyORM/Finder/Table.php:419
#6 find(68183450) /ObjectType.php:130
#5 find(68183450, 9) /Convos/ContextType.php:36
#! /bin/sh
### BEGIN INIT INFO
# Provides: php-fpm
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php-fpm
# Description: starts the PHP FastCGI Process Manager daemon
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix (/usr/local). This prefix can be dynamically changed by using the
; '-p' argument from the command line.
; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the