This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export CLICOLOR=1 | |
export LSCOLORS=BxDxfxfxgxdxdxhbadbxbx | |
PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;33m\]\u\[\033[00m\]@\[\033[01;31m\]\h\[\033[00m\]:\[\033[01;33m\]\w\[\033[00m\]' | |
#export PS1 | |
# Git branch in prompt. | |
parse_git_branch() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in */; do zip -r "${i%/}.zip" "$i"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# list all listening ports | |
sudo lsof -i -P | grep -i "listen" | |
# list all processes using specific port - this will list all pid that using port 8080 | |
lsof -i :8080 | grep "LISTEN" | |
# tell which application is running on specfic pid (for example, 1237) | |
ps -ef | grep 12337 | |
# kill processes using port 8888 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var text = "Happy Birthday, Steve!", | |
length = text.length, | |
chr = 1, | |
ar = text.split(), | |
today = new Date(); | |
try { | |
if (window.console) { | |
if (console.clear && console.log) { | |
if (today.getDate() === 17 && today.getMonth() === 2) { |