Skip to content

Instantly share code, notes, and snippets.

View nono's full-sized avatar

Bruno Michel nono

  • Cozy Cloud
  • Paris, France
View GitHub Profile
@nono
nono / _gem
Created August 23, 2009 19:10 — forked from tomafro/_gem
#compdef gem
# My first zsh completion function, for the gem command. It lets you type 'gem <tab>' to complete gem commands
# (including installed ones) and for some commands (currently just open and update) allows you to complete gem
# names as well. The implementation isn't ideal, so I'd appreciate advice on how I can improve it, particularly
# the 'caching' of the gem_commands and installed_gems.
local curcontext="$curcontext" state line ret=1
_arguments -C \
#!/usr/bin/env ruby
# Author: Bruno Michel <bruno.michel@af83.com>
# Copyright 2010 (c) af83
# Licence: MIT http://www.opensource.org/licenses/mit-license.php
# Add two comments to each of your Rails view with the name of this file,
# one at the beginning and the other at the end.
TMPL_BEGIN = "<!-- Start of %s -->\n"
TMPL_END = "<!-- End of %s -->\n"
#!/usr/bin/env ruby
# Author: Bruno Michel <bruno.michel@af83.com>
# Copyright 2010 (c) af83
# Licence: MIT http://www.opensource.org/licenses/mit-license.php
# Parse the given log files and extract the list of URL
if ARGV.empty?
puts "Usage: #{$0} <logfiles>"
exit 1
Username = <%= @var %>
@nono
nono / maze.rb
Created April 13, 2011 21:02
bin/maze.rb
#!/usr/bin/env ruby
require "maze"
i = 1
e = nil
loop do
maze = Maze.new(i, e)
maze.fetch
maze.construct
@nono
nono / Makefile
Created June 22, 2011 09:48
Long polling with golang... only 282 clients?
include $(GOROOT)/src/Make.inc
TARG=long_polling
GOFILES=long_polling.go
include $(GOROOT)/src/Make.cmd
@nono
nono / Makefile
Created June 27, 2011 10:53
Stressing my long-polling server
include $(GOROOT)/src/Make.inc
TARG=go-bench
GOFILES=go-bench.go
include $(GOROOT)/src/Make.cmd
@nono
nono / gist:1237214
Created September 23, 2011 12:20 — forked from shingara/gist:1237097
Comment répondre qu'on a pas de temps libre extensible pour créer un site internet sans être payé.
Je suis désolé, mais je ne correspond pas à ce que vous cherchez. Développer un site internet tel que celui-ci prend plusieurs mois hommes.
Je n'ai personnellement que 3 heures par semaine de disponible actuellement en dehors de mon travail de salarié chez bemyboat, de CTO chez supermarmite et de père de famille.
Je ne pourrais donc pas vous aider à moins que vous ne soyez prêt à patienter plusieurs années pour avoir une version beta.
Cordialement,
Cyril Mougel
@nono
nono / redis2txt.rb
Created November 28, 2011 23:29
Export data from redis to a plain text files
#!/usr/bin/env ruby
require "redis"
redis = Redis.new
redis.keys("*").each do |key|
val = case redis.type(key)
when "string"
redis.get key
when "list"
@nono
nono / rails_log_stathat.rb
Created December 30, 2011 11:07
Parse a Rails log file and send metrics to stathat
#!/usr/bin/env ruby
require 'net/http/persistent'
require 'uri'
require 'thread'
USAGE = <<EOS
Parse a Rails log file and send metrics to stathat
export EMAIL=email