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 | |
docker stats --format "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}" $(docker ps|grep -v "NAMES"|awk '{ print $NF }'|tr "\n" " ") |
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
alias gundo='git reset --soft HEAD~1' | |
function gc() { | |
git commit -m "$*" | |
} | |
function ga() { | |
git add "$*" | |
} | |
alias gcurrentbranch='git rev-parse --abbrev-ref HEAD' | |
alias gaa='git add .' | |
alias gs='git status' |
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
- hosts: all | |
vars: | |
ec2_access_key: "AKIA-----------A" | |
ec2_secret_key: "i-------------/--------A" | |
remote_user: ec2-user | |
sudo: yes | |
tasks: | |
- name: "make sure package perl-switch is installed for the monitoring scripts" | |
yum: name=perl-Switch state=present | |
when: ansible_os_family == "RedHat" |
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
db: | |
image: mysql | |
ports: | |
- "3306" | |
web: | |
build: . | |
command: bundle exec rails server -p3500 | |
volumes: |
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 ruby:2.1.5 | |
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev | |
RUN mkdir /myapp | |
WORKDIR /myapp | |
ADD Gemfile /myapp/Gemfile | |
ADD Gemfile.lock /myapp/Gemfile.lock | |
RUN bundle install |
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
require "rubygems" | |
# require 'awesome_print' | |
# require "ap" | |
# IRB::Irb.class_eval do | |
# def output_value | |
# ap @context.last_value | |
# end | |
# end | |
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
http://blog.scoutapp.com/articles/2013/08/28/docker-git-for-deployment | |
http://steveltn.me/blog/2014/03/15/deploy-rails-applications-using-docker/ | |
https://www.youtube.com/watch?v=PBBUnNS4dRw | |
https://www.youtube.com/watch?v=Q5POuMHxW-0 | |
https://www.youtube.com/watch?v=QgmzBuPuM6I | |
https://www.google.com/search?q=rails+deployment+docker& | |
http://docs.docker.com/reference/builder/ | |
https://blog.abevoelker.com/rails-development-using-docker-and-vagrant/ | |
https://intercityup.com/blog/deploy-rails-app-including-database-configuration-env-vars-assets-using-docker/ | |
https://docs.docker.com/installation/mac/ |
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 ruby | |
# | |
# A hook script to verify that only syntactically valid ruby code is commited. | |
# Called by git-commit with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# Put this code into a file called "pre-commit" inside your .git/hooks | |
# directory, and make sure it is executable ("chmod +x .git/hooks/pre-commit") |
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
# remap prefix to Control + a | |
# set -g prefix C-a | |
# unbind C-b | |
# bind C-a send-prefix | |
unbind C-b | |
set -g prefix ` | |
bind-key ` send-prefix | |
set-option -g "screen-256color" |
NewerOlder