-
Make sure your Gemfile.lock is not committed to your OpenShift git repository.
-
Copy the pre_build file to .openshift/action_hooks/pre_build
-
Add .openshift/action_hooks/pre_build to git, set the executable bit, and push your changes
git add .openshift/action_hooks/pre_build git update-index --chmod=+x .openshift/action_hooks/pre_build git commit -m "Add bundle_install in pre_build hook" git push
After spending the better part of the month implementing date support | |
in RethinkDB, Mike Lucy sent the team the following e-mail. It would | |
have been funny, if it didn't cause thousands of programmers so much | |
pain. Read it, laugh, and weep! | |
----- | |
So, it turns out that we're only going to support dates between the | |
year 1400 and the year 10000 (inclusive), because that's what boost | |
supports. |
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.4.0] | |
user system total real | |
YAML 29.190000 1.150000 30.340000 ( 31.303681) | |
JSON 1.780000 0.050000 1.830000 ( 2.357544) | |
Marshal 1.300000 0.020000 1.320000 ( 1.781964) | |
MessagePack 0.520000 0.160000 0.680000 ( 0.692523) | |
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) 64-Bit Server VM 1.7.0_17-b02 +indy [darwin-x86_64] |
#!/usr/bin/env ruby | |
require 'bundler' | |
gems = ARGV | |
if gems.empty? | |
puts "Updating all gems" | |
Bundler.definition(true) |
I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).
In Vim I have key bindings C-h/j/k/l
set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W
.) I'd like to use the same keystrokes for switching tmux panes.
An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\
.
Here's how it should work:
rm -rf zoneinfo | |
mkdir zoneinfo | |
curl -s -L -o - http://www.iana.org/time-zones/repository/tzdata-latest.tar.gz | tar xzvf - -C zoneinfo | |
cd zoneinfo | |
sudo zic africa antarctica asia australasia backward etcetera europe factory northamerica pacificnew southamerica systemv | |
zdump -v Pacific/Apia # or any time zone that shows the latest tzdata update |
Jim Weirich:
This is how I explain it… Ruby has Procs and Lambdas. Procs are created with
Proc.new { }
, lambdas are created withlambda {}
and->() {}
.
In Ruby 1.8,
proc {}
creates lambda, and Ruby 1.9 it creates procs (don't ask).
Lambdas use method semantics when handling parameters, procs use assignment semantics when handling parameters.
This means lambdas, like methods, will raise an ArgumentError when called with fewer arguments than they were defined with. Procs will simply assign nil to variables for arguments that were not passed in.
system ~/projects/jruby/blah $ jruby ../../startup_bench/lib/tune.rb 1 'touch Gemfile.lock && rm Gemfile.lock && jruby -S bundle install --quiet --local' | |
Beginning tuning for `touch Gemfile.lock && rm Gemfile.lock && jruby -S bundle install --quiet --local` | |
Trying 90 combinations of flags | |
-------------------------------------------------------------------------------- | |
Last: -J-server | |
Average time: 8.529s | |
Overall average: 8.529s | |
Estimated completion time: 2012-12-19 23:46:27 -0600 | |
-------------------------------------------------------------------------------- | |
Last: -J-client |
MRI 1.8.7-p371 | |
>> $KCODE | |
=> "NONE" | |
>> "s.net" =~ /\A[^\W_]+([-.][^\W_]+)*\.[a-z]{2,6}\.?\Z/i | |
=> 0 | |
>> $KCODE = 'UTF8' | |
=> "UTF8" | |
>> "s.net" =~ /\A[^\W_]+([-.][^\W_]+)*\.[a-z]{2,6}\.?\Z/i | |
=> 0 |
#!/bin/sh | |
# | |
# git-word-diff-auto - offers a missing --word-diff="auto" | |
# | |
# Copyright (c) 2012 Akinori MUSHA | |
# | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions |