Skip to content

Instantly share code, notes, and snippets.

View brianwebb01's full-sized avatar

Brian Webb brianwebb01

View GitHub Profile
@chrismdp
chrismdp / bootstrap_chef.bash
Created June 15, 2011 07:12 — forked from michaelvobrien/bootstrap_chef.bash
Bootstrap Chef Solo on Ubuntu
#!/usr/bin/env bash
# call like this on the target server:
# NODENAME='foo' CHEF_ENV='production' RUNLIST='["role[foo]","recipe[bar]"]' CHEFREPO='git@example.com:repo.git' bash <( curl -L https://raw.github.com/gist/1026628 )
# You will need to ensure that the ssh key is already set up on the server.
set -e
export CHEF_DIR="${HOME}/chef"
sudo rm -rf $CHEF_DIR
mkdir -p "$CHEF_DIR"
@ehowe
ehowe / ffmpeg.sh
Created August 11, 2011 22:16
ffmpeg ey
#!/bin/bash
media_libs="/engineyard/portage/media-libs"
media_sound="/engineyard/portage/media-sound"
media_video="/engineyard/portage/media-video"
dev_lang="/engineyard/portage/dev-lang"
dev_python="/engineyard/portage/dev-python"
if [ $(uname -m) == 'x86_64' ]; then
mask="~amd64"
#!/bin/bash
export PATH=/usr/local/.rbenv/bin:/root/.rbenv/shims/:$PATH;
cd /var/www/<project_name>/current && bundle exec sidekiq -e production -C /var/www/<project_name>/current/config/sidekiq.yml -P /var/www/<project_name>/shared/pids/sidekiq.pid
@brianwebb01
brianwebb01 / get_mysql_db_size.sql
Created October 21, 2015 12:38
SQL to find how big mysql report the database data to be.
SELECT table_schema "YOUR_DB_NAME", Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" FROM information_schema.tables GROUP BY table_schema;