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 | |
set -eu | |
set -x | |
brew update | |
brew upgrade --all | |
set +x | |
brew cask update | |
for c in `brew cask list`; do |
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 | |
CMD=`basename $0` | |
usage() { | |
echo "Usage: ${CMD} on|off" | |
} | |
if [[ $# -eq 0 ]]; then | |
usage |
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 | |
# Show help | |
if [[ $1 = '--help' || $1 = '-h' ]]; then | |
echo "Usage: $0 [TARGET_DIR]" | |
echo "Zip each directory inside TARGET_DIR. If no argument is given, the current directory is regarded as TARGET_DIR." | |
exit 1 | |
fi | |
# Zip each directory inside the given directory |
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/sh | |
auto_ssh() { | |
HOST=$1 | |
ID=$2 | |
PASS=$3 | |
KEY=$4 | |
expect -c " | |
set timeout 10 |
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 | |
CATALINA_HOME=/usr/local/src/apache-tomcat-8.0.14/ | |
start() { | |
$CATALINA_HOME/bin/startup.sh | |
return 0 | |
} | |
stop() { |
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
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
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 | |
dumpfile="dump.sql" | |
user="user" | |
host="XXX.XXX.XXX.XXX" | |
distdir="." | |
mysqldump -u root dbname > $dumpfile | |
scp $dumpfile $user@$host:$distdir |
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 | |
PROCESS=$1 | |
PROCESS_NUM=$(ps cax | grep $PROCESS | wc -l) | |
# 引数チェック | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 process_name" 1>&2 | |
exit1 | |
fi |
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
apply{ | |
plugin 'scala' | |
plugin 'idea' | |
} | |
ext { | |
scalaVersion = '2.11' | |
spec2Version = '2.3.12' | |
} |