Skip to content

Instantly share code, notes, and snippets.

@peshoicov
peshoicov / goto (goupto)
Last active Jun 8, 2017
Shell script for quick navigation upwards in directories :
View goto (goupto)
#!/bin/bash
# ..
# Installation guide:
# 1. Paste this code in a file. Let say - in "/home/{user}/bin" and name it - for example - "goto"
# 2. In .bash_alias add an alias like so: "alias gt=". /home/{user}/bin/goto". NOTE the dot and the interval after it!
# 3. Make sure you've "sourced" the .bash_alias file. (cd ~; source .bash_alias)
# 4. Try "gt" anywhere, with or without parameters
# ..
@peshoicov
peshoicov / canvas.signature.js
Created Oct 9, 2017
Canvas signature, both desktop and mobile
View canvas.signature.js
// Setup canvas ..
var canvas = document.getElementById('main-canvas'),
ctx = canvas.getContext('2d');
// setup lines styles ..
ctx.strokeStyle = "#DDD";
ctx.lineWidth = 2;
// some variables we'll need ..
var drawing = false;