Skip to content

Instantly share code, notes, and snippets.

View maxsum-corin's full-sized avatar

Corin Lawson maxsum-corin

  • Maxsum Solutions
  • Bendigo, Australia
View GitHub Profile
@maxsum-corin
maxsum-corin / readme.md
Last active January 4, 2017 00:08
Modified to use is_on_sale, which includes variation products

This plugin adds a sale items shortcode to WooCommerce. Usage:

[sale_products]

Options & defaults:

per_page=12
columns=4
orderby=title

order=asc

@maxsum-corin
maxsum-corin / example.html
Created September 29, 2011 14:46 — forked from edersohe/example.html
short plugin that implement vertical buttonset for radio buttons and checkboxes with jquery ui
<html>
<head>
<title>Test</title>
<link rel="stylesheet" media="all" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/start/jquery-ui.css"></link>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js"></script>
<script src="jquery.myplugin.js"></script>
<script>
$(document).ready(function(){
//call plugin
@maxsum-corin
maxsum-corin / gist:1044165
Created June 24, 2011 03:25
Multiple windows in vim
:split filename
ctrl-w w split window and load another file
:vsplit filename
ctrl-w v vertical split
:hide
ctrl-w q close current window
ctrl-w arrow move cursor up/down/left/right a window
ctrl-w ctrl-w move cursor to another window (cycle)
@maxsum-corin
maxsum-corin / gist:1037925
Created June 21, 2011 14:04
Recipes for working with git submodules
#http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/
# Adding a git submodule
git submodule add $url $path
git submodule init
git submodule update
# Removing a git submodule
vi .gitmodules
vi .git/config
@maxsum-corin
maxsum-corin / gist:1018325
Created June 10, 2011 06:29
Start Rails server from Rails console
require 'rails/commands/server'; server=Rails::Server.new;
Thread.new{server.start}