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 IE 8]> <html lang="sv-SE" class="no-js ie8"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html lang="sv-SE" class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Breakpoint detection test</title> | |
<style type="text/css" media="screen"> | |
@media screen and (min-width: 320px) { | |
#page:after { | |
content: 'smallest'; /* represent the current width-bracket */ |
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
App.SidePanelComponent = Em.Component.extend({ | |
tagName: 'div', | |
classNames: ['blah'], | |
classNameBindings: ['isOpen:opened:closed'], | |
isOpen: false, | |
actions: { | |
toggleSidepanel: function(){ | |
this.toggleProperty('isOpen'); | |
} | |
} |
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
App.ArtistSongsRoute = Ember.Route.extend({ | |
(...) | |
afterModel: function(model) { | |
var artistName = this.modelFor('artist').get('name'); | |
$(document).attr('title', artistName + ' songs - Rock & Roll'); | |
} | |
}); |
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
@mixin gradient($from, $to) { | |
background-color: $from; | |
background-image: -moz-linear-gradient($from, $to); | |
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to)); | |
background-image: -webkit-linear-gradient($from, $to); | |
background-image: -o-linear-gradient($from, $to); | |
} |
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
@mixin breakpoint($point) { | |
@if $point == desktop { | |
@media (min-width: 70em) { @content; } | |
} | |
@else if $point == laptop { | |
@media (min-width: 64em) { @content; } | |
} | |
@else if $point == tablet { | |
@media (min-width: 50em) { @content; } | |
} |
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
//Update google Analytics - client side | |
$window._gaq.push(['_trackPageview', $location.path()]); | |
//reload DFP banners | |
googletag.pubads().refresh(); |
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 bgColor = '#163596', | |
bgImg = 'http://i.imgur.com/7MDjqNU.jpg'; | |
var space = window.parent.document.body, | |
ad = space.querySelectorAll('#AD'), | |
adClickURL = '%%CLICK_URL_UNESC%%'; | |
space.style.backgroundColor = bgColor; | |
space.style.backgroundImage = 'url(%%VIEW_URL_UNESC%%' + bgImg + '?v=%%CACHEBUSTER%%)'; |
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
#!/bin/bash | |
# | |
# Display usage info | |
vhost-usage() { | |
cat <<"USAGE" | |
Usage: vhost [OPTIONS] <name> | |
-h|--help this screen | |
-pub to create the webhost root in ~/www/name/public/ | |
-url to specify a local address, default is http://name.local |
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
Handlebars.registerHelper ('truncate', function (str, len) { | |
if (str.length > len) { | |
var new_str = str.substr (0, len+1); | |
while (new_str.length) { | |
var ch = new_str.substr ( -1 ); | |
new_str = new_str.substr ( 0, -1 ); | |
if (ch == ' ') { | |
break; |
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
#!/bin/bash | |
# Don't forget to chmod a+x genesis.sh | |
# Install Homebrew + Cask | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew tap caskroom/cask | |
brew install cask | |
brew update && brew upgrade brew-cask && brew cleanup | |
OlderNewer