I hereby claim:
- I am olly on github.
- I am ollylegg (https://keybase.io/ollylegg) on keybase.
- I have a public key ASCz5Gv6Xa5KiEHzGYm3agmh25E853LgPFwieUp2iq4Hqgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class Item | |
def self.find_each(params = {}) | |
return enum_for(:find_each) unless block_given? | |
page = nil | |
while page.nil? || page.current_page < page.total_pages | |
if page.nil? | |
page = all params | |
else | |
page = all params.merge(page: page.current_page + 1) |
require 'benchmark' | |
MAX = 1000 | |
RANGE = (0..MAX).to_a | |
array = [] | |
hash = {} | |
RANGE.each do |i| | |
array[i] = i |
matcher = ->(model) do | |
begin | |
model.valid? | |
true | |
rescue ActiveModel::StrictValidationFailed | |
false | |
end | |
end | |
RSpec::Matchers.define :pass_strict_validations do |
# dropbox service | |
DROPBOX_USERS="olly" | |
DAEMON=.dropbox-dist/dropbox | |
start() { | |
echo "Starting dropbox..." | |
for dbuser in $DROPBOX_USERS; do | |
HOMEDIR=`getent passwd $dbuser | cut -d: -f6` | |
if [ -x $HOMEDIR/$DAEMON ]; then |
UKPostcode = begin | |
an_naa_or_ann_naa = '^([A-PR-UWYZ]{1}\d{1,2})\s?(\d[ABD-HJLNP-UWXYZ]{2})$' | |
aan_naa_or_aann_naa = '^([A-PR-UWYZ]{1}[A-HK-Y]{1}\d{1,2})\s?(\d[ABD-HJLNP-UWXYZ]{2})$' | |
ana_naa = '^([A-PR-UWYZ]{1}\d[A-HJKSTUW]{1})\s?(\d[ABD-HJLNP-UWXYZ]{2})$' | |
aana_naa = '^([A-PR-UWYZ]{1}[A-HK-Y]{1}\d[ABEHMNPRVWXY]{1})\s?(\d[ABD-HJLNP-UWXYZ]{2})$' | |
historic_code="GIR\s?0AA" | |
postcode_spec = "#{an_naa_or_ann_naa}|#{aan_naa_or_aann_naa}|#{ana_naa}|#{aana_naa}|#{historic_code}" | |
pattern = /#{postcode_spec}/i | |
end |
module Clipboard | |
def pbcopy(data) | |
IO.popen('pbcopy', 'w') {|io| io.write(data)} | |
end | |
def pbpaste | |
IO.popen('pbpaste', 'r').read | |
end | |
end |
[2013-02-10T19:28:38+00:00] INFO: Processing apt_repository[brightbox-ruby-ng] action add (application::rails line 67) | |
================================================================================ | |
Error executing action `add` on resource 'apt_repository[brightbox-ruby-ng]' | |
================================================================================ | |
RuntimeError | |
------------ | |
The repository file to create is nil, cannot continue. |
class Rack::File | |
def warn(*) | |
end | |
end |
[2012-12-12 16:15:29] ./Configure darwin64-x86_64-cc -I/Users/Olly/.rvm/usr/include -L/Users/Olly/.rvm/usr/lib zlib no-asm no-krb5 shared --prefix=/Users/Olly/.rvm/usr | |
current path: /Users/Olly/.rvm/src/openssl-1.0.1c | |
command(10): ./Configure darwin64-x86_64-cc -I/Users/Olly/.rvm/usr/include -L/Users/Olly/.rvm/usr/lib zlib no-asm no-krb5 shared --prefix=/Users/Olly/.rvm/usr | |
[31m/Users/Olly/.rvm/scripts/functions/utility:116 [32m__rvm_log_command:32[37m ./Configure darwin64-x86_64-cc -I/Users/Olly/.rvm/usr/include -L/Users/Olly/.rvm/usr/lib zlib no-asm no-krb5 shared '--prefix=/Users/Olly/.rvm/usr' '' | |
target already defined - darwin64-x86_64-cc (offending arg: ) |