Skip to content

Instantly share code, notes, and snippets.

Avatar

Julien Letessier mezis

View GitHub Profile
View run-backfill.rb
#!/usr/bin/env ruby
puts "Press RETURN when the geocoder cache has been unpacked in tmp/cache/geocoder"
gets
Geocoder.config[:cache] = ActiveSupport::Cache::FileStore.new('tmp/cache/geocoder')
puts "Paste the correct Google API key:"
Geocoder.config[:api_key] = gets.strip
BackfillUserCityAreaService.new.run
@mezis
mezis / results.txt
Created Aug 23, 2016
MessagePack, JSON, YAML, Protobuf, BSON, Marshal: Ruby 2.3.1 benchmark results
View results.txt
Encode
======
Date: August 22, 2016
System Information
------------------
Operating System: OS X 10.11.6 (15G31)
CPU: Intel Core i7 2.5 GHz
Processor Count:
Memory: 16 GB
View -
class TunesFillfactor < ActiveRecord::Migration
TABLES = %w[orders restaurant_assignment order_assignment order_item driver zone_metrics]
def up
TABLES.each do |table|
execute %{ALTER TABLE #{table} SET (fillfactor = 85)}
end
end
def down
@mezis
mezis / ec2-server.txt
Last active Aug 29, 2015
`ab` result for orderweb
View ec2-server.txt
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking deliveroo.co.uk (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
@mezis
mezis / tex-live.md
Created Jun 30, 2015
Installed TeX Live packages
View tex-live.md

For reference, installed TeX Live packages as of 2015-06-30:

$ yum list installed | grep tex
tex-cm-lgc.noarch               0.5-17.1.el6           @base
tex-kerkis.noarch               2.0-23.el6             @base
tex-preview.noarch              11.85-10.el6           @base
texlive.x86_64                  2007-57.el6_2          @base
texlive-dvips.x86_64            2007-57.el6_2          @base
texlive-east-asian.x86_64       2007-57.el6_2          @base
View keybase.md

Keybase proof

I hereby claim:

  • I am mezis on github.
  • I am mezis (https://keybase.io/mezis) on keybase.
  • I have a public key whose fingerprint is 18F3 9C07 AF6D 731A 1D3B 04A0 FA02 40E8 5344 1C47

To claim this, I am signing this object:

@mezis
mezis / nav.html
Created May 13, 2014
Deriving from Bootstrap
View nav.html
<nav class="ht-navbar">
<div>
<a>Brand</a>
</div>
<div>
<ul>
<li><a>First tab</a></li>
<li><a>Second tab</a></li>
</ul>
</div>
View net.mezis.tunnels.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>net.mezis.tunnels</string>
<key>ProgramArguments</key>
<array>
View frozen_string.rb
class FrozenString
module ClassMethods
def get(string)
@@repository ||= {}
@@repository[string.freeze] ||= new(string.freeze)
end
end
extend ClassMethods
def initialize(string)
View threader.rb
#!/usr/bin/env ruby
#
# Thread, fork, and try to trigger deadlocks
#
def make_noise
$stdout.write("\000")
end
[1,2].each do
You can’t perform that action at this time.