Skip to content

Instantly share code, notes, and snippets.

View mhulse's full-sized avatar
👋
👁 ❤️ open source software …

Michael Hulse mhulse

👋
👁 ❤️ open source software …
  • Instructure Inc.
  • Eugene, Oregon
View GitHub Profile
@mhulse
mhulse / tojs.csp
Last active August 29, 2015 13:56
Caché Server Pages Hyperevents Example.
<script language="cache" method="MakeList2" arguments="myFlag:%String">
&js<console.log("i see #(myFlag)#");>
</script>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
@mhulse
mhulse / cookie.html
Created May 8, 2014 17:57
Mobile site switcher demo page for the Django Mobile app.
@mhulse
mhulse / skin.css
Created June 18, 2014 21:24
Site skin CSS example.
/**
* Site Skin background ad.
*
* Example:
*
* <a id="skin" href="http://www.google.com"></a>
*/
/*----------------------------------( GLOBALS )----------------------------------*/
@mhulse
mhulse / gulpfile.js
Last active August 29, 2015 14:03
Testing gulp. Posting code here for feedback.
var gulp = require('gulp');
var coffee = require('gulp-coffee');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var imagemin = require('gulp-imagemin');
var del = require('del');
var paths = {
@mhulse
mhulse / +remove-gmail-ads.user.js
Last active August 29, 2015 14:05
Firefox GreaseMonkey script: Remove All Gmail Ads: Removes all ads in Gmail, including Web Clips
// ==UserScript==
// @name Remove All Gmail Ads
// @description Removes all ads in Gmail, including Web Clips
// @version 1.3
// @namespace oyvey
// @include http*://mail.google.com/*
// @match http://mail.google.com/*
// @match https://mail.google.com/*
// ==/UserScript==
@mhulse
mhulse / getimagesize()
Last active August 29, 2015 14:06
Caché 2009.1 - NEWSCYCLE Solutions: DTI Lighting 7.7.x: Get image size CSP methods.
<script language="cache" method="getimagesize" arguments='stream:%Stream' returntype="%List" procedureblock="1">
/**
* Get image size.
*
* @param stream
* @return string
*/
; Code by Alexander Riemer
@mhulse
mhulse / meta()
Created September 18, 2014 18:57
Caché 2009.1 - NEWSCYCLE Solutions: DTI Lighting 7.7.x: Get picture meta method.
<script language="cache" method="meta" arguments='pictureObj:dt.cms.schema.CMSPicture=-1, item:%String=""' returntype="%String" procedureblock="1">
/**
* Get picture meta.
* Formerly: pick
*
* @param object
* @return string
*/
@mhulse
mhulse / cmsPubTracking()
Created September 18, 2014 19:00
Caché 2009.1 - NEWSCYCLE Solutions: DTI Lighting 7.7.x: Get CMSStoryPubTracking StartDate CSP methods.
<script language="cache" method="cmsPubTracking" arguments='cmsStory:dt.cms.schema.CMSStory=-1, latest:%Integer=0' returntype="%TimeStamp" procedureblock="1">
set return = ""
; By default, get the oldest entry:
set order = $case(latest, 1:"DESC", :"ASC")
try {
; See Roberto's and Sungung's replies:
@mhulse
mhulse / byline()
Created September 18, 2014 19:02
Caché 2009.1 - NEWSCYCLE Solutions: DTI Lighting 7.7.x: Get The Register-Guard byline CSP method.
<script language="cache" method="byline" arguments="cmsStory:dt.cms.schema.CMSStory=-1, org:%Boolean=0" returntype="%String" procedureblock="1">
/*
<dti:story:element:exist field="WebByline1">
<p class="Bylines-Byline1"><dti:story:element field="WebByline1" extract="textonly" /></p>
<dti:story:element:exist field="WebByline2">
<p class="Bylines-Byline2"><dti:story:element field="WebByline2" extract="textonly" /></p>
</dti:story:element:exist>
<dti:else>
<dti:story:element:exist field="Byline">
@mhulse
mhulse / catName()
Last active August 29, 2015 14:06
Caché 2009.1 - NEWSCYCLE Solutions: DTI Lighting 7.7.x: Get sub/category name CSP methods.
<csp:comment>
/// @param: Category/subcategory id. Required.
/// @return: Category/subcategory name.
</csp:comment>
<script language="cache" method="catName" arguments='id:%String=""' returntype="%String" procedureblock="1">
//----------------------------------
// Initialize:
//----------------------------------