Heath Anderson handerson

View keybase.md

Keybase proof

I hereby claim:

  • I am handerson on github.
  • I am heathanderson (https://keybase.io/heathanderson) on keybase.
  • I have a public key whose fingerprint is 69FE B984 7C01 0847 BB07 5CE5 36F7 C6C8 8A01 EA2C

To claim this, I am signing this object:

View app.rb
1 2 3 4 5 6 7 8 9 10
require 'gollum/frontend/app'
require 'digest/sha1'
 
class App < Precious::App
User = Struct.new(:name, :email, :password_hash)
 
before { authenticate! }
 
helpers do
def authenticate!
View LICENSE
1 2 3 4 5 6 7
Copyright (c) 2012 Heath Anderson
 
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE O
View mysqlfix.sh
1 2 3 4 5 6 7
#MySQL Client
ln -s /Applications/MySQLWorkbench.app/Contents/Resources/mysql /usr/bin/mysql
#MySQL Dump
ln -s /Applications/MySQLWorkbench.app/Contents/Resources/mysqldump /usr/bin/mysqldump
 
#How to fix the "Library not loaded: libmysqlclient.18.dylib (LoadError)" error
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
View sqlite_backup_to_cloudfiles.rb
1 2 3 4 5 6 7 8 9 10
require 'rubygems'
require 'cloudfiles'
require 'sqlite3'
cf = CloudFiles::Connection.new(:username => "", :api_key => "")
 
original = = SQLite3::Database.new('/var/www/project/current/db/original.db')
backup = SQLite3::Database.new('/home/deploy/backup.sqlite3')
 
backup_process = SQLite3::Backup.new(backup, 'main', original, 'main')
View mysql_backup_to_cloudfiles.rb
1 2 3 4 5 6 7 8 9 10
require 'rubygems'
require 'cloudfiles'
cf = CloudFiles::Connection.new(:username => "", :api_key => "")
 
`mysqldump -u root --password=password --all-databases > /home/deploy/backup.sql`
 
file = File.new("/home/deploy/backup.sql")
 
if file
View application.css
1 2 3 4 5 6 7 8 9 10
body {
background-color: #C5CCD6; /* Background color */
color: #222; /* Foreground color used for text */
font-family: Helvetica;
font-size: 14px;
margin: 0; /* Amount of negative space around the outside of the body */
padding: 0; /* Amount of negative space around the inside of the body */
-webkit-user-select: none;
overflow-x: hidden;
}
View .gitignore
1 2 3 4 5 6 7 8 9 10
# RoR/Padrino
log/**/*
api/log/**/*
tmp/**/*
api/tmp/**/*
bin/*
vendor/gems/*
!vendor/gems/cache/
.sass-cache/*
*.sqlite3
View Base File.sublime-settings
1 2 3 4 5 6 7 8 9 10
{
"color_scheme": "Packages/Color Scheme - Default/Novel.tmTheme",
"font_size": 12,
"tab_size": 2,
"translate_tabs_to_spaces": true,
"rulers": [80],
"font_face": "Inconsolata",
"word_wrap": true,
"wrap_width":80
}
View monkey_patch_sql2005_limit.rb
1 2 3 4 5 6 7 8 9
# monkey-patching SQLServerAdapter to support SQL Server 2005-style pagination
# inspired by
# - http://alexle.net/archives/tag/mislav-will_paginate-sqlserver-2005
# - http://www.sqlservercentral.com/articles/T-SQL/66030/
# - http://stackoverflow.com/questions/4871523/sql-server-2008-r2-pagination/4871591#4871591
# - https://gist.github.com/335683
 
# place the following at the bottom of environment.rb:
# require "#{RAILS_ROOT}/lib/monkey_patch_sql2005_limit.rb"
Something went wrong with that request. Please try again.