Skip to content

Instantly share code, notes, and snippets.

View trumbitta's full-sized avatar
🚀
Basically a rocket ship. And a bear 🐻.

William Ghelfi trumbitta

🚀
Basically a rocket ship. And a bear 🐻.
View GitHub Profile
@aarongustafson
aarongustafson / watchResize.js
Last active September 16, 2019 14:37
Efficient callback management for window.onresize
(function( window ){
window.watchResize = function( callback ){
var resizing;
callback.size = 0;
function done()
{
var curr_size = window.innerWidth;
clearTimeout( resizing );
resizing = null;
// only run on a true resize
@NKjoep
NKjoep / Entando-wp18n.sublime-snippet
Created November 8, 2012 09:41
Sublime Text 2 Snippets Collection
<snippet>
<content><![CDATA[
-- DELETE FROM localstrings where keycode = '${1:keycode}';
INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('${1:keycode}','en','${2:en_value}');
INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('${1:keycode}','it','${3:it_value}');
-- <wp:i18n key="${1:keycode}" escapeXml="true" />
${4}
]]></content>
</snippet>
@NKjoep
NKjoep / jsp-javascript-escape-sample.jsp
Last active November 18, 2015 22:15
JSP javascript escape with JSTL
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%-- setup --%>
<% pageContext.setAttribute("carriageReturn", "\r"); %>
<% pageContext.setAttribute("newLine", "\n"); %>
<c:set var="singleQuotes">'</c:set>
<c:set var="singleQuotesReplace">\'</c:set>
<c:set var="doubleQuotes">"</c:set>
<c:set var="doubleQuotesReplace">\"</c:set>
@searls
searls / maven-git-flow.sh
Created June 24, 2011 00:25
My approximation of nvie's git flow when using maven-release-plugin to cut releases. - http://nvie.com/posts/a-successful-git-branching-model/
# How to perform a release with git & maven following the git flow conventions
# ----------------------------------------------------------------------------
# Finding the next version: you can see the next version by looking at the
# version element in "pom.xml" and lopping off "-SNAPSHOT". To illustrate,
# if the pom's version read "0.0.2-SNAPSHOT", the following instructions would
# perform the release for version "0.0.2" and increment the development version
# of each project to "0.0.3-SNAPSHOT".
# branch from develop to a new release branch
git checkout develop