Skip to content

Instantly share code, notes, and snippets.

View michaeltwofish's full-sized avatar

Michael C. Harris michaeltwofish

  • South Australia, Australia
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@michaeltwofish
michaeltwofish / dabblet.css
Last active December 15, 2015 01:29
tiger in the snow (HTML5)
/**
* tiger in the snow (HTML5)
*/
figure {
min-width: 178px;
/** outline: solid 1px red; /* uncomment rule to see figure outline */
position: relative;
opacity: 1.0;
}
figure:hover {
$content .= $itemopen . '### [' . $bookmark->title . '](' . $bookmark->url . ") \n" . $bookmark->description . "\n";
@michaeltwofish
michaeltwofish / gist:2410753
Created April 18, 2012 02:48
Lithium MongoDB unique tags from users
Get
array
'assertion' => string 'reduce -> multiple not supported yet' (length=36)
'assertionCode' => int 10075
'errmsg' => string 'db assertion failure' (length=20)
'ok' => float 0
From
@michaeltwofish
michaeltwofish / gist:1777704
Created February 9, 2012 05:53 — forked from ringmaster/gist:1777673
Get all items from a test
db.tests.remove({slug: "foo"})
db.tests.insert({slug: "foo", forms: [ {slug: "section 1", clusters: [
{slug: "cluster 1", items: [1,2,3]},
{slug: "cluster 2", items: [4,5,6]}
]}]});
var map = function() {
this.forms.forEach(function(form){
form.clusters.forEach(function(cluster){
cluster.items.forEach(function(item){
@michaeltwofish
michaeltwofish / gist:1416312
Created December 1, 2011 12:19 — forked from schappim/gist:1366104
LBE Workshop Notes
Get in contact with us:
help@littlebirdelectronics.com or marcus@littlebirdelectronics.com or madeleine@littlebirdelectronics.com
02 8003 3523
http://www.littlebirdelectronics.com/facebook
http://twitter.com/lbhq
http://www.littlebirdelectronics.com/googleplus
Hackerspaces:
http://www.makehackvoid.com/ (Canberra)
@michaeltwofish
michaeltwofish / Custom.css
Created August 27, 2011 10:14 — forked from bentruyman/Custom.css
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
<?php
Validator::add('uniqueFieldForClient', function($value, $format = null, $options = array()) {
$class = $options['class'];
$field = $options['field'];
$conditions = array($field => $value);
if (isset($options['values']['id'])) {
$conditions[] = 'id != ' . $options['values']['id'];
}