Skip to content

Instantly share code, notes, and snippets.

Jon Heller jon-heller

Block or report user

Report or block jon-heller

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 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

@jon-heller
jon-heller / functions.php
Last active Mar 28, 2016
WordPress Read More
View functions.php
<?php
add_action('wp_ajax_nopriv_listing_load_more', 'listing_load_more');
add_action('wp_ajax_listing_load_more', 'listing_load_more');
function listing_load_more()
{
$next_page = $_POST['curPage']+1
// this is where you put your code to get more posts.
// it's just a normal wp_query but you pass in the current page number from
View gist:d926bfbef3d724b5323c5c3c7ada3fd0
|I|18:18:41.048| *** Starting HSTracker/0.18.1.1297; (enUS;en;macOS 10.11.6) ***
|I|18:18:41.092| Opening trackers
|I|18:18:42.467| Fetching https://raw.githubusercontent.com/HearthSim/HSTracker/master/hs-build-dates.json complete
|I|18:18:42.476| Latest build : 15181, actual is 15181
|V|18:18:42.476| json file : /Users/Jon/Library/Application Support/HSTracker/json/cardsDB.enUS.json
|I|18:18:43.555| Loading decks
|E|18:18:43.565| Can not save backup : Error Domain=NSCocoaErrorDomain Code=516 "“hstracker.realm” couldn’t be copied to “HSTracker” because an item with the same name already exists." UserInfo={NSSourceFilePathErrorKey=/Users/Jon/Library/Application Support/HSTracker/hstracker.realm, NSUserStringVariant=(
Copy
), NSDestinationFilePath=/Users/Jon/Library/Application Support/HSTracker/hstracker.realm.backup, NSFilePath=/Users/Jon/Library/Application Support/HSTracker/hstracker.realm, NSUnderlyingError=0x7ff8d8d16420 {Error Domain=NSPOSIXErrorDomain Code=17 "File exists"}}
|I|18:18:43.606| Loading
@jon-heller
jon-heller / test-branch.sh
Created Sep 20, 2017
BackstopJS script to check out and test a branch against development
View test-branch.sh
#!/bin/bash
git diff-index --quiet HEAD -- &>/dev/null
if [ $? -ne 0 ]; then
echo "Git status isn't clean! Please commit all changes first"
exit 1
fi
echo "Checking out development..."
git checkout development &>/dev/null
You can’t perform that action at this time.