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 "your_email@example.com"

Adding your SSH key to the ssh-agent

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

Install Eclim on Ubuntu 16.04 lts

Requirements

  • Vim 7.1 >
  • Eclipse 4.6.x (Neon)
  • Java SDK 1.7 >=

Installation steps:

  1. Download the Eclim 4.6 installer.
  • Set Caps to Ctrl:
setxkbmap -layout ch -option ctrl:nocaps
sudo vim /etc/default/keyboard and change XKBOPTIONS="ctrl:nocaps"

install shutter

sudo add-apt-repository ppa:shutter/ppa
sudo apt-get update
  • c-b ] toggle copy mode - scroll within window

  • c-b w list windows

@simplay
simplay / read_ruby_docs.md
Created October 25, 2016 09:32
read ruby documnetation using pry

Read ruby documentation

pry
ri String

Generate documentation:

setxkbmap -option

Where can be for example of:

caps:none – Disables Caps Lock.
caps:super – Caps Lock becomes an additional Super (aka Win key).
caps:ctrl_modifier – Caps Lock becomes an additional Ctrl.
caps:numlock – Caps Lock becomes an additional Num Lock.
caps:escape – Caps Lock becomes an additional Escape.

caps:backspace – Caps Lock becomes an additional Backspace.

  1. \curl -sSL https://get.rvm.io | bash -s stable

  2. https://rvm.io/integration/gnome-terminal

  3. [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

Load RVM into a shell session as a function

at the BOTTOM (last line - important!) of my .bashrc file. I had it in my .bash_profile file (I am on Ubuntu) and that only partially worked leading to the confusing errors.

  1. restart terminal
function filtered_img = bfilt( img, sigma_s, sigma_r)
%BFILT bilateral filter applied on img using sigma_s, sigma_r.
% img image, spatial, range deviation sigma_s, sigma_r
h = waitbar(0, 'Applying Bilateral Filter...');
set(h, 'Name', 'Bilateral Filter Progress Bar');
% compute window size - depends on sigma_s
w = ceil(1.5*sigma_s);