Skip to content

Instantly share code, notes, and snippets.

View trotzig's full-sized avatar

Henric Trotzig trotzig

View GitHub Profile
<div class="chip">
<img class="chip__img" src="http://api.randomuser.me/portraits/med/women/56.jpg">
<div class="chip__info">
<h3 class="chip__info-name">Jane Doe</h3>
<div class="chip__info-email">jane.doe@brigade.com</div>
</div>
<button class="chip__action">×</button>
</div>
@trotzig
trotzig / face_pile_positions_csv2css.rb
Last active August 29, 2015 14:01
Conversion script for Face Pile positions
require 'csv'
# Script used to convert the face pile positioning document Nebs put together in
# https://docs.google.com/a/causes.com/spreadsheets/d/1ELRK8J0I8Q-Hu8-mPIYvOxW0_cNDxvg35QNLzSrTIT8/edit
#
# I made a copy of this document and cleaned it to make it easier to parse:
# https://docs.google.com/a/causes.com/spreadsheets/d/1Ye2o-exOj1JsMPeeWiOk3s4HQ7UBtGlO1t2zSEUECbc/edit
# This is the document used in this script.
styles = {}
# This is a list of matchers that we use in our RSpec tests at Causes.
# *** CAPYBARA MATCHERS ***
#
# To check for content on a page, don't use `include`, use `have_content`:
response.body.should have_content 'A header'
# As opposed to `include`, this Capybara matcher will only look for content
# (ignoring tags and meta-info etc). And the error message is slightly easier to
@trotzig
trotzig / Byte abuse
Last active August 29, 2015 13:57
This story was posted to leaveastory.com on March 8, 2014.
It wasn't the first time I had woken up in the middle of the night thinking about it. To be honest, I'd been sleeping terribly for over a week. All I could think of was to have it. Just a small fix, and then I'd go back to sleep. I know it wasn't healthy, but I couldn't do anything about it. In my mind, it wasn't a physical addiction. My body just needed it.
The kitchen was dark apart from a light that I'd intentionally left on before going to bed. Traces of previous sessions were scattered over the kitchen table. Soda cans and empty energy bar packages took up most of the space. I had come to understand that by adding lots of energy in the form of sugar I was able to sustain the effect a lot longer than I would have without the carbohydrates.
The first part of a session, which I called "the prep phase", included ssh-ing into a virtual cluster hosted on a remote island outside the coast of The Phillipines. You might call this "early tripping", but for me it was a means to an end, not the actual thing. What
@trotzig
trotzig / gist:7048039
Created October 18, 2013 20:47
Script to check commit messages for alliterations.
.