Colored for chat colors
gem install colored
It has many comments since I tried to explain what is going on for less-experienced Ruby people.
| "A blatant workman ripoff of bmx 007's beautiful colemak version called 'colqer' http://www.vim.org/scripts/script.php?script_id=2865 It makes vim so that you can insert and Ex mode in the workman keyboard layout, but can do the rest in qwerty. | |
| "usage: put it in ~/.vim/plugin/ as workman.vim | |
| "press \; in normal mode to activate/deactivate it. | |
| "Keyboard is qwerty | |
| " we want workman in insert mode | |
| function IMapColemak() | |
| if s:imap_colemak == 0 | |
| noremap! q q | |
| noremap! w d |
| - if Rails.env.test? | |
| :javascript | |
| $.fx.off = true; |
| autoload -Uz vcs_info | |
| zstyle ':vcs_info:*' check-for-changes true | |
| zstyle ':vcs_info:*' enable git svn hg | |
| ### git: Show marker (T) if there are untracked files in repository | |
| # Make sure you have added staged to your 'formats': %c | |
| function +vi-git-untracked(){ | |
| if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' ]] && \ | |
| git status --porcelain | grep '??' &> /dev/null ; then |
| #!/usr/bin/env bash | |
| uninstall() { | |
| list=`gem list --no-versions` | |
| for gem in $list; do | |
| gem uninstall $gem -aIx | |
| done | |
| gem list | |
| gem install bundler | |
| } |
Couldn't find the text of this for a while...
| # Blocks while a client is connected, and does not time out automatically | |
| require 'socket' | |
| require 'etc' | |
| Socket.unix_server_loop("/tmp/sock") do |socket| | |
| begin | |
| login = Etc.getpwuid(socket.getpeereid.first).name | |
| puts "#{login} connected" | |
| input = socket.gets.strip | |
| puts "#{login} sent #{input}" |
| START n=node(*) | |
| WHERE not(n-[*..2]-()) | |
| DELETE n; |