Skip to content

Instantly share code, notes, and snippets.

View MaffooBristol's full-sized avatar

Matt Fletcher MaffooBristol

  • Maffcorp Ltd
  • Bristol, England
  • 16:40 (UTC +01:00)
View GitHub Profile
@MaffooBristol
MaffooBristol / craycray.css
Created May 27, 2014 14:07
Cray Cray! The most wacky, crazy, super-mad CSS class... possibly ever?
body.craycray {
animation: spinright 100s infinite linear;
}
body.craycray > * {
animation: spinleft 100s infinite linear;
}
body.craycray > * > * {
animation: spinright 100s infinite linear;
}
body.craycray > * > * > * {
# Encapsulate our stuff within an app variable.
app = {}
# Define our model- this will mostly just define default values.
app.model = Backbone.Model.extend
defaults:
coords: {}
sys: {}
weather: {}
# etc
@MaffooBristol
MaffooBristol / index.html
Last active August 29, 2015 14:00
Backbone/Marionette problem
<html>
<head>
<script type="text/javascript" src="bower_components/underscore/underscore.js"></script>
<script type="text/javascript" src="bower_components/jquery/dist/jquery.min.js"></script>
<script type='text/javascript' src="bower_components/backbone/backbone.js"></script>
<script type='text/javascript' src='bower_components/marionette/lib/backbone.marionette.min.js'></script>
</head>
<body>
<div id='wrapper'>
@nums =
0: "ноль"
1: "один"
2: "два"
3: "три"
4: "четыре"
5: "пять"
6: "шест"
7: "сём"
8: "восем"
@MaffooBristol
MaffooBristol / linked_people.php
Last active August 29, 2015 13:55
Pseudo-code for MVC linked people logic
<?php
function get_people() {
// Do something...
return $all_the_people;
}
function remove_array_values($arr1, $arr2) {
foreach ($arr1 as $key => $item) {
if (in_array($item, $arr2)) {
#!/bin/bash
# IMPORTANT!
# On Ubuntu, /bin/sh does not point to Bash, but instead to "Dash", a highly
# stripped down version that doesn't allow certain more complex behaviours
# such as the brace expansion that you will see both in the DEBUG_GREP regex
# and in the -exec subroutine in FUSE_FIND.
# Allow input from the keyboard.
exec < /dev/tty