Skip to content

Instantly share code, notes, and snippets.

@piyo
piyo / gist:232202
Created November 11, 2009 19:10
ruby example about closure
#!/usr/bin/ruby
def get_a_closure
this_var_is_captured = 1
return_this_function = Proc.new do |x,y|
puts "#{this_var_is_captured} #{x} #{y}"
end
return_this_function
end
@piyo
piyo / erc-swit.el
Created June 20, 2009 10:05
erc-swit.el Switching through all the erc channel buffers regardless of activity.
;
; erc-swit
;
; Switching through all the erc channel buffers regardless of activity.
; Just press one key sequence, which is by default:
; Control-C Control-N for next : erc-swit-keyseq-next
; Control-C Control-P for previous : erc-swit-keyseq-prev
; The buffers are presented in alphabetical order.
;
; INSTALL
@piyo
piyo / sample Gnu Screen file .screenrc
Created June 20, 2009 02:01
sample Gnu Screen file with explicit keyboard bindings (showing defaults)
# -*- conf-unix -*-
# Add environment variable so can do fancy terminal customization in shells
setenv GNU_SCREEN "yes"
# ----------------------------------------------------------------------
# Keybindings
# ----------------------------------------------------------------------
# screen's shortcut entry character, cannot be set to ^Q