Skip to content

Instantly share code, notes, and snippets.

=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

Namespace for classes and modules that handle serving documentation over HTTP

@Arimeka
Arimeka / log_cleaner.rb
Created November 11, 2012 17:11
Clean kern.log and syslog. I hope.
# Clean .log files
# Go to /var/log
Dir.chdir("/var/log")
# Clean log files if size > 20 Mb
File.truncate("kern.log", 0) if File.size("kern.log") > (20 * 1024**2)
File.truncate("syslog", 0) if File.size("syslog") > (20 * 1024**2)