Skip to content

Instantly share code, notes, and snippets.

View tsabat's full-sized avatar

Tim Sabat tsabat

View GitHub Profile
@tsabat
tsabat / replication.md
Last active December 13, 2015 23:09
The results of the `xfs_growfs` and setting up replication.

old (look at last line)

/vol/lib/mysql# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       50G  3.9G   44G   9% /
udev            3.7G  8.0K  3.7G   1% /dev
tmpfs           1.5G  188K  1.5G   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            3.7G     0  3.7G   0% /run/shm
@tsabat
tsabat / steps.md
Last active December 14, 2015 00:09
to set up a slave from a snapshot
sudo apt-get update
export DEBIAN_FRONTEND=noninteractive
sudo -E apt-get install -y xfsprogs mysql-server
echo "/dev/xvdf /vol xfs noatime 0 0" | sudo tee -a /etc/fstab
sudo mkdir -m 000 /vol
#!/usr/bin/env ruby
#
#
# Cleanup EC2 EBS snapshots.
#
# Originally from: http://www.elastdream.com/2009/04/snapshots.html
#
require 'rubygems'
require 'right_aws'

Start vagrant and install the following:

sudo apt-get install libfreetype6
sudo apt-get install fontconfig
@tsabat
tsabat / zsh.md
Created March 6, 2013 21:22
vim keybindings at the zsh shell
set -o vi
bindkey -v
bindkey '\e[3~' delete-char
bindkey '^R' history-incremental-search-backward
@tsabat
tsabat / cors_s3.md
Last active December 15, 2015 01:49

We're using CORS to upload files to s3. IE seems to handle this poorly.

###The happy path

  • GET to our servers to sign the S3 upload fields
    • sign the request so amazon will accept it
    • set a redirect property of the form fields
  • POST the form to s3
    • AWS sets a 303 redirect to our predefiend url
  • GET to our servers from the 303
@tsabat
tsabat / md.md
Last active December 15, 2015 02:29

CodePen PRO accounts offer asset hosting. In other words, you can upload files directly to CodePen to use in the Pens that you build. For example, host an image file to use in a demo. For example, use an asset to host an image file in a demo. Rather than the awkward steps of finding somewhere else to host those images for you You no longer have to choose where to host your images. Instead, you can now just drag a file right onto CodePen. It will upload and you can use it right away.

@tsabat
tsabat / stuff.md
Created March 19, 2013 18:32
stuff

Your response was plenty-fast! We're in no real hurry to have this done, since we've done this all ourselves so far.

The job, as we imagine it, would consist of two phases:

Phase 1 - Site Cleanup

What we want is someone to look through the entire site and blog, do cleanup, and establish a style for our communication moving forward.

Phase 2 - New Feature & Newsletter Review

@tsabat
tsabat / file.rb
Last active December 15, 2015 07:19
Vagrant::Config.run do |config|
config.vm.box = "doula"
config.vm.box_url = "http://chef/doula.box"
config.vm.network :hostonly, "33.33.33.10"
end
@tsabat
tsabat / solr.md
Last active December 15, 2015 19:38
installing solr

following these instructions:

SOLR_VER=4.2.1

sudo apt-get install openjdk-7-jdk
sudo apt-get install tomcat6 tomcat6-manager

cd /opt