Instantly share code, notes, and snippets.

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"
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)
View gist:a9b1316490c217195ead
#set($contentBlock1 = $dotcontent.find('identifier goes here'))##
#if($EDIT_MODE)#editContentlet($contentBlock1.inode)#end##
<h1>$!{contentBlock1.title.replaceAll('\[+.+\]','')}</h1>##
$!{contentBlock1.body}##
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
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
View _.md
View _.md
View _.md
View _.md