Skip to content

Instantly share code, notes, and snippets.


Julien Letessier mezis

View GitHub Profile
View memory_usage.sql
-- PostgreSQL memory usage
-- Requires the pg_buffercache extension
n.nspname, c.relkind, c.relname,
COUNT(1) AS buffers,
-- (100 * COUNT(1) * 8192.0 / pg_table_size(c.oid))::INT AS pct_cached,
RPAD(LPAD('', (COUNT(1) * 8192e1 / pg_table_size(c.oid))::INT, ''), 10, '') AS pct_cached,
View run-backfill.rb
#!/usr/bin/env ruby
puts "Press RETURN when the geocoder cache has been unpacked in tmp/cache/geocoder"
Geocoder.config[:cache] ='tmp/cache/geocoder')
puts "Paste the correct Google API key:"
Geocoder.config[:api_key] = gets.strip
mezis / results.txt
Created Aug 23, 2016
MessagePack, JSON, YAML, Protobuf, BSON, Marshal: Ruby 2.3.1 benchmark results
View results.txt
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)}
def down
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,
Licensed to The Apache Software Foundation,
Benchmarking (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
mezis /
Created Jun 30, 2015
Installed TeX Live packages

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

Keybase proof

I hereby claim:

  • I am mezis on github.
  • I am 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 / nav.html
Created May 13, 2014
Deriving from Bootstrap
View nav.html
<nav class="ht-navbar">
<li><a>First tab</a></li>
<li><a>Second tab</a></li>
View net.mezis.tunnels.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
View frozen_string.rb
class FrozenString
module ClassMethods
def get(string)
@@repository ||= {}
@@repository[string.freeze] ||= new(string.freeze)
extend ClassMethods
def initialize(string)