동영상 쪼개기
This file contains 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
#! /usr/bin/env ruby | |
class MegaGreeter | |
attr_accessor :names | |
# Create the object | |
def initialize(names = "World") | |
@names = names | |
end |
This file contains 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
alias h='history' | |
alias dl='docker ps -l -q' | |
# Invoke GnuPG-Agent the first time we login. | |
# Does `~/.gpg-agent-info' exist and points to gpg-agent process accepting signals? | |
if test -f $HOME/.gpg-agent-info && \ | |
kill -0 `cut -d: -f 2 $HOME/.gpg-agent-info` 2>/dev/null; then | |
GPG_AGENT_INFO=`cat $HOME/.gpg-agent-info | cut -c 16-` | |
else | |
# No, gpg-agent not available; start gpg-agent |
This file contains 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
{ | |
init: function(elevators, floors) { | |
var elevator_zero = elevators[0]; | |
var elevator_active = elevators[0]; | |
var idle_elevators = []; | |
var idle_elevator = {}; | |
var getIdleElevator = function(floorNum, direction) { | |
if (idle_elevators.length > 0) { |
This file contains 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
#!/bin/bash | |
# | |
# Bash script for Subversion integration with Slack | |
# | |
# 1. Save this file in /usr/bin as slack-svn | |
# 2. Make it executable: | |
# chmod +x /usr/bin/slack-svn | |
# 3. Put this line at the end of file of your_svn_repo/hooks/post-commit: | |
# slack-svn $REPOS $REV full_path_to_svn_directory | |
# 4. Edit this file, especially from line 16-20 and 27 (example given is for Redmine) |
This file contains 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
유료 프로그램을 사용하거나 (Paragon NTFS 같은), | |
무료 ntfs 3g (osx fuse & ntfs 3g) 를 사용하는 방법도 있고, | |
패러럴즈를 통해 가상 윈도7 에서 사용하는 방법도 있다. | |
여러가지를 다 사용해 봤지만, 아래 방법이 개인적으로는 가장 안정적인 느낌이다. | |
sudo vi /etc/fstab | |
LABEL=NAME none ntfs rw,auto,nobrowse |
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:
This file contains 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
#!/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 |
This file contains 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
#!/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' \ |