By example I will show you Bash One Time Temporary Functions (I’m not sure if they existed before me, if not, I just invented them) or simply Temp Functions. Take that circleRead More…
SSH client – console & escape commands – start tunneling/forward within a running session
If you forgot to put in your string of -L and -R and -D port forwards with ssh: ie: ssh -L 54321:localhost:443 root@mysshserver.com . Dont worry, you can launch them while your inRead More…
Bash trick – dont run script/program if its running (without using pid lock files)
This can be achieved with pid files. Example: http://candrews.integralblue.com/2009/02/one-instance-at-a-time-with-pid-file-in-bash/ Another clever way is to look thru the processes list (if your allowed to look thru all user – if not then either wayRead More…
Searching Source Code with GREP or ACK
Articles to check out: * https://www.digitalocean.com/community/tutorials/how-to-install-and-use-ack-a-grep-replacement-for-developers-on-ubuntu-14-04 * http://beyondgrep.com/why-ack/ * http://readwrite.com/2010/11/10/how-to-search-your-source-with GREP (rinIE) or EGREP (rinI) the all round search utility grep -rinIE "match word" /folder grep -rinIE "match word" /folder egrep -rinIRead More…
How to copy / migrate your repo from Github.com to a personal git / github
Imagine your working on a project on github.com and then you want to move that project over to another git server (imagine its another github server, thats not hosted on github.com, butRead More…
International Phone Number Dialing 101 – How To
Imagine you have to dial the international phone number shown below. How would you do it? Considering you can place internation calls (i.e. its part of the dialing plan of the phone your using)Read More…
Organize AXIS Camera captured dated images into dated folders
My AXIS camera (AXIS M1011-W Network Camera) captures files into files that look like this: i15-07-24_00-50-11-70.jpg i15-07-24_00-50-11-90.jpg i15-07-24_00-50-12-10.jpg i15-07-24_00-50-12-30.jpg There are thousands of these images. The issue with lots of files ofRead More…
Sed – extract Nth number from each random line
Source: http://unix.stackexchange.com/questions/84922/extract-a-part-of-one-line-from-a-file-with-sed Imagine you have a text: # cat weird.txt Number of ducks 120 how many of them are singers 100 15 humans in the choir class, and 12 can sing Fat turles:Read More…
SoftEther: the best VPN: How to set up Client to Site VPN without Port Forward
Once I learned about SoftEther VPN, I realized I was missing out on a lot. In this article I will show you how to setup a Client to Site VPN without needingRead More…
Bash – If – code block, one liner, and AND then OR && ||1liner
A normal if statement in bash looks like this if ps ax | grep "[p]rogram" &> /dev/null; then echo "program is running" else echo "program is not running" fi # COMMENT1: theRead More…