Skip to content

Instantly share code, notes, and snippets.

@guillaumealgis
guillaumealgis / fswatch.rb
Last active December 18, 2015 06:59
fswatch brew formula.
# Install with
# brew install -HEAD https://gist.github.com/guillaume-algis/5743554/raw
require 'formula'
class Fswatch < Formula
homepage 'https://github.com/alandipert/fswatch'
head 'https://github.com/alandipert/fswatch.git', :tag => 'r0.0.1'
version '0.0.1'
@YannickBochatay
YannickBochatay / normalizePath.js
Created October 19, 2011 07:37
javascript workaround for unimplemented normalizedPathSegList
/*
Transform paths with only M,L,C,Z as described by w3c
http://www.w3.org/TR/2003/REC-SVG11-20030114/paths.html#InterfaceSVGAnimatedPathData
Example :
var path = document.createElementNS("http://www.w3.org/2000/svg",tag);
path.setAttribute('d','M30 30S40 23 23 42C113,113 136,113 150,80t40,50T230,240q20 20 54 20s40 23 23 42t20,30a20,30 0,0,1 -50,-50');
path.normalizePath();
@feliperazeek
feliperazeek / PlayHttpServletRequest.java
Created June 18, 2011 23:22
Adapter class to define a HttpServletRequest from a Play Framework Request Object
/**
* Copyright 2011 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* UserType allowing easy saving of NHIbernate XmlDocument property.
*
* Example
* =======
*
* //Message.cs - Example class with a XmlDocument
* public class Message
* {
* public XmlDocument Body{get;set;}