- Hello 1.4.4dev
- Added spec coverage.
- Small optimization
| // ==UserScript== | |
| // @name TrelloSortSearch | |
| // @author Olmo Maldonado <ibolmo@gmail.com> | |
| // @namespace https://gist.github.com/ibolmo | |
| // @version 0.0.6 | |
| // @description Trello Sort Search Cards by Earliest Deadline First | |
| // @match https://trello.com/search?q=* | |
| // @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js | |
| // @run-at document-end | |
| // @copyright 2014+, Olmo Maldonado |
| javascript:(function(){ | |
| $('head').append('<link href="https://rawgit.com/ibolmo/d2ee60fffe3b88e8745f/raw/stacked.css" rel="stylesheet" type="text/css"/>'); | |
| })() |
| <?php | |
| use_helper('Tag'); | |
| $footnotes = array(); | |
| $footnote_ptr = 0; | |
| function footnote($reference) | |
| { | |
| global $footnote_ptr; |
| LogLevel warn | |
| ErrorLog /var/www/host/log/ssl_error.log | |
| CustomLog /var/www/host/log/ssl_access.log combined |
| <?php | |
| function by_chance($chance = 0.5) | |
| { | |
| if ($chance >= 1) return true; | |
| if ($chance <= 0) return false; | |
| $size = pow($chance, -1); | |
| return rand(0, $size) < ($chance * $size); | |
| } |
| //.. | |
| // Type | |
| var Type = this.Type = function(name, object){ | |
| if (name){ | |
| var lower = name.toLowerCase(); | |
| var typeCheck = function(item){ | |
| return (typeOf(item) == lower); | |
| }; |
| (function(){ | |
| var re, units = {ms: 1, s: 1e3}; | |
| Duration = function(value){ | |
| return Duration.parse(value); | |
| }; | |
| Duration.parse = function(value){ | |
| var match = value.toString().match(re); |
| var Animal = new Class({ | |
| bounds: {}, | |
| initialize: function(element){ | |
| if (element) this.attach(element); | |
| }, | |
| attach: function(element){ | |
| if (this.element) this.detach(); |
| var equals = function(value, i){ | |
| return (i in this) && Object.equals(value, this[i]); | |
| }; | |
| Object.extend({ | |
| 'equals': function(first, second){ | |
| if (first === second) return true; | |
| var type = typeOf(first); | |
| if (type !== typeOf(second)) return false; | |
| if (type == 'regexp') return String(first) == String(second); |