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
@marushu
marushu / set-filter-by-tax.php
Last active Jul 26, 2019
Supports multiple filters.
View set-filter-by-tax.php
<?php
function multiple_filter_at_cpt() {
global $typenow;
$args = array(
'public' => true,
'_builtin' => true,
);
$custom_post_types = get_post_types( $args );
$custom_post_types = array_values( $custom_post_types );
@keon
keon / pagination.js
Last active Apr 12, 2019
javascript pagination algorithm
View pagination.js
var pagenation = function(current, total){
var list = [];
var pageLimit = 5;
var upperLimit, lowerLimit;
var currentPage = lowerLimit = upperLimit = Math.min(current, total);
for (var b = 1; b < pageLimit && b < total;) {
if (lowerLimit > 1 ) {
lowerLimit--; b++;
}
@mkleucker
mkleucker / gist:5233150
Created Mar 24, 2013
Hide the iTerm2 Dock icon.
View gist:5233150
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist
@oodavid
oodavid / README.md
Created Mar 26, 2012
Backup MySQL to Amazon S3
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

You can’t perform that action at this time.