Skip to content

Instantly share code, notes, and snippets.

@khalillechelt
khalillechelt / gradient-triangles.css
Created September 16, 2010 10:09
Ingenius solution to create a CSS triangle with a gradient.
/* Code is by A.J. Cates (http://ajcates.com). Find his post here: http://forr.st/~XGU */
#gradient-triangle {
width: 60px;
height: 60px;
position: absolute;
top: 3em;
left: -30px;
clip: rect(auto 30px 60px auto);
}
@colllin
colllin / Options.md
Last active December 7, 2020 10:02
How to use UrlSpoiler to preview Gists
@louisremi
louisremi / insertAdjacentHTML.js
Created August 18, 2011 16:29
insertAdjacentHTML API
// HTML inserted before elem in the DOM
elem.insertAdjacentHTML( "beforebegin", ... )
// inside elem, before its first child
elem.insertAdjacentHTML( "afterbegin", ... )
// inside elem, after its last child
elem.insertAdjacentHTML( "beforeend", ... )
// HTML inserted after elem in the DOM
elem.insertAdjacentHTML( "afterend", ... )
@gre
gre / easing.js
Last active September 5, 2025 07:01
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@bunnymatic
bunnymatic / .htaccess
Created February 5, 2012 08:40
javascript regex tester
Options -Indexes
@knice
knice / rss-atom.xsl
Created April 7, 2012 00:01
XSLT to create RSS feed from news articles
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:hh="http://www.hannonhill.com/XSL/Functions" xmlns:media="http://search.yahoo.com/mrss/" xmlns:xalan="http://xml.apache.org/xalan">
<xsl:output cdata-section-elements="atom:content"/>
<xsl:include href="/formats/Format Date"/>
<xsl:variable name="indexPageName" select="'index'"/>
<xsl:variable name="callingPage" select="/system-index-block/calling-page/system-page"/>
<xsl:variable name="current-date" select="/system-index-block/@current-time"/>
<xsl:variable name="news-categories" select="//calling-page/system-page/dynamic-metadata[starts-with(name,'category-')]/value"/>
<xsl:variable name="file_extension">.html?utm_medium=feed</xsl:variable>
@guert
guert / HTML
Created April 12, 2012 21:38
Display Random Div
<div id="rd1">
ONE
</div>
<div id="rd2">
TWO
</div>
<div id="rd3">
THREE
@SinusMedii
SinusMedii / styles.css
Created April 28, 2012 12:17
CSS: Basisvorlage CSS styles.css
/* Basisvorlage CSS
www.projektname.ch
Letzte Aenderung: 00.00.20xx
*/
/* Farbschema
----------------------------------------------------------------------------------------------------------- */
/*
Farbton (Element): #xxxxxx;;
@tobyhede
tobyhede / postsql.sql
Created May 17, 2012 03:08
PostgreSQL as JSON Document Store
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- Inspired by
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html
-- http://ssql-pgaustin.herokuapp.com/#1
-- JSON Types need to be mapped into corresponding PG types
--
@jasonm23
jasonm23 / xterm-256color.svg
Last active August 11, 2025 17:37
Xterm 256color mode color chart, organised into sections. (used on Wikipedia/xterm)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.