Skip to content

Instantly share code, notes, and snippets.

View kokanee's full-sized avatar

ryong park kokanee

  • Seoul, South Korea
View GitHub Profile
@kokanee
kokanee / gist:4528139
Last active December 11, 2015 02:08
remove an element from array
Array.prototype.remove = function(idx){
var temp = new Array();
var i = this.length;
while(i > idx){
var kk = this.pop();
temp.push(kk);
i--;
}
@kokanee
kokanee / netmon.sh
Last active May 21, 2018 02:33
network monitoring shell script
#!/bin/bash
COUNT=10
while :
do
if [ $COUNT = 10 ]
then
printf "+--------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ \n"
printf "| TIME |ESTAB|LISTN|T_WAT|CLOSD|S_SEN|S_REC|C_WAT|F_WT1|F_WT2|CLOSI|L_ACK| \n"
printf "+--------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ \n"
COUNT=0
@kokanee
kokanee / gist:4528413
Last active December 11, 2015 02:09
log file tailing ( for .bashrc )
#!/bin/bash
alias httpdlog='tail -f /var/log/httpd/access_`/bin/date +%Y%m%d`_`/bin/date +%H`.log'