Skip to content

Instantly share code, notes, and snippets.

View joeriks's full-sized avatar
💭
I may be slow to respond.

Jonas Eriksson joeriks

💭
I may be slow to respond.
View GitHub Profile
@nanto
nanto / router.js
Created July 4, 2012 16:51
Router: a router that can be combined with jquery.pjax.js
// Router: a router that can be combined with jquery.pjax.js [1]
//
// [1] https://github.com/defunkt/jquery-pjax
//
// This file is in the public domain.
//
//
// var router = new Router();
// $(document).on('pjax:end', function () { router.dispatch(location); });
// $(function () { router.dispatch(location); });
@leekelleher
leekelleher / ForceEmptyRecycleBin.sql
Last active July 18, 2020 11:15
Umbraco: Force empty the Recycle Bin
-- Uncomment below to verify the number of nodes returned is the same as the number of nodes that is in the Recycle Bin
-- SELECT * FROM umbracoNode WHERE path LIKE '%-20%' AND id != -20
-- Delete all 'related' nodes and table contents...
DELETE FROM cmsPreviewXml WHERE nodeId IN (SELECT id FROM umbracoNode WHERE path LIKE '%-20%' AND id != -20)
DELETE FROM cmsContentVersion WHERE contentId IN (SELECT id FROM umbracoNode WHERE path LIKE '%-20%' AND id != -20)
DELETE FROM cmsDocument WHERE nodeId IN (SELECT id FROM umbracoNode WHERE path LIKE '%-20%' AND id != -20)
DELETE FROM cmsContentXML WHERE nodeId IN (SELECT id FROM umbracoNode WHERE path LIKE '%-20%' AND id != -20)
DELETE FROM cmsContent WHERE nodeId IN (SELECT id FROM umbracoNode WHERE path LIKE '%-20%' AND id != -20)
DELETE FROM cmsPropertyData WHERE contentNodeId IN (SELECT id FROM umbracoNode WHERE path LIKE '%-20%' AND id != -20)
@ToJans
ToJans / Index.spark.html
Created March 23, 2011 01:53
let's hope I manage to get this working as well both online and offline:-)
<content name="script">
<script type="text/coffeescript">
$().ready ->
$("*[data-uri]").each (el) ->
rendertemplate = Tempo.prepare(el);
uri = el.attribute "data-uri"
refresh = el.attribute "data-refresh"
$.retrieveJSON uri , {}, (data) ->
rendertemplate.render data