Skip to content

Instantly share code, notes, and snippets.

View norswap's full-sized avatar

norswap norswap

View GitHub Profile
@davidfowl
davidfowl / Example1.cs
Last active March 28, 2024 20:36
How .NET Standard relates to .NET Platforms
namespace Analogy
{
/// <summary>
/// This example shows that a library that needs access to target .NET Standard 1.3
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
/// </summary>INetCoreApp10
class Example1
{
public void Net45Application(INetFramework45 platform)
@paulirish
paulirish / bling.js
Last active April 20, 2024 17:39
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@norswap
norswap / jaffar.rb
Created September 8, 2012 14:50
Jaffar, the Evil Advisor Library
# Jaffar, the Evil Advisor Library
#
# This is a simple experiment in Ruby metaprogmming, to see how to implement
# a lisp-style advising construct. Advising is basically augmenting existing
# functions with your own code. See the exemple below.
#
# Advising is very much related to context-oriented programming. I fortunately
# have no use for either an advising or context-oriented programming right now
# and this is why I did not expand upon this simple implementation.
#
@johnfredcee
johnfredcee / w32shell.el
Created July 21, 2011 13:09
Standalone w32shell.el (for vanilla windows emacs)
;;; w32shell.el --- Helpers for inferior shells on w32
;; Copyright (C) 2005, 2006, 2007 by Lennart Borgman
;;
;; Author: Lennart Borgman
;; Created: Tue Nov 22 01:07:13 2005
;; Version: 0.52
;; Last-Updated: Fri May 18 10:58:41 2007 (7200 +0200)
;; Keywords:
;; Compatibility: Emacs 22
@fnhipster
fnhipster / html5.haml
Created April 9, 2011 01:19
HTML5 HAML Template
!!! 5
%html
%head
%title= "Your Website"
%meta{ :content => "", :name => "description" }
%meta{ :content => "", :name => "author" }
%meta{ :content => "3 days", :name => "revisit-after" }
%link{ :href => "http://creativecommons.org/licenses/by/3.0/", :rel => "license", :title => "Creative Commons Attribution 3.0 Unported License" }
%link{ :href => "/feed", :rel => "alternate", :title => "Atom", :type => "application/atom+xml" }
%link{ :href => "/css/screen.css", :media => "screen", :rel => "stylesheet" }