Skip to content

Instantly share code, notes, and snippets.

💭
😸

Roman Edirisinghe rediris

  • United States
Block or report user

Report or block rediris

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
View gist:5bb73804c7d424fedf44
icon magnet2
sub stall
while !pastround 29
if hasskill spaghetti spear
skill spaghetti spear
endif
if match "whips out a"
use molybdenum magnet
endif
if match "It does a bombing"
@rediris
rediris / JsMinifyViewTool.java
Last active Aug 29, 2015
Proposed enhancement to ISAAC's dotCMS JS Minifier plugin - adds support for asynchronous attributes
View JsMinifyViewTool.java
package nl.isaac.dotcms.minify.viewtool;
/*
* Dotcms minifier by ISAAC is licensed under a
* Creative Commons Attribution 3.0 Unported License
*
* - http://creativecommons.org/licenses/by/3.0/
* - http://www.geekyplugins.com/
*
* ISAAC Software Solutions B.V. (http://www.isaac.nl)
@rediris
rediris / gist:a9b1316490c217195ead
Created Sep 4, 2014
dotCMS Include Contentlet
View gist:a9b1316490c217195ead
#set($contentBlock1 = $dotcontent.find('identifier goes here'))##
#if($EDIT_MODE)#editContentlet($contentBlock1.inode)#end##
<h1>$!{contentBlock1.title.replaceAll('\[+.+\]','')}</h1>##
$!{contentBlock1.body}##
@rediris
rediris / currentLocale.vtl
Last active Aug 29, 2015
dotCMS currentLocale
View currentLocale.vtl
#set($profileLocale = 'en_US')##
##
## SET SESSION LOCALE VALUES
#set ( $localeObj = $session.getAttribute("com.dotmarketing.LOCALE") )
#if($UtilMethods.isSet($request.getParameter('locale')))##
#set($profileLocale = $request.getParameter('locale'))##
#end##
## REFRESH VALUE OF LOCALE OBJECT COOKIE WITH PROFILE LOCALE VALUE
$session.setAttribute("com.dotmarketing.LOCALE",$localeObj.forLanguageTag("${profileLocale.replaceAll('_','-')}"))
## LASTLY, UPDATE VALUE OF CURRENT LOCALE TO REFLECT STORED COOKIE VALUE
@rediris
rediris / touch-dropdown
Created Mar 17, 2014
jQuery dropdown script for supporting touch enabled devices
View touch-dropdown
$(function(){ // JQUERY DOCUMENT READY
// DEFINE VARS
var doc = $(document);
var dropdown = $('.dropdown');
var dropdownContents = $('.dropdown-contents');
// JQUERY MAGIC ONLY FOR TOUCH DEVICES
if (!$('html').hasClass('no-touch')) {
// TOUCH CLICK HANDLING
dropdown.on('touchstart',function (e) {
View styled-select-js
//CUSTOM SELECT - prevent double wrap incase this script is include in multiple locations...
$('select').each(function(){
var t = $(this);
if( !t.parent().hasClass('customSelect') ){
t.wrap('<div class="customSelect" />').before('<div class="displayCopy empty"></div>');
}
}).on('change fauxChange', function(){
var t = $(this);
t.siblings('.displayCopy').text( t.find('option:selected').text() );
//toggle "empty" class
@rediris
rediris / _.md
Created Sep 20, 2013
cat clicking
View _.md
@rediris
rediris / _.md
Created Sep 20, 2013
reddit table
View _.md
@rediris
rediris / _.md
Created Sep 20, 2013
reddit brush - color scale
View _.md
@rediris
rediris / _.md
Created Sep 20, 2013
reddit brush
View _.md
You can’t perform that action at this time.