start new:
tmux
start new with session name:
tmux new -s myname
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 | |
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
Read 1 MB sequentially from memory 250,000 ns 0.25 ms | |
Round trip within same datacenter 500,000 ns 0.5 ms | |
Read 1 MB sequentially from SSD 1,000,000 ns 1 ms 4X memory |
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 |
# Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations? | |
describe 'Modal' do | |
should 'display login errors' do | |
visit root_path | |
click_link 'My HomeMarks' | |
within '#login_area' do | |
fill_in 'email', with: '[email protected]' | |
fill_in 'password', with: 'test' |
<?php | |
/* | |
Plugin Name: LiveReload | |
Description: Adds the JavaScript for LiveReload to a WordPress site | |
Version: 0.0.0.0.1alpha | |
Author: Peter Wilson | |
Author URI: http://peterwilson.cc/ | |
*/ |
require 'action_dispatch/middleware/static' | |
module Middleware | |
class FileHandler < ActionDispatch::FileHandler | |
def initialize(root, assets_path, cache_control) | |
@assets_path = assets_path.chomp('/') + '/' | |
super(root, cache_control) | |
end | |
def match?(path) |
task :glyphs => :environment do | |
glyphs = [] | |
glyphs_hash = {} | |
longest_name = 0 | |
Dir.glob(Rails.root.join("app", "assets", "images", "glyphicons", "*.png")) do |path| | |
width, height = `identify -format "%wx%h" #{path}`.strip.split(/x/) | |
# glyphicons_083_random.png | |
# [email protected] | |
# glyphicons_halflings_047_bold.png |
(require 'popup) | |
(require 'pos-tip) | |
(require 'popup-kill-ring) | |
(require 'auto-complete-config) | |
(add-to-list 'ac-dictionary-directories (concat libfiles-dir "/ac-dict")) | |
(ac-config-default) | |
(setq ac-use-menu-map t) | |
(define-key ac-menu-map (kbd "ESC") 'viper-exit-popup-menu) | |
(define-key ac-complete-mode-map (kbd "ESC") 'viper-exit-popup-menu) |