Skip to content

Instantly share code, notes, and snippets.

@Kilian
Kilian / annoying.js
Created January 6, 2011 15:04
How to be an asshole
/**
* Annoying.js - How to be an asshole to your users
*
* DO NOT EVER, EVER USE THIS.
*
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com)
* Visit https://gist.github.com/767982 for more information and changelogs.
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors
*
@leekelleher
leekelleher / SendToIISExpress.vbs
Last active June 14, 2017 18:44
Serve any folder in IIS Express
' Serve any folder in IIS Express
' http://blog.mattbrailsford.com/2011/03/14/easily-serve-any-folder-in-iis-express/
' Init randomization
Randomize
' Set random port number
Dim port
port = Int(Rnd() * 8974) + 1025
@nathansmith
nathansmith / screwed.js
Last active June 10, 2020 17:01
Force yourself to learn JavaScript.
// If you're a glutton for punishment, and/or claim
// that JavaScript libraries have too much "bloat",
// use this to force yourself to write JS longhand.
(function(window) {
function screwed() {
window._ = null;
window.$ = null;
window.$A = null;
window.$F = null;
@yadyn
yadyn / SemanticVersion.cs
Created May 6, 2011 18:11
Semantic Version C# class
using System;
using System.Collections.Generic;
using System.Text;
/// <summary>
/// Represents assembly, application, or other version information,
/// compliant with the Semantic Versioning specifications.
/// </summary>
/// <remarks>
/// See http://semver.org/ for specifications.
@greystate
greystate / _WYSIWYG.xslt
Created August 25, 2011 20:54
Include file for handling WYSIWYG content for real (as in: XML instead of effin' CDATA...)
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY NiceUrl "umb:NiceUrl">
<!ENTITY Parse "ucom:Parse">
<!ENTITY wrapper "WYSIWYG">
<!ENTITY nbsp "&#160;">
<!ENTITY badStuff "FONT | font | MARQUEE | marquee | BLINK | blink">
<!ENTITY TinyMCEStuff "span[@class = 'Apple-style-span'] | div[@class = 'xmlblock']">
<!ENTITY blackListedElements "&badStuff; | &TinyMCEStuff;">
<!ENTITY embedded-doctype "&lt;!DOCTYPE WYSIWYG [ &lt;!ENTITY nbsp &quot;&amp;#160;&quot;&gt; ]&gt;">
@uniquelau
uniquelau / gist:1188408
Created September 2, 2011 11:24
Hide Nodes in Umbraco Tree
using System;
using umbraco.BusinessLogic;
using umbraco.cms.businesslogic.web;
using umbraco.cms.presentation.Trees;
using umbraco.interfaces;
namespace Abbott.Corporate.Logic.Events
{
public class HideGridNodeOnLoad : ApplicationBase
@p01
p01 / LICENSE.txt
Created October 13, 2011 19:29 — forked from 140bytes/LICENSE.txt
Music SoftSynth
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@paulirish
paulirish / data-markdown.user.js
Last active February 6, 2024 10:41
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@greystate
greystate / what-changed.xslt
Created November 11, 2011 08:03
Find pages changed since $startDate (XSLT)
<?xml version="1.0" encoding="utf-8" ?>
<!--
Macro to find Umbraco pages changed since $startDate
Could even be used with uComponents' RenderMacro DataType to be viewable in Backoffice.
(Works with either of the Umbraco XML Schema formats)
-->
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@TaoK
TaoK / Diff.cs
Created May 8, 2012 08:01
C# port of JS 3-way merge implementation in Synchrotron
// Copyright (c) 2006, 2008 Tony Garnock-Jones <tonyg@lshift.net>
// Copyright (c) 2006, 2008 LShift Ltd. <query@lshift.net>
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation files
// (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions: