Skip to content

Instantly share code, notes, and snippets.


Austin Siewert siebird

View GitHub Profile
siebird / harvestInvoiceHook.user.js
Last active Nov 21, 2017
Userscript Harvest invoice update hook to send POST to Zapier webhook URL
View harvestInvoiceHook.user.js
// ==UserScript==
// @name Harvest Invoice Hook
// @namespace
// @version 0.1
// @description Harvest invoice status hook to send POST to Zapier to update Google spreadsheet row
// @include /^https:\/\/\w+\.harvestapp\.com\/invoices\/[0-9]+/
// @exclude /^https:\/\/\w+\.harvestapp\.com\/invoices\/[0-9]+\/duplicate
// @require
// ==/UserScript==
siebird / gist:4089096
Created Nov 16, 2012
ExpressionEngine true nested URI's with Switchee, URL Helper & GW Has Children
View gist:4089096
// The key here is to use {all_segments} & {last_segment_category_url_title} from Litzinger's URL Helper extension.
// I fork'd it and added the {last_segment_category_url} to determine if the last segment is a cat or not.
// If {last_segment_category_url} is a category, it will parse and the case will run, if not, it defaults to single entry template
// {all_segments} variable is great b/c it's dynamically builds the rule, rather than a fixed variable="{seg_1}/{seg_2}/{seg_3}/{seg_4}"
// Controller Template.
{exp:switchee variable="{all_segments}" parse="inward"}
{case value="products"}
{embed="site/_product_cat" cat_seg="home"}
siebird / gist:4035793
Created Nov 8, 2012
Simple .htaccess rules for ExpressionEngine on Media Temple (dv)'s
View gist:4035793
## BEGIN Expression Engine Rewrite
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteRule ^(.*)$ /index.php?/$1 [L]
# END Expression Engine Rewrite
siebird / gist:3824429
Created Oct 3, 2012
Use case of adding {last_segment_category_url_title}
View gist:3824429
<!-- Using @litzinger URL Helper plugin I added a new variable:
This parses only if the last segment is a valid category (see case 3). I need this variable b/c {segment_3} will always parse, thus the third case returns true every time.
{all_segments} is perfect for the switchee variable b/c it's dynamic rather than hard coded: {segment_1}/{segment_2}/{segment_3}/{segment_4}
View gist:2559232
title="{if entry_title}{entry_title}{if:else}{embed:title}{/if}"
{if entry_title != ""}
You can’t perform that action at this time.