Skip to content

Instantly share code, notes, and snippets.

View levifig's full-sized avatar
👀

Levi Figueira levifig

👀
View GitHub Profile
### Keybase proof
I hereby claim:
* I am levifig on github.
* I am levifig (https://keybase.io/levifig) on keybase.
* I have a public key whose fingerprint is 5CC6 28F0 61B8 0B4D 44D3 498C D834 4ED0 94DD FCC9
To claim this, I am signing this object:
@levifig
levifig / README.md
Last active August 29, 2015 14:20 — forked from oodavid/README.md

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc

I'm firewall'ed, but I obviously open port 22 for remote login!
I found out getpwnam() is a PERL script
Never knew you could run scripts at login prompt... OpenSSHd hole? :S
WTF !?!?
SCARY!
############
8/3/09 10:47:55 PM com.apple.SecurityServer[22] getpwnam() failed for user kevin, creating invalid credential
8/3/09 10:47:55 PM com.apple.SecurityServer[22] getpwnam() failed for user kevin, creating invalid credential
/* `HTML5 Reset
----------------------------------------------------------------------------------------------------*/
a,
abbr,
address,
article,
aside,
audio,
b,
@levifig
levifig / Apache Tweaking
Created February 16, 2010 00:58 — forked from fcoury/Apache Tweaking
Apache Tweaking
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 180
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
@levifig
levifig / RPS-SPEC
Created April 10, 2010 05:54 — forked from jarodl/RPS-SPEC
= Ruby Packaging Standard
The aim of this document is to specify a common structure of how a
Ruby package distributed as source (that is, but not limited to,
development directories, version-controlled repositories, .tar.gz,
Gems, ...) should conform to.
(See RFC 2119 for use of MUST, SHOULD, SHALL.)
== Library files
@levifig
levifig / gist:463511
Created July 4, 2010 15:09 — forked from fortuity/gist:452364
Application generator template modifies a Rails app to use Mongoid, Devise and jQuery
# Application Generator Template
# Modifies a Rails app to use Mongoid, Devise, jQuery, Haml
# Usage: rails new app_name -m http://gist.github.com/raw/452364/gistfile1.txt
# More info: http://github.com/fortuity/rails3-mongoid-devise/
# If you are customizing this template, you can use any methods provided by Thor::Actions
# http://rdoc.info/rdoc/wycats/thor/blob/f939a3e8a854616784cac1dcff04ef4f3ee5f7ff/Thor/Actions.html
# and Rails::Generators::Actions
# http://github.com/rails/rails/blob/master/railties/lib/rails/generators/actions.rb
@levifig
levifig / gist:610643
Created October 4, 2010 23:21
Goes through the links in my <nav> and compares their own 'href' with the current URL.
We couldn’t find that file to show.
@levifig
levifig / gist:610978
Created October 5, 2010 04:10
Goes through the links in my <nav> and compares their own 'href' with the current URL.
// Goes through the links in my navigation and compares their own 'href' with the current URL
// Really handy and I'm sure I'll reuse hence posting it here. ;)
// Thank you to Paul Irish (#jquery @ freenode.net) for the indexOf recommendation! ;)
$('nav ul li a').each(function() {
if (location.pathname.indexOf($(this).attr('href')) > -1 ) {
$(this).addClass('active');
}
});
levifig@aragorn ~ % brew install mysql
==> Downloading http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.12.tar.gz
File already downloaded in /Users/levifig/Library/Caches/Homebrew
==> Downloading patches
==> Patching
patching file scripts/mysqld_safe.sh
Hunk #1 succeeded at 555 (offset 172 lines).
patching file scripts/mysql_config.sh
Hunk #1 succeeded at 137 (offset 5 lines).
==> cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql/5.5.12 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/Cellar/my