Skip to content

Instantly share code, notes, and snippets.

View fuzzygroup's full-sized avatar

J. Scott Johnson fuzzygroup

View GitHub Profile
@fuzzygroup
fuzzygroup / .tmux.conf
Created November 7, 2014 09:16
My .tmux.conf file with ` as the meta key
# 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"
@fuzzygroup
fuzzygroup / gist:24fe19dda82a9d8c188f
Created November 7, 2014 14:29
my lint based, error checking pre-commit
#!/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")
@fuzzygroup
fuzzygroup / gist:85905bafd6f104c1b7f3
Last active August 29, 2015 14:09
Docker Rails Resources
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/
require "rubygems"
# require 'awesome_print'
# require "ap"
# IRB::Irb.class_eval do
# def output_value
# ap @context.last_value
# end
# end
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
db:
image: mysql
ports:
- "3306"
web:
build: .
command: bundle exec rails server -p3500
volumes:
@fuzzygroup
fuzzygroup / memory-cloudwatch.yaml
Created October 1, 2016 12:42 — forked from weirdbricks/memory-cloudwatch.yaml
ansible playbook to add memory metrics for cloudwatch - RedHat family only
- 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"
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'

Keybase proof

I hereby claim:

  • I am fuzzygroup on github.
  • I am fuzzygroup (https://keybase.io/fuzzygroup) on keybase.
  • I have a public key ASAc0uLHZZur7k3KmRfr0GLgIPiWeaFVJmhMasz0XGbP1wo

To claim this, I am signing this object:

class HealthController < ApplicationController
def index
results = {:status => "ok"}
respond_to do |format|
format.html { render :status => 200, :html => "ok" and return }
format.json { render :status => 200, :json => results.to_json and return }
end
end
end