Posts in ‘Scrapbook’
How to tame MongoDB
Some food for thought: This week, the US Govt open sourced their petition scripts: https://github.com/WhiteHouse/petition (Good on them). I was intrigued by something in the roadmap in the readme.md (on that page): “We have been running MongoDB in production for … Continue reading
Categories: Scrapbook and tags: database, mongo, mongoose, ODM
3 Comments
PHP isset() vs array_key_exists()
I’ve seen isset( $my_array[ 'key' ] ) used as a synonym for array_key_exists( ‘key’, $my_array ) quite a few times. They aren’t equivalent, so unfortunately you can’t take the former as a shortcut for the latter! The difference is that … Continue reading
Categories: Scrapbook and tags: php
Comments Off
PHP Function: string cleanse
A code snippet for cleaning a string so that only certain characters are allowed through. A call like: string_clean( ‘stri3ng87s 11and n642umb1ers’, “abcdefghijklmnopqrstuvwxyz” ); …will return: strings and numbers Code: function string_clean( $string_in, $permitted_chars ) { $string_search_pos = 0; $string_out … Continue reading
Categories: Scrapbook and tags: code, php
1 Comment
Diaspora – Early release code receives criticism
The team behind Diaspora, the open source social network mooted as a ‘privacy aware’ competitor to Facebook, has released their first pre-alpha source code. It seems to have attracted a salvo of criticism from outside developers – some labelling the … Continue reading
Categories: Scrapbook and tags: Diaspora, open source
Comments Off
Scrapbook area
I’ll be posting useful and controversial web articles that I find on my travels in this section.
Categories: Scrapbook
Comments Off
