Skip to content

Instantly share code, notes, and snippets.

View rkJun's full-sized avatar

Juntai Park rkJun

View GitHub Profile
@rkJun
rkJun / Default (OSX).sublime-keymap
Last active December 18, 2015 05:39
Sublime Text 3 configuration files
[
{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["super+k", "super+s"], "command": "convert_to_snake"},
{ "keys": ["super+k", "super+c"], "command": "convert_to_camel"},
{ "keys": ["ctrl+shift+t"], "command": "delete_trailing_spaces" },
{ "keys": ["ctrl+shift+d"], "command": "toggle_trailing_spaces" },
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" },
{ "keys": ["super+alt+v"], "command": "insert_file_path" }
@rkJun
rkJun / myBatisLogParse.html
Created June 11, 2013 06:03
myBatis 로그 합치기 (Log Parser) input) Preparing: Select dummy from dual where col = ? and col2 = ? and no = ? Parameters: val1(String), val2(String), 1(Long) output -result) select ... where col = 'val1' and col2 = 'val2' and no = 1
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>MyBatis Log parse</title>
<script src="jquery-2.0.2.js"></script>
</head>
<body>
<div id="div_origin" style="float:left">
<textarea id="txt_origin" rows="30" cols="40"></textarea>
@rkJun
rkJun / ejectHDD.sh
Created July 29, 2013 05:25
ejectHDD
# change directory to My external Hard disk
# remove it's dummy files e.g) ._ hidden files.
# and, eject it.
# modify Leto_1TB to your configuration.
# modify disk1s1 to your configuration.
cd /Volumes/Leto_1TB
find ./ -name "._*" -exec rm {} \;
hdiutil eject /dev/disk1s1
@rkJun
rkJun / asciiart.txt
Created July 30, 2013 01:04
asciiart.txt from undefined
Main Controls - *FIGlet and AOL Macro Fonts Supported*
Font:
Character Width:
Character Height:
Test All More Opts About
Other Stuff From patorjk.com That You Might Like:
Typing Speed Test
Keyboard Layout Analzyer
유료 프로그램을 사용하거나 (Paragon NTFS 같은),
무료 ntfs 3g (osx fuse & ntfs 3g) 를 사용하는 방법도 있고,
패러럴즈를 통해 가상 윈도7 에서 사용하는 방법도 있다.
여러가지를 다 사용해 봤지만, 아래 방법이 개인적으로는 가장 안정적인 느낌이다.
sudo vi /etc/fstab
LABEL=NAME none ntfs rw,auto,nobrowse
@rkJun
rkJun / install_docker_on_macOS.md
Last active June 30, 2017 01:21
Install Docker on MacOS

Install Docker on MacOS

  1. Install Virtual Box

  2. Install docker

$ brew install docker

...

Keybase proof

I hereby claim:

  • I am rkjun on github.
  • I am rkjun (https://keybase.io/rkjun) on keybase.
  • I have a public key ASBJxuWFW5SrGCoahXKZkpz1UBZgy6q7_bBu1MedatA3mgo

To claim this, I am signing this object:

@rkJun
rkJun / healthchecker.sh
Created July 16, 2018 02:50
Server Health Checker (Memory, Disk, CPU) and send to slack
#!/bin/bash
freeText=$(free -m | awk 'NR==2{printf "Memory Usage: %s/%sMB (%.2f%%)\n", $3,$2,$3*100/$2 }')
diskText=$(df -h | awk '$NF=="/"{printf "Disk Usage: %d/%dGB (%s)\n", $3,$2,$5}')
cpuText=$(top -bn1 | grep load | awk '{printf "CPU Load: %.2f\n", $(NF-2)}')
resultText=$(echo 'ServerName ('${HOSTNAME}')' ${cpuText} ${freeText} ${diskText})
echo $resultText
curl 'https://hooks.slack.com/services/...blah...blah..webhook.url' \
-X POST -H 'Content-type: application/json' \
--data @<(cat <<EOF
@rkJun
rkJun / healthchecker.sh
Last active July 16, 2018 02:53
Server Health Checker (Memory, Disk, CPU) and send to slack
#!/bin/bash
freeText=$(free -m | awk 'NR==2{printf "Memory Usage: %s/%sMB (%.2f%%)\n", $3,$2,$3*100/$2 }')
diskText=$(df -h | awk '$NF=="/"{printf "Disk Usage: %d/%dGB (%s)\n", $3,$2,$5}')
cpuText=$(top -bn1 | grep load | awk '{printf "CPU Load: %.2f\n", $(NF-2)}')
resultText=$(echo 'ServerName ('${HOSTNAME}')' ${cpuText} ${freeText} ${diskText})
#echo $resultText
#ServerName (precise64) CPU Load: 0.00 Memory Usage: 315/363MB (86.78%) Disk Usage: 1/78GB (3%)
curl 'https://hooks.slack.com/services/...blah...blah..webhook.url' \
-X POST -H 'Content-type: application/json' \