Skip to content

Instantly share code, notes, and snippets.

View eanakashima's full-sized avatar

Emily Nakashima eanakashima

View GitHub Profile
@eanakashima
eanakashima / refs.md
Last active January 9, 2022 21:31
List of references from "Observability is for User Happiness," Web Directions Code 2020
@eanakashima
eanakashima / refs.md
Last active December 9, 2020 18:45
List of references from "Observability is for User Happiness," performance.now() 2019 (Amsterdam), and "Observability for Web Performance," #perfmatters 2020
@eanakashima
eanakashima / main.go
Last active September 23, 2020 16:19
Send AWS Cost & Usage reports to Honeycomb
package main
import (
"bytes"
"encoding/csv"
"fmt"
"io"
"io/ioutil"
"log"
"os"
@eanakashima
eanakashima / vizprog.md
Last active September 25, 2018 15:39
Whoa, Pictures! A Visual History of Visual Programming (2018): References
@eanakashima
eanakashima / ControlMovement.cs
Last active August 29, 2015 14:06
wwcode game-making class 1 c#
using UnityEngine;
using System.Collections;
public class ControlMovement : MonoBehaviour {
public float speed;
public float gravity;
public CharacterController controller;
Vector3 moveDirection = Vector3.zero;
@eanakashima
eanakashima / un-id.rb
Last active December 3, 2018 22:01
Remove unused classes and IDs
#!/usr/bin/env ruby
require 'rubygems'
require 'tempfile'
require 'fileutils'
require 'set'
require 'pry'
# run with:
# `ruby un-id.rb`
@eanakashima
eanakashima / errors.js.coffee
Created December 10, 2013 19:32
client-side error beacon code in coffeescript
class YourNamespace.Errors
window.onerror = (e) => @report(e)
@report: (e) ->
img = new Image(1,1)
img.src = '//' + your_config.errors_host + '/images/error_pixel.gif'
img.style.display='none'
document.getElementsByTagName('body')[0].appendChild(img);
@eanakashima
eanakashima / column_order.rb
Created November 1, 2013 22:58
Order an array so that elements can be floated across columns
# There is definitely an easier way to do this, but I'm spacing on what it is. >.<
# Takes an ordered list and re-orders it so elements can be css-floated and still appear in order.
# e.g. helper.column_order([1,2,3,4], 2) would produce [1,3,2,4] so elements appear on the page as |1 3|
# |2 4|
def column_order(list, number_of_columns)
remainder = list.length % number_of_columns
number_of_rows = list.length / number_of_columns + [remainder, 1].min
reordered_list = []
@eanakashima
eanakashima / haml5_boilerplate.haml
Created September 2, 2013 05:04
html5 boilerplate v4.2 index.html --> index.html.haml for the most up-to-date version, use html2haml.heroku.com with the latest from https://github.com/h5bp/html5-boilerplate
!!!
/[if lt IE 7] <html class='no-js lt-ie9 lt-ie8 lt-ie7'>
/[if IE 7] <html class='no-js lt-ie9 lt-ie8'>
/[if IE 8] <html class='no-js lt-ie9'>
/ [if gt IE 8]><!
%html.no-js
/ <![endif]
%head
%meta{:charset => 'utf-8'}/
%meta{:content => 'IE=edge', 'http-equiv' => 'X-UA-Compatible'}/
@eanakashima
eanakashima / _animixins.scss
Created November 20, 2012 18:51
animation mixins
@mixin animated {
-webkit-animation-fill-mode: both;
-moz-animation-fill-mode: both;
-ms-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation-duration: 1s;
-moz-animation-duration: 1s;
-ms-animation-duration: 1s;
animation-duration: 1s;
}