Skip to content

Instantly share code, notes, and snippets.

@bibby
bibby / dropplets-plugins.md
Created October 11, 2013 00:57
dropplets plugin plans

Dropplet plugin plans

Life cycle events

These events occur naturally during the life of a post. Sometimes once, others frequently. The intention is to provide hooks in an event-broadcast style that allow users to intercept them and introduce plugin code between normal operations.

Events being looked at:

  • post add
@bibby
bibby / gardner.erl
Created July 28, 2013 06:28
A solution to finding the smallest integer with a multiplicative persistence of 5 (to 9) for Erlang
% A solution to a puzzle in Martin Gardner's book
% The Colossal Book of Short Puzzles and Problems,
%
% bibby <[email protected]>
%
% Puzzle:
% A number's persistence is the number of steps required
% to reduce it to a single digit by multiplying all its
% digits to obtain a second number, then multiplying all
% the digits of that number to obtain a third number, and
@bibby
bibby / jq_inputkey_selector.js
Created January 2, 2011 22:08
jquery input "array key" selector
/*
The past few days, I've seen people in #jquery asking about using selectors
to match inputs with names that would produce arrays on the backend, such as
<input name="foo[]" />
<input name="foo[foo]" />
<input name="foo[bar][baz]" />
So I wrote a selector that works with these.
Feel free to use/improve