Skip to content

Instantly share code, notes, and snippets.

🖐
👁❤️open source software …

Michael Hulse mhulse

🖐
👁❤️open source software …
Block or report user

Report or block mhulse

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
@mhulse
mhulse / tojs.csp
Last active Aug 29, 2015
Caché Server Pages Hyperevents Example.
View tojs.csp
<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
Mobile site switcher demo page for the Django Mobile app.
View cookie.html
@mhulse
mhulse / skin.css
Created Jun 18, 2014
Site skin CSS example.
View skin.css
/**
* Site Skin background ad.
*
* Example:
*
* <a id="skin" href="http://www.google.com"></a>
*/
/*----------------------------------( GLOBALS )----------------------------------*/
@mhulse
mhulse / gulpfile.js
Last active Aug 29, 2015
Testing gulp. Posting code here for feedback.
View gulpfile.js
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 Aug 29, 2015
Firefox GreaseMonkey script: Remove All Gmail Ads: Removes all ads in Gmail, including Web Clips
View +remove-gmail-ads.user.js
// ==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 / byline()
Created Sep 18, 2014
Caché 2009.1 - NEWSCYCLE Solutions: DTI Lighting 7.7.x: Get The Register-Guard byline CSP method.
View byline()
<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 Aug 29, 2015
Caché 2009.1 - NEWSCYCLE Solutions: DTI Lighting 7.7.x: Get sub/category name CSP methods.
View catName()
<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:
//----------------------------------
@mhulse
mhulse / uri()
Created Sep 18, 2014
Caché 2009.1 - NEWSCYCLE Solutions: DTI Lighting 7.7.x: Get story link CSP methods.
View uri()
<script language="cache" method="uri" arguments="section:dt.cms.schema.Section=-1, story:dt.cms.schema.CMSStory=-1, layout:dt.cms.schema.LayoutFull=-1" returntype="%String" procedureblock="1">
/// Returns a story link; InCopy field "WebLink" trumps story link.
/// All parameters required.
/// Example call: ##class(csp.rg.assets.methods.story).uri(gSection, gStory, gFullLayout)
set return = ""
set:( ' $isobject(story)) story = ##class(dt.cms.schema.CMSStory).%OpenId(story)
@mhulse
mhulse / subHeadline()
Created Sep 18, 2014
Caché 2009.1 - NEWSCYCLE Solutions: DTI Lighting 7.7.x: Get subheadline CSP methods.
View subHeadline()
<script language="cache" method="dboStoryStatus" arguments="cmsStory:dt.cms.schema.CMSStory=-1" returntype="%Integer" procedureblock="1">
/// About: Return 1 if the given story has a status of "ready", "output", "web" or "archive".
/// Example call:
/// ##class(csp.rg.assets.methods.story).dboStoryStatus()
set return = 0
/*
**
@mhulse
mhulse / getimagesize()
Last active Aug 29, 2015
Caché 2009.1 - NEWSCYCLE Solutions: DTI Lighting 7.7.x: Get image size CSP methods.
View getimagesize()
<script language="cache" method="getimagesize" arguments='stream:%Stream' returntype="%List" procedureblock="1">
/**
* Get image size.
*
* @param stream
* @return string
*/
; Code by Alexander Riemer
You can’t perform that action at this time.