Skip to content

Instantly share code, notes, and snippets.

@peshoicov
peshoicov / goto (goupto)
Last active June 8, 2017 06:47
Shell script for quick navigation upwards in directories :
#!/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 October 9, 2017 10:55
Canvas signature, both desktop and mobile
// 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;