Skip to content

Instantly share code, notes, and snippets.

View sunggun-yu's full-sized avatar
🎯
Focusing

Sunggun Yu sunggun-yu

🎯
Focusing
View GitHub Profile
@sunggun-yu
sunggun-yu / aws-mfa-role
Last active May 22, 2020 04:32
AWS MFA for assume role: works for terraform aws provider
#!/bin/bash
# prerequisites
# aws-cli : brew install awscli
# jq : brew install jq
read -p "Enter ENV (account1 | account2 | account3 | account4): " targe_env
case "$targe_env" in
"account1") aws_account=<account1>
@sunggun-yu
sunggun-yu / gist:4416430
Created December 31, 2012 00:42
Install NMON - CentOS 64bit
# Get Root
sudo su
# Download NMON archive
cd /tmp
wget http://nmon.sourceforge.net/docs/MPG_nmon_for_Linux_14a_binaries.zip
# Install unzip if you don't have
yum install unzip
@sunggun-yu
sunggun-yu / gist:4351031
Last active January 4, 2018 10:56
Enabling/Disabling FTP server on OSX Mountain Lion
# Enabling
sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
# Disabling
sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist
@sunggun-yu
sunggun-yu / gist:4731865
Created February 7, 2013 15:57
Using external message resource file in Spring ReloadableResourceBundleMessageSource.
<!-- MessageSource -->
<!-- /usr/local/conf/app/messages/messages_en_US.properties -->
<beans:bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<beans:property name="basename">
<beans:value>file:/usr/local/conf/app/messages/messages</beans:value>
</beans:property>
<beans:property name="cacheSeconds" value="600" />
</beans:bean>
@sunggun-yu
sunggun-yu / gist:3232247
Created August 2, 2012 01:21
Kill all the process by name
kill -9 `pidof memcached`
killall memcached