Skip to content

Instantly share code, notes, and snippets.

View ibolmo's full-sized avatar
🧠

Olmo Maldonado ibolmo

🧠
View GitHub Profile
@ibolmo
ibolmo / trello-sort-search-by-edf.user.js
Last active August 29, 2015 14:11
Trello Sort Search Cards by Earliest Deadline First
// ==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
@ibolmo
ibolmo / bookmarklet.js
Last active August 29, 2015 14:04
Stacked lists for Trello
javascript:(function(){
$('head').append('<link href="https://rawgit.com/ibolmo/d2ee60fffe3b88e8745f/raw/stacked.css" rel="stylesheet" type="text/css"/>');
})()
@ibolmo
ibolmo / FootnoteHelper.php
Created October 24, 2012 20:09
footnote helper
<?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
@ibolmo
ibolmo / by_chance.php
Created July 18, 2012 21:42
if by chance.. then
<?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();
@ibolmo
ibolmo / 1.4.3-changelog.md
Created January 18, 2012 18:39
1.4.3 changelog

1.4.4 / 2012-01-18

  • Hello 1.4.4dev

1.4.3 / 2012-01-17

  • Added spec coverage.
  • Small optimization
@ibolmo
ibolmo / Object.js
Created January 5, 2012 17:53
Object.isStrictlyEquals
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);