When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
-- PostgreSQL 9.2 beta (for the new JSON datatype) | |
-- You can actually use an earlier version and a TEXT type too | |
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8 | |
-- Inspired by | |
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html | |
-- http://ssql-pgaustin.herokuapp.com/#1 | |
-- JSON Types need to be mapped into corresponding PG types | |
-- |
$stack, $draws = [], {} | |
def method_missing *args | |
return if args[0][/^to_/] | |
$stack << args.map { |a| a or $stack.pop } | |
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
end | |
class Array | |
def +@ |
! Block friends favourited tweets | |
twitter.com##.tweet-has-context:not([data-retweeter]) | |
! fake activity | |
twitter.com##li[data-component-context="generic_activity"] | |
! since you were away | |
twitter.com##.TimelineTweetsModule | |
! don't care what's trending | |
twitter.com##.trends.Trends.module |
# This sets up fish so that, if you type a command that should be | |
# run using Bundler, it first automatically prepends "bundle exec" | |
# to the command line buffer before executing it. Works for all | |
# commands found in the "bin" directory of the current bundle. | |
# | |
# To override this behavior and run such a command without Bundler, | |
# prefix with "command" (e.g., `command rake -T`) | |
# | |
# Pros (vs binstubs or aliases): | |
# * automatically adjusts to bundle changes |
;; (cond-let | |
;; (odd? x) [x n] (inc x) | |
;; (< n 10) [y (inc n)] 10 | |
;; :else n)) | |
;; we want the above to yield | |
;; (let [x n] | |
;; (if (odd? x) | |
;; (inc x) |
if ! Enum.member?(:erlang.loaded, IEx.UserDrv.Config) do | |
defmodule IEx.UserDrv.Config do | |
import Process, only: [group_leader: 0] | |
@moduledoc """ | |
Structure to hold :user_drv configuration information. | |
""" | |
defstruct node: Node.self, pid: nil, port: nil, leader: group_leader |
I'm writing in response to events that have recently come to light involving a sexual assault at a tech conference. Background information can be found [here][1], [here][2], and [here][3] as well as on twitter and google.
I've been watching this from the sidelines, and I've been wrestling with several questions that I can't seem to shake and that I really don't have answers to.
I wear many hats, both in the tech community and others. I'm a coder, a speaker, a user group organizer, a conference organizer, and even a boss. Each of those roles colors how I see this, but there's one role that is overpowering in my reaction.
See, I'm a Dad. A dad of two beautiful and innocent girls who are 3 and 2. They have their whole lives in front of them and so the questions I'm struggling with are:
Proc.module_eval { def method_missing(m,*a); call(m.to_s,*a); end } | |
Array.module_eval { def rest; self[1..-1]; end } | |
Object.module_eval { def let; yield self; end } | |
Music = Module.new do | |
def self.load(filename) | |
depth = ->(l) { %r(^([\s-]*)\w).match(l)[1].length } | |
ldepth = ->(l) { %r(^(\s*)\S).match(l)[1].length } | |
nonzero = ->(n) { n > 0 } | |
empty = ->(c) { c.empty? } |