Skip to content

Instantly share code, notes, and snippets.

Keith Kim keithkim

Block or report user

Report or block keithkim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .color
# Reset
Color_Off='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
Blue='\e[0;34m' # Blue
Purple='\e[0;35m' # Purple
keithkim / update_python_package_via_pip.txt
Created Feb 13, 2018
Update Python package using pip
View update_python_package_via_pip.txt
# Windows
for /F "delims===" %i in ('pip freeze -l') do pip install -U %i
# or,
for /F "delims= " %i in ('pip list --outdated') do pip install -U %i
# Linux
sudo -H pip install pipdate
sudo -H pipdate
# or,
pip list --outdated --format=legacy | awk '{print $1;}' | xargs -n1 pip install -U
keithkim / colortest.bat
Created Jan 20, 2018
Colors in cmd console or batch file for Windows
View colortest.bat
REM ### credit:
REM ### from:
@echo off
cls && color 08
rem .... the following line creates a [DEL] [ASCII 8] [Backspace] character to use later
rem .... All this to remove [:]
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (set "DEL=%%a")
keithkim / .screenrc
Created Mar 13, 2013
Linux screen configuration (.screenrc). Instead of ^C, use ^O. And use ^K for copy mode.
View .screenrc
shell -$SHELL
startup_message off
defscrollback 5000
shelltitle "$ |bash"
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'
# caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= %c"
activity "%c activity -> %n%f %t"
caption always "%{= Wk}%-w%{= Bw}%n %t%{-}%+w %-="
term screen-256color
View .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
# User specific environment and startup programs
. ~/.color
View .vimrc
colorscheme ron
set nu
set ai
set tabstop=4
set ruler
set laststatus=2
set showmode
set paste
set expandtab
let loaded_matchparen=1
cd ~
sudo yum update
sudo yum install java-1.7.0-openjdk.i686 -y
wget -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
View Liberal Regex Pattern for Web URLs
The regex patterns in this gist are intended only to match web URLs -- http,
https, and naked domains like "". For a pattern that attempts to
match all URLs, regardless of protocol, see:
# Single-line version:
You can’t perform that action at this time.