This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 | |
| DATABASE="$1" | |
| TABLE="$2" | |
| mysqldump | |
| --user=username \ | |
| --password=password \ | |
| --complete-insert \ | |
| --quick \ |
This file contains hidden or 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 | |
| #========================================= | |
| # Script for storing and restoring cache | |
| # in Java / Scala project on werkcer | |
| #========================================= | |
| # cache directories | |
| CACHES=( "ivy2" "sbt" ) | |
| CMD="$1" |
This file contains hidden or 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
| # check if `docker-machine` command exists | |
| if command -v docker-machine > /dev/null; then | |
| # fetch the first running machine name | |
| local machine=$(docker-machine ls | grep "Running" | head -n 1 | awk '{ print $1 }') | |
| if [ "$machine" != "" ]; then | |
| eval "$(docker-machine env $machine)" | |
| fi | |
| fi |
This file contains hidden or 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
| /Users/soshi/.rbenv/versions/2.1.5/bin/ruby extconf.rb | |
| checking for rb_thread_blocking_region()... yes | |
| checking for rb_thread_call_without_gvl()... yes | |
| checking for rb_thread_alone()... yes | |
| checking for rb_str_set_len()... yes | |
| checking for clock_gettime() in -lrt... no | |
| checking for sys/select.h... yes | |
| checking for poll.h... yes | |
| checking for sys/epoll.h... no | |
| checking for sys/event.h... yes |
This file contains hidden or 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
| FROM google/golang | |
| RUN apt-get update -y && \ | |
| apt-get install -y ca-certificates git-core ssh | |
| ADD id_rsa /root/.ssh/id_rsa | |
| RUN chmod 400 /root/.ssh/id_rsa | |
| RUN echo "Host github.com\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config | |
| RUN git config --global url.ssh://git@github.com/.insteadOf https://github.com/ |
This file contains hidden or 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
| package main | |
| import ( | |
| "sync" | |
| "github.com/k0kubun/pp" | |
| ) | |
| func main() { | |
| m := map[int]string{} |
This file contains hidden or 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
| local machine=dev | |
| local state=`docker-machine ls | grep $machine | awk '{ print $4 }'` | |
| # Start machine if not running | |
| if [[ "$state" != "Running" ]]; then | |
| echo "Machine \"$machine\" is not running. Starting..." | |
| docker-machine start $machine | |
| docker-compose up -d | |
| fi |