Skip to content

Instantly share code, notes, and snippets.

@roc
roc / p-hamann-notes.md
Created March 19, 2014 17:45
Performance Notes from Patrick Hamann of the Guardian (19/03/2014)
@roc
roc / .slate
Created March 26, 2014 09:08
Slate config
# GLOBAL CONFIGURATIONS
# -------------------------------------------------------------------
# See https://github.com/jigish/slate/wiki/Global-Configs
config defaultToCurrentScreen true
config secondsBeforeRepeat 0.4
config secondsBetweenRepeat 0.1
config keyboardLayout "qwerty"
config nudgePercentOf screenSize
config resizePercentOf screenSize
@roc
roc / making_a_platform.md
Last active August 29, 2015 13:58
Towards a Platform API

Platform and API planning

Platform definition

"The central location for getting performance information from all government services"

Platform API Principles:

  • Should be discoverable by embedded linking to the end user
@roc
roc / urls.snippet.py
Created October 2, 2014 09:05
Get a resource by UUID or slug in django
uuid_regexp = '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'
urlpatterns = patterns(
url(r'^resource/(?P<slug>[-a-z0-9]+)$',
resource_views.resource, name='resource'),
url(r'^resource/(?P<resource_id>{})$'.format(uuid_regexp),
resource_views.resource, name='resource'),
)
@roc
roc / blist.alias
Created October 2, 2014 12:23
Git: list branches ordered by committer date and pretty printed with relative time
alias blist='for ref in $(git for-each-ref --sort=-committerdate --format="%(refname)" refs/heads/ refs/remotes ); do git log -n1 $ref --pretty=format:"%Cgreen%cr%Creset %C(magenta)%d%Creset %C(bold cyan dim)<%an>%Creset%n" | cat ; done'
@roc
roc / newwp.sql
Last active August 29, 2015 14:08
Create wordpress user and database one-liner
CREATE USER '{user}'@'localhost' IDENTIFIED BY '{password}';CREATE DATABASE {mydatabase}; GRANT ALL PRIVILEGES ON {mydatabase}.* TO '{user}'@'localhost' identified by '{password}'; FLUSH PRIVILEGES; SHOW DATABASES;
Scaling Management without Sacrificing Culture
----------------------------------------------
- Michael Rembetsy
- Patrick McDonnell
- Etsy
Main takeaway points:
@roc
roc / Building a Device Lab (Etsy)
Created November 19, 2014 18:27
Talk at velocity conference by Lara Hogan / Destiny from Etsy
Building a Device Lab
---------------------
Lara Hogan
Destiny / @thisiscarlsagan
http://larahogan.me/devicelab/
www.youtube.com/user/etsy
Offline-first Web Apps
----------------------
- Matt Andrews (FT)
...
;::::;
;::::; :;
;:::::' :;
;:::::; ;.
Breaking news at 1000ms
-----------------------
- Patrick Hamann
- bit.ly/velocity-1000ms
. '@(@@@@@@@)@. (@@) ` . '
. @@'((@@@@@@@@@@@)@@@@@)@@@@@@@)@
@@(@@@@@@@@@@))@@@@@@@@@@@@@@@@)@@` .