Or, alternatively, I might use #webactions and do=post, based on a bunch of research
Or, alternatively, I might use #webactions and do=post, based on a bunch of research
Doing a test implementation of a+rel+iframe+postMessage hypermedia UI injection (needs a better name) — using existing rel=create-form
cssquirrel Zepto is nice for browser extensions, where the browser will always be modern and capable
How to make nice Mediawiki clean URLs — this is the cleanest, simplest way to do this I have found so far #bookmark #mediawiki
Turns out that performing a GET request on a data URI from PHP works if file_get_contents is used, not if cURL is used. I wonder what support is like for other server side languages — using data URIs in with
could be the basis of some interesting #webactions.
cssquirrel even the if/else is redundant ;)
function awesomeWorkday(tasks) {
return (tasks instanceof coolJsonStuff || tasks instanceof coolApiStuff) ? true : false;
}
cgcardona I find duckduckgo.com’s coder-friendly features (like !mdn, stackoverflow answers inserted above search results, urlencode {text} and the like) to be super-useful — I occasionally fall back to google, but not often :)
#learning Django
pcntl_wait($status); //Protect against Zombie children
Every now and again the otherwise banal PHP docs make me laugh.
Really loving bastianallgeier’s thoughts on PHP as a templating language — very very similar to my own approach #php #dev #bookmark
I’m noticing a #taproot pattern emerge whilst writing the simplified auth code: multiple event listeners which don’t know about each other working on the same object, augmenting and changing it.
E.G. RememberMeListener looks for an encrypted cookie with a URL (my user ID of choice) in — if it finds one it makes an ActivityStream person object and puts it in request.attributes.user.
Then, in the same event chain but at a lower priority level, the Contacts module looks in request.attributes.user for a URL. It looks up the URL in my people DB and, if there is anyone, augments request.attributes.user with all the extra info (full name, roles, photo URL, rel value, etc.)
Then, another listener could run, looking for request.attributes.user with only URL — and look the URL up on identengine.com, caching the response.
Other example is @-name autolinking, working on a similar basis of: basic transformation (raw data => common data format), then progressive augmentation adding URLs, names and rel values.
I think this a very powerful and flexible pattern and something I will make a founding principle of Taproot.
Finally decided that symfony Security component is way too complicated for my little #taproot, so ditching it — but I’ve learnt a lot from digging through it and my further efforts will try to provide some of the amazing flexibility it gives whilst being more performant and easier to understand #php #dev #meta
php2python.com is super useful for learning all the little things which always need doing when moving from #php to #python, e.g. splitting a string using another string, or pretty-printing a dict.
I love that #php now has shiny namespacing and a thriving code sharing community, but I think the heavily hierarchical namespacing practises used by some of the community (e.g. symfony components) are unhealthy.
They are difficult to memorise, relying on (often slow) IDE autocomplete, and encourage a use
statement for each class. That’s pretty much a scoped equivalent of from x import *
in python — not a good practise! It’s still namespace pollution, it just takes longer to write.
I am trying to use a more python–like, package-centred approach with much fewer subnamespaces. The outcome of this should be that you use
the package name:
use BarnabyWalters
osse;
…and then using all the classes/subnamespaces from that root, e.g: $t = Posse\Helpers::convertHtmlToTwitterFormat($s);
Created this evening: a partial parser for ABC notation. It currently only handles headers, including ones within the music, but not inline headers. For the #taproot tunes module
Brennan Novak great to see you auto–POSSEing! And pleased that you found the truncenator useful. Also check out the stuff in BarnabyWaltersPosse, there’s a more up to date version of the truncenator as well as some other syndication helpers.