Skip to content

Instantly share code, notes, and snippets.

@guyon
guyon / gist:4745411
Created February 9, 2013 14:24
vim --startuptime vim_startuptime_20130209.txt
times in msec
clock self+sourced self: sourced script
clock elapsed: other lines
000.013 000.013: --- VIM STARTING ---
000.085 000.072: Allocated generic buffers
000.359 000.274: locale set
000.372 000.013: GUI prepared
000.375 000.003: clipboard setup
000.381 000.006: window checked
@guyon
guyon / gist:338663
Created March 20, 2010 13:16 — forked from kenn/gist:338351
require 'tweets'
run Sinatra::Application
@guyon
guyon / gist:338662
Created March 20, 2010 13:16 — forked from kenn/gist:338337
require 'rubygems'
require 'sinatra'
require 'em-http'
require 'json'
get '/tweets' do
content_type 'text/html', :charset => 'utf-8'
TWEETS.map {|tweet| "<p><b>#{tweet['user']['screen_name']}</b>: #{tweet['text']}</p>" }.join
end
@guyon
guyon / forky.rb
Created March 20, 2010 13:15 — forked from ujihisa/forky.rb
require 'drb'
# Forky(enum) {|e| something(e) }
# almost same as
# enum.each {|e| something(e) }
# but each block runs on other processes without using thread.
#
# 1. Forky makes flags
# 2. Forky starts DRb server which only has flags
# 3. Forky runs each process asynchronously which process make the flag true after the process finished
diff -ur config.c config.c
--- config.c 2009-03-05 23:45:39.120000000 +0900
+++ config.c 2009-03-05 23:46:14.995000000 +0900
@@ -11,6 +11,7 @@
#include "storage.h"
#define PRINTER_DISABLED_STRING "None (printing disabled)"
+#define PRINT_TO_CLIPBOARD_STRING "Windows clipboard"
#define HOST_BOX_TITLE "Host Name (or IP address)"