A Pen by Ian Thomas on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Learn to code with Kelis' Milkshake | |
http://en.wikipedia.org/wiki/Milkshake_(song) | |
Created by Brendan Dawes brendandawes.com | |
*/ | |
// "my milkshake brings all the boys to the yard" | |
if (milkShake) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function getLinkifiedText(){ | |
$allEntities = array(); | |
foreach(json_decode($this->entities) as $entityGroup){ | |
foreach($entityGroup as $entity){ | |
$allEntities[$entity->indices[0]] = $entity; | |
} | |
} | |
krsort($allEntities); | |
$text = $this->text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RAILS_ROOT/lib/task/tddium.rake | |
# | |
# http://blog.tddium.com/2012/05/09/heroku-continuous-deployment/ | |
# https://gist.github.com/semipermeable/2639790 | |
# https://github.com/javierjulio | |
namespace :tddium do | |
desc "Tddium pre-worker hook that sets up test db" | |
task :worker_setup_hook do | |
Bundler.with_clean_env do | |
system "rake db:test:prepare" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var fs = require('fs') | |
, util = require('util') | |
, path = require('path'); | |
var total = 0; | |
/** | |
* | |
* Iterate through the filesystem and create a file that documents assets created | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "main"; | |
$list-margin: $base-spacing-unit!default; | |
@mixin create-horizontal-list($name: 'ui-list') { | |
#{$name} { | |
list-style: none; | |
margin: 0; | |
&__item { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.9) | |
// Compass (v1.0.0.alpha.20) | |
// ---- | |
// Declared as a project global | |
$breakpoints: ( | |
alpha: 30rem, | |
beta: 48rem, | |
gamma: 60rem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v2.0.0) | |
// ---- | |
@import "sass-list-maps"; | |
$selector: push; | |
$modifiers: (left right top bottom); | |
$space: 2em; | |
/* In BEM methodology we would want our modifiers to be prefixed with `--` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v2.0.0) | |
// ---- | |
@import "sass-list-maps"; | |
$selectors: (push margin, soft padding); | |
$modifiers: (left right top bottom); | |
$space: 2em; | |
/* In BEM methodology we would want our modifiers to be prefixed with `--` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var range = { | |
0: { min: 0, max: 125000}, | |
2: { min: 125000, max: 250000}, | |
5: { min: 250000, max: 925000}, | |
10: { min: 925000, max: 1500000}, | |
12: { min: 1500000, max: null} | |
}; | |
function stampDuty(houseValue) { | |
return Object.keys(range).reduce(function(duty, percentage) { |
OlderNewer