autocmd BufWritePre * :%s/\s\+$//e
(add-hook 'before-save-hook 'delete-trailing-whitespace)
| customInstanceTypes = [ | |
| new InstanceTypeData(linuxOnDemandPrice: 5.520, hardwareProfile: | |
| new HardwareProfile(instanceType: 'd2.8xlarge', | |
| family: 'Storage Optimized', group: 'd2', | |
| size: 'Octuple Extra Large', arch: '64-bit', vCpu: '36', ecu: '116', | |
| mem: '244.0', storage: '24 x 2000', ebsOptim: 'Yes', | |
| netPerf: '10 Gigabit' | |
| ) | |
| ), | |
| new InstanceTypeData(linuxOnDemandPrice: 2.760, hardwareProfile: |
| APPLE_DEVICE_IDENTIFIER_TO_NAME = { | |
| "iPad1,1" => "iPad 1 (2010)", | |
| "iPad2,1" => "iPad 2 Wi-Fi (2011)", | |
| "iPad2,2" => "iPad 2 Wi-Fi+GSM (2011)", | |
| "iPad2,3" => "iPad 2 Wi-Fi+CDMA (2011)", | |
| "iPad2,4" => "iPad 2 Wi-Fi (2012)", | |
| "iPad3,1" => "iPad 3 Wi-Fi (2012)", | |
| "iPad3,2" => "iPad 3 Wi-Fi+CDMA (2012)", | |
| "iPad3,3" => "iPad 3 Wi-Fi+GSM (2012)", | |
| "iPad3,4" => "iPad 4 Wi-Fi (2012)", |
| # JRuby 1.6.5 + Java 6 | |
| # 01 - Small Array Instantiation | |
| # A new, empty array preallocates memory for 16 elements | |
| # An array that starts non-empty and is subsequently cleared will only have memory allocated for one element | |
| # Ergo, if you know your array will stay small, define with [nil].clear | |
| empty_array = [] # 152 bytes | |
| cleared_array = [nil].clear # 32 bytes |
| # redis-cli monitor > log.redis | |
| puts "Scanning redis log..." | |
| ops = Hash.new(0) | |
| lines = File.readlines('log.redis'); true | |
| start_time = Time.at(lines[1].split(' ').first.to_f) | |
| end_time = Time.at(lines.last.split(' ').first.to_f) |
| set -g prefix C-q | |
| unbind C-b | |
| bind C-q send-prefix | |
| # C-a u split window vetically | |
| bind u split-window | |
| # C-a i split window horizontally | |
| bind i split-window -h | |
| # C-a o donk off pane | |
| bind o kill-pane |
| diff --git a/src/help.h b/src/help.h | |
| index 51613c9..196f90e 100644 | |
| --- a/src/help.h | |
| +++ b/src/help.h | |
| @@ -632,7 +632,17 @@ struct commandHelp { | |
| "destination numkeys key [key ...] [WEIGHTS weight] [AGGREGATE SUM|MIN|MAX]", | |
| "Add multiple sorted sets and store the resulting sorted set in a new key", | |
| 4, | |
| - "1.3.10" } | |
| + "1.3.10" }, |
| module AutoloadMissingConstants | |
| # Automatically loads constants that Ruby doesn't know about when unmarshalling in the given block. This triggers | |
| # Rails/ActiveSupport's smart autoloading code via constantize. Adapted from cache_fu/cache_methods.rb:214 | |
| # | |
| # ==== Parameters | |
| # | |
| # &block:: Unmarshalling block. | |
| # | |
| # ==== Raises |
| // Given the following javascript code: | |
| function countdown (num) { | |
| for (var i = 0; i <= num; i += 1) { | |
| setTimeout(function () { | |
| alert(num - i); | |
| }, i * 1000); | |
| } | |
| } |
| # Hey look, a matcher for RSpec2 that will check for an error on an ActiveModel attribute, given a I18n key and interpolation options. | |
| # | |
| # I feel like this should exist somewhere already, I am probably wrong though. | |
| # | |
| # @foo.should have_error_on(:bar, :bar_is_too_baz, :quux => :corge) | |
| # | |
| module RSpec | |
| module Matchers | |
| class HaveErrorOn |