Skip to content

Instantly share code, notes, and snippets.

View mikesorae's full-sized avatar

Jumpei Nishina mikesorae

View GitHub Profile
@mikesorae
mikesorae / android.sh
Created September 19, 2014 10:00
ansible task for android sdk
export PATH="/opt/android-sdk-linux/tools:${PATH}"
@mikesorae
mikesorae / gist:d10a6c78339ac6a6af9d
Created September 11, 2014 00:31
copy local files to remote via rsync with ssh
rsync -auzv -e "ssh -p 2222" ../dir/ user@127.0.0.1:~/dir
@mikesorae
mikesorae / makigumo_bot.coffee
Created September 9, 2014 15:53
hubot用 巻雲時報 & ランダムメッセージスクリプト
# Description:
# 巻雲がしゃべるだけのbot
#
# Commands:
# hubot
Cron = require('cron').CronJob
JIHOU_MESSAGES = [
"零時、深夜零時ですよぉ?"
@mikesorae
mikesorae / gist:b499e207a8cd29a9a00f
Created September 5, 2014 01:44
add ip address to docker container with pipework
sudo /var/lib/pipework/pipework $BRIDGE_NAME $CONTAINER_ID $IP_ADDR/24
sudo ip addr add $IP_ADDR/24 dev $BRIDGE_NAME
@mikesorae
mikesorae / install_sdk.sh
Last active August 29, 2015 14:05
install android sdk from cui
# install "Android SDK Build-tools, revision 19.1"
# filtered by target
echo y | android update sdk -u -a -t ${target_name}
# target_name can take following values
#
# tools
# platform-tools
# build-tools-20.0.0
@mikesorae
mikesorae / build.gradle
Last active August 29, 2015 14:04
gradle build script for xcode project
//-------------------------------
// load default config file
//-------------------------------
def default_env_conf_url = file("default.gradle").toURL()
def config = new ConfigSlurper().parse(default_env_conf_url)
// load environment config file
if (hasProperty('env')) {
def env_config_url = file("${env}.gradle").toURL()
@mikesorae
mikesorae / redmine_custom_subject.patch
Last active August 29, 2015 14:04
this is the patch for redmine to display custom_subject in the gantt chart.
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 62c6fbb..2467a66 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -74,7 +74,12 @@ module ApplicationHelper
if options[:subject] == false
title = issue.subject.truncate(60)
else
- subject = issue.subject
+ if options[:use_custom_subject]
@mikesorae
mikesorae / output_json.rb
Created July 2, 2014 06:00
to_json excluding unneeded column with nested object
puts c1.to_json(except: [:created_at, :updated_at], include: {items: {except: [:created_at, :updated_at]}})
@mikesorae
mikesorae / prepar_apache_app.sh
Created June 30, 2014 10:18
prepare new user and config file for apache
#!/bash/bin
if [ $# != 2 ]; then
echo "usage: $0 app_name app_port" 1>&2
exit 0
fi
app_name=$1
port=$2
@mikesorae
mikesorae / prepare_nginx_app.sh
Created June 27, 2014 05:38
prepare new user and config file for nginx
#!/bash/bin
if [ $# != 2 ]; then
echo "usage: $0 app_name app_port" 1>&2
exit 0
fi
app_name=$1
port=$2