Skip to content

Instantly share code, notes, and snippets.


Keith Kim keithkim

View GitHub Profile
keithkim /
Last active January 2, 2022 00:05
simple script to automate merging converted mp3 files into single mp3 and add cover image
# Keith Kim, 2021-06
# This is to automate merging mp3 files and add cover image for audible audio book files converted to mp3 using AAXtoMP3
for authorpath in `find . -maxdepth 1 -type d -print`
if [ "." == "$authorpath" ]; then continue; fi
View now
# NAME: now
# PATH: $HOME/bin
# DESC: Display current weather, calendar and time
# CALL: Called from terminal or ~/.bashrc
# DATE: Apr 6, 2017. Modified: May 24, 2019.
View docker-compose-kafka.yml
version: '2'
container_name: zookeeper
image: wurstmeister/zookeeper
- "2181:2181"
build: .
container_name: kafka
keithkim / multimon-output.html
Created August 27, 2020 19:19
APC UPS CGI outputs
View multimon-output.html
Content-Type: text/html; charset=utf-8
Content-Language: en
Pragma: no-cache
<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns="" xml:lang="en">
<title>Multimon: UPS Status Page</title>
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 February 13, 2018 23:19
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 January 20, 2018 22:54
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")
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:
keithkim / .screenrc
Created March 13, 2013 01:45
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