Skip to content

Instantly share code, notes, and snippets.

@take4
take4 / zabbix-docker-compose.yaml
Created October 17, 2016 06:57
dockerでzabbixを動かす
version: '2'
services:
mysql:
image: mysql:5.7
restart: always
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci
volumes:
- ./data/mysql:/var/lib/mysql
ports:
- "3306:3306"
@take4
take4 / docker-clean.sh
Created September 16, 2016 09:17
Dockerで溜まったゴミを削除する
docker rm $(docker ps -a -q)
docker rmi $(docker images -f "dangling=true" -q)
docker volume rm $(docker volume ls | awk 'NR > 1 {print $2}')
@take4
take4 / Dockerfile
Created September 9, 2016 02:34
Dockerで作るシンプルなRails開発環境
FROM ruby:2.3.1
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN mkdir /myapp
WORKDIR /myapp
ADD Gemfile /myapp/Gemfile
ADD Gemfile.lock /myapp/Gemfile.lock
RUN bundle install
@take4
take4 / localhost.yaml
Last active May 25, 2016 08:26
mac provisioning by ansible
- hosts: localhost
connection: local
gather_facts: no
sudo: no
vars:
homebrew_taps:
- caskroom/cask
homebrew_packages:
- { name: nkf }
- { name: rbenv }
@take4
take4 / 0_reuse_code.js
Last active August 29, 2015 14:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@take4
take4 / gist:390a4b5b989178815d5a
Created June 7, 2015 06:06
ファイルを1行ずつ読み込むサンプル
#!/bin/sh
filename=$1
cat ${filename} | while read line
do
echo ${line}
done