As configured in my dotfiles.
start new:
tmux
start new with session name:
require 'narray' | |
class NArray | |
class << self | |
# borrows other dimension lengths from the first object and relies on it to | |
# raise errors (or not) upon concatenation. | |
def cat(dim=0,*narrays) | |
raise ArgumentError, "'dim' must be an integer (did you forget your dim arg?)" unless dim.is_a?(Integer) | |
raise ArgumentError, "must have narrays to cat" if narrays.size == 0 | |
new_typecode = narrays.map(&:typecode).max |
module GaRuby | |
class GaRubyError < StandardError ; end | |
class Gene | |
attr_acessor :data,:value | |
def initialize(gen_num=nil) | |
@value=0 | |
if block_given? | |
@data=Array.new(gen_num){yield} | |
else |
diff --git a/Gemfile b/Gemfile | |
index eedb107..6d26f41 100644 | |
--- a/Gemfile | |
+++ b/Gemfile | |
@@ -8,7 +8,7 @@ source "http://rubygems.org" | |
group :development do | |
gem "rspec", "~> 2.8.0" | |
gem "rdoc", "~> 3.12" | |
- gem "bundler", "~> 1.0.0" | |
+ gem "bundler", ">= 1.0.0" |
require 'ruby_gntp' | |
Earthquake.init do | |
output do |item| | |
next unless item["_stream"] | |
if item["text"] | |
GNTP.notify({:app_name => "earthquake",:title => item["user"]["screen_name"],:text => item["text"],:icon => item["user"]["profile_image_url"]})#icon_path(user.screen_name, user.profile_image_url) }) | |
#if /@sifikinoko(?:[\s:]|$)/ =~ item["text"] | |
# system{ | |
# 'notify-send', | |
# '--urgency','critical', |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/bin/sh | |
# Uncomment the following two lines for normal desktop: | |
unset SESSION_MANAGER | |
#exec /etc/X11/xinit/xinitrc | |
/bin/sh /etc/X11/xinit/xinitrc | |
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup | |
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources | |
xsetroot -solid grey |
# | |
# Install: | |
# install https://github.com/github/gollum | |
# in /srv/wiki do a git init | |
# add this script to /etc/init/gollum.conf | |
# | |
# Usage: | |
# start/stop/restart gollum | |
# |
" Z - cd to recent / frequent directories | |
command! -nargs=* Z :call Z(<f-args>) | |
function! Z(...) | |
let cmd = 'fasd -d -l -e printf' | |
for arg in a:000 | |
let cmd = cmd . ' ' . arg | |
endfor | |
let pathes = split(system(cmd),"\n") | |
for i in range(0,len(pathes)-1) | |
echo i ." " . pathes[i] |
" Vim global plugin for working with ROS | |
" Maintainer: Michael Styer <michael@styer.net> | |
" Fixed by : Fujii Shohei <fujii.shohei@gmail.com> | |
" Helper commands | |
function! s:RosDecodePath(path) | |
let rosname = "" | |
let reldir = "" | |
let rosdir = "" | |
let last = "" |
# -*- coding: utf-8 -*- | |
# vim: filetype=ruby | |
config.token_file = "~/.termtter/token" | |
#config.dmsg_permission = true | |
config.update_interval = 30 | |
config.timeout = 60 | |
#config.retry = 3 | |
#config.enable_ssl = true |