Skip to content

Instantly share code, notes, and snippets.

@brichards
brichards / sb-github-downloads.php
Last active February 16, 2021 17:10
StartBox GitHub Download Generator
<?php
/**
* Plugin Name: StartBox GitHub .zip Generator
* Description: Generates a .zip download for StartBox from GitHub Master.
*
* @props Konstantin Kovshenin (@kovshenin) for sharing his work used on underscores.me (http://code.svn.wordpress.org/underscoresme/plugins/underscoresme-generator/underscoresme-generator.php)
*/
class SB_Download_Generator {
@lukecanvin
lukecanvin / backbone.localCache.js
Created July 20, 2012 08:56
Online/offline syncing for Backbone
Backbone.serverSync = Backbone.sync;
Backbone.pingUrl = '/Ping';
Backbone.localID = function() {
var localID = (localStorage.localID ? parseInt(localStorage.localID) : 0);
localID++;
localStorage.localID = localID.toString()
return -localID;
}
@dongilbert
dongilbert / git-wordpress.txt
Created April 27, 2012 14:27
Use Git with WordPress Plugin Development
=== Using Git with WordPress Plugin Development ===
git svn clone -s -r<rev-number> https://svn.wp-plugins.org/<plugin-path> <-- Clone the plugin repo
cd <plugin-path> <-- change to directory
git svn fetch <-- Pull svn history
git remote add -f github git@github.com:<github-url> <-- add github remote
/* ADD CODE */ <-- write code
git add * <-- add to git
git commit -m "Starting to code" <-- commit changes
git svn dcommit <-- push to svn
git push -f github <-- push to github
@luetkemj
luetkemj / wp-query-ref.php
Last active April 25, 2024 09:37
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/