Skip to content

Instantly share code, notes, and snippets.

Sebastian Markbåge sebmarkbage

Block or report user

Report or block sebmarkbage

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View cat.js
// EXAMPLE: a compound iterator with sequencing
// Python style
function cat() {
let is = arguments;
return {
next: {
let length;
while ((length = is.length) > 0) {
try {
View MooTools-Tests.html
<script src="mootools.js"></script>
<script src="mootools-"></script>
<script src="rx.js"></script>
<script src="rx.mootools.js"></script>
window.addEvent('domready', function() {
View Array.Shuffle.js
// Array shuffle for MooTools
shuffle: function(){
for (var i = this.length; i && --i;){
var temp = this[i], r = Math.floor(Math.random() * ( i + 1 ));
this[i] = this[r];
this[r] = temp;
View MyLocalArrayCopy.js
original: 'urn:Sheer:Lang:Array',
require: {
'urn:Sheer:Lang': ['Type', 'Object', 'Function']
}, function(Type, Object, Function) {
View animation.js
name: Animation
description: Simple animations implementation that work with standard-sized browsers (using Fx) and use webkit css animations where available.
license: MooTools MIT-Style License (
copyright: Valerio Proietti (
authors: Valerio Proietti (
requires: MooTools 1.2.3+ (Core) (
var Animation = new Class({
View Element.truncate.js
truncates element text to fit in element width.
end (bool) defaults false. True = cuts string at end, False = cuts string in middle
str (string) truncation string default : '...'
truncate : function(end,str){
str = str || '...';
var style =;
var originalStyles = { overflow: style.overflow, 'white-space': style.whiteSpace, padding: style.padding };
You can’t perform that action at this time.