Skip to content

Gemfile Constraints

You can specify various different constraints in your Gemfiles when requiring other gems:

Vim Cheatsheet

Text

:set textwidth=79
to automatically insert lines breaks after 79 characters
gq
to wrap the text on the current line (or selected text)
:set wrap linebreak nolist
to display long lines as multiple screen lines

Spelling

:setlocal spell
turn on spell-checking
:set nospell
turn off spell-checking
:setlocal spell spelllang=en_gb
specify language
]s
move to next spelling mistake
zg
add the highlighted word to the dictionary
z=
suggest words for word under cursor

New files

:e filename
start editing a new file

or, in NERDTree, press m, and a from the context menu

Pry

Ruby ships with an interactive shell, or REPL (Read-Eval-Print Loop) called irb. It’s pretty handy for quick ruby evaluations, or running rails console commands.

Apache Bench

Apache Bench is a useful way to create load on a web server, for stress testing and performance analysis.

Security Best Practices

Introduction

Be aware that no system is secure. The best you can ever hope for is secure enough. As such, good security is an exercise in risk management. To manage security well, to need to understand the risks you are exposed to, their impact, the possible mitigation strategies available to you and the costs of such mitigation. Your business can then decide on what level of risk it wants to accept.