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
// helper function | |
function parseVideoId(link) { | |
// parses youtube or vimeo links.. but not vimeo shar | |
var urlComesAfter = { | |
'\\.be/': function() { return link.split('.be/')[1].replace('/','')}, | |
'v=': function() { return link.split('v=')[1].replace('/','')}, | |
'vimeo.com/': function() { | |
if (isNaN(parseInt(link.split('/').slice(-1)[0]))) { | |
var rawLink = link.split('/'); | |
return [rawLink[3],rawLink[4]]; |
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
!!! 5 | |
//[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif] | |
//[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif] | |
//[if IE 8]> <html class="no-js lt-ie9"> <![endif] | |
//[if gt IE 8]><!--> <html class="no-js"> <!--<![endif] | |
html.no-js | |
head | |
meta(charset='utf-8') | |
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1') | |
title |
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
"use strict" | |
# # Globbing | |
# for performance reasons we're only matching one level down: | |
# 'test/spec/{,*/}*.js' | |
# use this if you want to recursively match all subfolders: | |
# 'test/spec/**/*.js' | |
module.exports = (grunt) -> | |
# show elapsed time at the end |
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
!!! 5 | |
//if lt IE 7 | |
html.no-js.lt-ie9.lt-ie8.lt-ie7 | |
//if IE 7 | |
html.no-js.lt-ie9.lt-ie8 | |
//if IE 8 | |
html.no-js.lt-ie9 | |
// [if gt IE 8] <! | |
html.no-js | |
// <![endif] |
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
# Generated on 2013-10-06 using generator-webapp 0.4.2 | |
"use strict" | |
# # Globbing | |
# for performance reasons we're only matching one level down: | |
# 'test/spec/{,*/}*.js' | |
# use this if you want to recursively match all subfolders: | |
# 'test/spec/**/*.js' | |
module.exports = (grunt) -> | |
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
<!doctype html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Alvaro Muir | Thought You'd Wanna Know</title> | |
<meta name="description" content="Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat."> | |
<link rel="shortcut icon" href="http://assets.tumblr.com/images/default_avatar_128.png"> |
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
// Colors: | |
$TURQUOISE: #1abc9c; | |
$GREENSEA: #16a085; | |
$EMERALD: #2ecc71; | |
$NEPHRITIS: #27ae60; | |
$PETERRIVER: #3498db; | |
$BELIZEHOLE: #2980b9; | |
$AMERGYST: #9b59b6; | |
$WISTERIA: #8e44ad; | |
$WETASPHALT: #34495e; |
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
def ordinal(n): | |
if 4 <= n <= 20 or 24 <= n <= 30: | |
return n + 'th' | |
else: | |
return str(n) + ["st", "nd", "rd"][n % 10 - 1] |
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
// Remove timestamp from NSLog | |
#define NSLog(FORMAT, ...) printf("%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]); |
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
#define PI 3.141592654 | |
#define TWO_PI 2.0 * PI | |
#define SQUARE(x) ((x)*(x)) | |
#define CUBE(x) ((x)*(x)*(x)) | |
#define IS_LEAP_YEAR(y) y % 4 == 0 && y % 100 != 0 || y % 400 == 0 | |
#define IS_LOWER_CASE(x) ( ((x) >= 'a') && ((x) <= 'z')) | |
#define TO_UPPER(x) (IS_LOWER_CASE(x) ? (x) - 'a' + 'A': (x)) | |
#define INCHES_PER_CENT 0.394 | |
#define CENT_PER_INCH (1/INCHES_PER_CENT) |
OlderNewer