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
# install require packages | |
sudo yum install -y perl-Switch perl-Sys-Syslog perl-LWP-Protocol-https | |
# download and extract | |
curl -LO http://ec2-downloads.s3.amazonaws.com/cloudwatch-samples/CloudWatchMonitoringScripts-v1.1.0.zip | |
mkdir ~/cloudwatch | |
test -f ~/cloudwatch/aws-scripts-mon/mon-put-instance-data.pl || unzip CloudWatchMonitoringScripts-v1.1.0.zip -d ~/cloudwatch/ | |
rm CloudWatchMonitoringScripts-v1.1.0.zip | |
# create credentials file |
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
---- | |
-- User configuration file for lsyncd. | |
-- | |
settings{ | |
logfile="/var/log/lsyncd/lsyncd.log", | |
statusFile="/var/log/lsyncd/lsyncd.status", | |
maxDelays=15 | |
} | |
--- |
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
open /Applications/NetBeans/NetBeans\ 8.0.app && /Applications/NetBeans/NetBeans\ 8.0.app/Contents/MacOS/netbeans --open . |
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 bash | |
export PATH="$HOME/.phpenv/bin:/opt/local/bin:$PATH" | |
eval "$(phpenv init -)" | |
args="" | |
while [ "$1" != "" ] ; do | |
arg=$1 | |
if [[ $arg =~ NetBeansSuite.php && -f $(pwd)/nbproject/NetBeansSuite.php ]] ; then | |
# Change custom NetBeansSuite path | |
arg=$(pwd)/nbproject/NetBeansSuite.php |
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 bash | |
#Common Name (eg, your name or your server's hostname) | |
CN="ssl.example.com" | |
# Country Name (2 letter code) | |
C="JP" | |
# State or Province Name (full name) | |
ST="Fukuoka" | |
# Locality Name (eg, city) | |
L="Fukuoka" |
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
sudo find /var/spool/postfix/deferred/ -type f -exec grep -l 'search body test' '{}' \; | xargs -n1 basename | xargs -n1 sudo postsuper -h |
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
.mtapp-tabs-navi li { | |
margin-right: 4px; | |
} | |
.mtapp-tabs-navi li.first-child { | |
margin-left: 0; | |
} | |
.mtapp-tabs-navi li a { | |
padding: 10px; | |
min-width: 6em; | |
color: #7B7C7D; |
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 php | |
<?php | |
$paths = array( | |
PHP_BINDIR, | |
'/usr/local/phpenv/shims', | |
getenv('PATH') | |
); | |
putenv('PATH=' . join(PATH_SEPARATOR, $paths)); | |
array_shift($argv); |
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
# LANGUAGE translation of CakePHP Application | |
# Copyright YEAR NAME <EMAIL@ADDRESS> | |
# | |
msgid "" | |
msgstr "" | |
"Project-Id-Version: PROJECT VERSION\n" | |
"POT-Creation-Date: 2013-09-18 23:20+0200\n" | |
"PO-Revision-Date: 2013-11-18 13:21+0900\n" | |
"Last-Translator: nojimage <nojimage@gmail.com>\n" | |
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n" |
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
<?php | |
// ... | |
if (!extension_loaded('timecop')) { | |
$response = $app->sendFile($file, 200, $headers); | |
} else { | |
// timecop hack | |
$response = new Symfony\Component\HttpFoundation\BinaryFileResponse($file, 200, $headers, false, null, false, false); | |
$date = \DateTime::createFromFormat('U', $response->getFile()->getMTime()); |