Skip to content

Instantly share code, notes, and snippets.

View alexanderjeurissen's full-sized avatar

Alexander Jeurissen alexanderjeurissen

View GitHub Profile
@sirupsen
sirupsen / README.md
Created October 15, 2010 15:23
Simple evented ChatServer in pure Ruby using network I/O with select(2).

Dependencies

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.

@MattWoelk
MattWoelk / workman.vim
Created March 25, 2011 23:45
workman keyboard layout for vim
"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
@djo
djo / js.html.haml
Created December 13, 2011 10:07
Speed up your Capybara JS specs you can turn off jquery animation. In this case all animations will immediately set elements to their final state when called, rather than displaying an effect.
- if Rails.env.test?
:javascript
$.fx.off = true;
@kljensen
kljensen / prompt.zsh
Created May 31, 2012 20:13
Kyle's zsh prompt (pilfered from others)
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
@IanVaughan
IanVaughan / uninstall_gems.sh
Created June 9, 2012 20:37
Uninstall all rbenv gems
#!/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
}
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

# 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}"
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@tirthb
tirthb / gist:5366126
Created April 11, 2013 18:52
Neo4j cypher query to remove orphan nodes i.e. nodes with no relationships
START n=node(*)
WHERE not(n-[*..2]-())
DELETE n;