This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace | |
so it's better encapsulated. Now you can have multiple random number generators | |
and they won't stomp all over eachother's state. | |
If you want to use this as a substitute for Math.random(), use the random() | |
method like so: | |
var m = new MersenneTwister(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class('My.Attribute', { | |
meta : Joose.Meta.Class, | |
isa : Joose.Managed.Attribute, | |
methods : { | |
getSetter : function () { | |
}, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns pwprot | |
(:import (java.security MessageDigest Security))) | |
;;generate n random chars | |
(defn gensalt [n] | |
(let [charseq (map char (concat | |
(range 48 58) ; 0-9 | |
(range 97 123)))] ; 0-z | |
(apply str | |
(take n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've added a control element with these properties/attributes: | |
method ; method to use for generated request e.g. POST/PUT/DELETE | |
content-type ; (optional) content-type of the request body generated by the template (defaults to application/hal+xml) | |
schema ; contains schema for data submitted to template | |
template ; (optional) A string or object representing the template or form for the request. | |
template-href ; (optional) Contains a URI which links to a resource where the template or form can be fetched. | |
template-type ; (optional) URI used to identify the template format in use (defaults to mustache). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CoffeeScript samples for Functional from Oliver Steele | |
# ------------------------------------------------------------------- | |
# Documentation: http://osteele.com/sources/javascript/functional/ | |
# Repository: https://github.com/osteele/functional-javascript | |
# ------------------------------------------------------------------- | |
# Directly import the Functional library since it is not CommonJS enabled |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TestWebBundle : { | |
saveAs : 'test-run-all.js', | |
contains : [ | |
'node_modules/joose/joose-all.js', | |
'node_modules/scope-provider/scope-provider-all.js', | |
'+TestWeb' | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://annevankesteren.nl/2009/01/gettters-setters | |
# http://antimatter15.com/wp/2010/02/experiment-cross-browser-javascript-getters-and-setters/ | |
# http://download.dojotoolkit.org/release-1.3.0/dojo-release-1.3.0/dojox/lang/observable.js | |
# http://webreflection.blogspot.com/2011/02/btw-getters-setters-for-ie-6-7-and-8.html | |
# https://gist.github.com/189354 | |
# http://webreflection.blogspot.com/2011/03/rewind-getters-setters-for-all-ie-with.html | |
# http://code.google.com/p/vbclass/ | |
# http://code.google.com/p/vbclass/source/browse/#svn%2Ftrunk%2Fmin | |
# https://github.com/eligrey/Xccessors/blob/master/xccessors-legacy.js | |
# http://jsperf.com/getter-setter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vows = require 'vows' | |
should = require 'should' | |
sinon = require 'sinon' | |
class FakeTicker | |
constructor: -> | |
@_originalTick = process.nextTick | |
sinon | |
.stub(process, 'nextTick', (callback)-> | |
setTimeout (-> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; swank-coffee.el hanachin_ | |
;;; | |
;;; Copyright (c) 2010 Ivan Shvedunov. All rights reserved. | |
;;; | |
;;; Redistribution and use in source and binary forms, with or without | |
;;; modification, are permitted provided that the following conditions | |
;;; are met: | |
;;; | |
;;; * Redistributions of source code must retain the above copyright | |
;;; notice, this list of conditions and the following disclaimer. |
OlderNewer