Skip to content

Instantly share code, notes, and snippets.

{
"modes": [
"skirmish",
"salvage",
"rumble",
"too"
],
"teams": [
{
"name": "FML",
{% for col in product.collections %}
{% if col.title == product.vendor %}
<a href="{{ col.url }}" title="{{ col.title }}">{{ col.title }}</a>
{% endif %}
{% endfor %}
.alf-grid {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
padding: 0;
}
.grid(@columns, @formatWidth, @columnWidth, @outerMargin) {
function job(done) {
console.log('working hard...');
setTimeout(function () {
done();
}, 1000);
}
var queue = new Queue();
queue.add(job, true);
@peterudo
peterudo / config.js
Created July 5, 2012 11:52
Buster.js test helper
var config = exports;
// Then add `testHelpers` to the config to include it:
config["Browser tests"] = {
// Your own custom config here....
// ...
// Expose the resources so we can fetch them with ajax
// Bad practice to use it as generic as this?
resources: [
@peterudo
peterudo / hack.sh
Created April 2, 2012 09:22 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2282017/23b1f82ef37c6e47182d8124484c35ca72e0c819/hack.sh | sh
#
new SwipeView('#wrapper', {
numberOfPages: slides.length,
wrapAround: false,
onPageDraw: function (content, data) {
content.innerHTML = slides[data.upcomingPageIndex];
}
});
@peterudo
peterudo / bug.css
Created November 23, 2011 08:51
Sass
@charset "UTF-8";
small:before {
content: "— "; }
.page-content {
margin: 44 px 0 0 0; }
mbp-peter:~ peter$ sudo npm install glob
> glob@2.0.7 preinstall /Users/peter/node_modules/glob
> node-waf clean || true; node-waf configure build
Nothing to clean (project not configured)
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
<?php
abstract class A {
protected function isCacheable($object) {
if (!is_object($object) || !($object instanceof CacheableInterface)) {
return false;
}
return true;
}