Skip to content

Instantly share code, notes, and snippets.

@simplay
simplay / ssh_setup.md
Last active November 22, 2016 06:45
ssh cheatsheet

SSH Cheatsheet

SSH-Client

Generating a new SSH key

$ ssh-keygen -t rsa -b 4096 -C "[email protected]"

Adding your SSH key to the ssh-agent

$ eval "$(ssh-agent -s)" $ ssh-add ~/.ssh/id_rsa

@simplay
simplay / tmux-cheatsheet.markdown
Created February 13, 2017 13:21 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@simplay
simplay / debugging_in_jruby.md
Created February 20, 2017 08:42 — forked from klappradla/debugging_in_jruby.md
Debugging in JRuby

Debugging in JRuby

Step-by-step debugging and stack navigation for JRuby code.

Problem: the common tools byebug and pry-byebug are MRI-only.

Prerequisites

Force JRuby to run in fully interpreted mode:
(otherwise next would behave like step)

http://ubuntuhandbook.org/index.php/2017/04/install-the-latest-keepass2-2-35-in-ubuntu-16-04-16-10-14-04/
@simplay
simplay / yardoc_cheatsheet.md
Created July 21, 2017 13:36 — forked from chetan/yardoc_cheatsheet.md
YARD cheatsheet

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

PSQL Cheat-Sheet

Some Facts

  • NULLis never equal to anything.
  • 7 = NULLand 7 <> NULL always yield NULL
  • 7 IS DISTINCT FROM NULL is TRUE
  • 7 IS NOT DISTINCT FROM NULL is FALSE
  • Match UNKNOWN via IS (NOT) UNKNOWN
  • Only records with a true conditional in a WHERE statement are matched (and hence fetched).
@simplay
simplay / gist:b5c5e84009048a238eea430b55968c1c
Created October 2, 2017 10:52
Install Vim 8 with Python, Python 3, Ruby and Lua support on Ubuntu 16.04
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd ~
@simplay
simplay / require_gems.md
Created October 13, 2017 07:56
Require all gems specified in a Gemfile in a non Rails app.

Inside Gemfile:

source "https://rubygems.org"
gem 'hashtel'

The app.rb code: