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
@tbjers
tbjers / bitly_filter.rb
Created Aug 15, 2012
Liquid Filter to convert URLs to short URLs automatically
View bitly_filter.rb
require 'bitly'
module Jekyll
class BitlyFilterCache
def initialize
@result_cache = {}
config = Jekyll.configuration({})
@username = config['bitly']['username']
@key = config['bitly']['api_key']
Bitly.use_api_version_3
@cjanis
cjanis / gist:3907067
Created Oct 17, 2012 — forked from tfausak/ios-8-web-app.html
iOS Standalone Web App Settings, Icons, and Startup Images
View gist:3907067
<!-- ios standalone web app -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- ios status bar appearance, options: black, black-translucent -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- ios icon, just one size because ios will scale it, remove "-precomposed" if you want ios to add effects -->
<link href="icon@144x144.png" sizes="144x144" rel="apple-touch-icon-precomposed">
<!-- ios startup images -->
@mhulse
mhulse / How to delete a story from Lightning, for keeps.md
Last active Oct 13, 2015
Caché DTI ContentPublisher v7.7.3 and above: dt_cms_schema.SEOStoryLookup SQL goodies!
View How to delete a story from Lightning, for keeps.md

Update (2013/06/17):

On top of deleting stories from dt_cms_schema.CMSStoryPubTracking and dt_cms_schema.SEOStoryLookup (see below), Craig M. recently discovered that one needs to delete "related" and/or "popular" stories as well.

Find orphaned SEO stories:

select distinct top 100 cmsStoryId as SEO_CMSStoryId from dt_cms_schema.seostorylookup seo where not exists (select pub.CMSStory from dt_cms_schema.CMSStoryPubTracking pub where seo.cmsStoryId = pub.CMSStory) and cmsStoryId is not null;
@cballenar
cballenar / css-baseline-grid.css
Last active Oct 14, 2015
/* This gist was inspired by DigitPaint [ http://advent2012.digitpaint.nl/13/ ] */ This is a baseline grid created using some (perhaps all) of the new CSS background properties. it simulates a baseline grid based on ems which will allow you to size according to your site's font size. A clear disadvantage is that it is limited to be a background.…
View css-baseline-grid.css
/* ---------------------------------------------------
Production Versions ( Minified )
--------------------------------------------------- */
/* Background */
/**/ .baseline{font-size:1em;background:none;background-image:-webkit-linear-gradient(rgba(0,0,0,0.2) 1px,transparent 1px);background-image:-moz-linear-gradient(rgba(0,0,0,0.2) 1px,transparent 1px);background-image:linear-gradient(rgba(0,0,0,0.2) 1px,transparent 1px);background-size:100% 1.5em;background-origin:content-box;background-attachment:local}
/**/ .baseline *{background:none !important;outline:1px dashed rgba(100%,0%,0%,.5)}
/* Overlay + Hover switch */
/**/ body{position:relative}body:hover:before{width:100%;height:100%;display:block;content:"";position:absolute;z-index:9999;pointer-events:none;background-size:100% .75em;background-origin:content-box;background-attachment:local;background-image:-webkit-linear-gradient(rgba(0,255,255,.75) 1px,transparent 1px);background-image:-moz-linear-gradient(rgba(0,255,255,.75) 1px,transparent 1px);bac
View ColourTSP.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mchogan
mchogan / Toggle Hidden File Visibility
Last active Dec 13, 2015
Toggle visibility of hidden files and folders in Mac OS X
View Toggle Hidden File Visibility
# Toggle Hidden File Visibility Automator Service
# 1. Create a new Automator service
# 2. Service receives no input in Finder
# 3. Add an Automator Ask For Confirmation action
# 4. Automator Run Shell Script action with below shell script
# Set the Shell to bin/sh/
is_shown=$(defaults read com.apple.finder AppleShowAllFiles)
if [ $is_shown = "FALSE" ]
then
@cballenar
cballenar / wrap-around.css
Last active Dec 14, 2015
Create the illusion an element wrapping around a container. While this technique has been around for a while. It reamins a very interesting style that can help certain pieces of content pop-up. Depending on the class you select the code will pull an element off to the left, right or both sides, and add a triangle for the wrap around illusion. Vi…
View wrap-around.css
/* Wrap Around - http://jsbin.com/agegux/2/
---------------------------------------------------------------------------------
The following code allows you to create the illusion an element
wrapping around a container.
While this technique has been around for a while. It reamins a very
interesting style that can help certain pieces of content pop-up.
Depending on the class you select the code will pull an element
@sjferwerda
sjferwerda / gist:5154271
Last active Dec 14, 2015
Iframe shortcode parser for Lightning
View gist:5154271
<dti:story:element:exist field="WebText">
<script language="cache" runat="server">
set storyText = ##class(dt.cms.support.Rules).extractStoryElement("WebText",gStory,0)
</script>
<dti:else>
<script language="cache" runat="server">
set storyText = ##class(dt.cms.support.Rules).extractStoryElement("Text",gStory,0)
</script>
</dti:story:element:exist>
@earlonrails
earlonrails / getBrowser.js
Last active Dec 15, 2015
Get Browser type and version, cleaned up from http://stackoverflow.com/a/5918791/1354978. Now also checks if it is a mobile device. Now works with IE11!
View getBrowser.js
var getBrowser = function(){
var navigatorObj = navigator.appName,
userAgentObj = navigator.userAgent,
matchVersion;
var match = userAgentObj.match(/(opera|chrome|safari|firefox|msie|trident)\/?\s*(\.?\d+(\.\d+)*)/i);
if( match && (matchVersion = userAgentObj.match(/version\/([\.\d]+)/i)) !== null) match[2] = matchVersion[1];
//mobile
if (navigator.userAgent.match(/iPhone|Android|webOS|iPad/i)) {
return match ? [match[1], match[2], mobile] : [navigatorObj, navigator.appVersion, mobile];
}
@chaseadamsio
chaseadamsio / jekyll_highlight_mod.rb
Last active Dec 20, 2015
A script to modify Jekyll's highlight class. Updated for Jekyll 1.0.3 from this blog post: http://thanpol.as/jekyll/jekyll-code-highlight-and-line-numbers-problem-solved/
View jekyll_highlight_mod.rb
# Working as of Jekyll 1.0.3
module Jekyll
class WrapHighlightBlock < Jekyll::Tags::HighlightBlock
def initialize(tag_name, markup, tokens)
super
end
def render(context)
'<figure class="code"><figcaption></figcaption>' + super + '</figure>'
You can’t perform that action at this time.