Source Code Pro, Chrome, Firefox, iTerm, Sublime Text, Sequel Pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$date = date("Y-m-dTH:i:s"); | |
$file = 'db.backup.' . $date . '.sql.gz'; | |
error_log("Database Backup Started - " . $file); | |
exec('touch ' . $file); | |
exec('chmod 600 ' . $file); | |
exec('mysqldump -u user --password="password" --add-drop-table --single-transaction database_name | gzip > ' . $file); |
Thanks @MichaelAllenClark for the help with his examples. Not sure why this info wasn't on the code.exacttarget.com website to begin with.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# useful for rails server already running message | |
lsof -wni tcp:3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--[if lt IE 9]> | |
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> | |
<![endif]--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title></title> | |
<link rel="stylesheet" href=""> | |
</head> | |
<body> | |
$ heroku domains:add secure.mysite.com
$ heroku addons:add ssl
Create CSR - https://devcenter.heroku.com/articles/csr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X) | |
(if you aren't using version 9.1.5, change line 6 with the correct version) | |
1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
2. mv /usr/local/var/postgres /usr/local/var/postgres91 | |
3. brew update | |
4. brew upgrade postgresql | |
5. initdb /usr/local/var/postgres -E utf8 | |
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres | |
7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// JSHint Default Configuration File (as on JSHint website) | |
// See http://jshint.com/docs/ for more details | |
"maxerr" : 50, // {int} Maximum error before stopping | |
// Enforcing | |
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) | |
"camelcase" : false, // true: Identifiers must be in camelCase | |
"curly" : false, // true: Require {} for every new block or scope |
Source - Here
Here's the query that will return the names of the tables defined in the current database:
OlderNewer