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 text-overflow-fade($background-color: #fff, $text-width: 100%, $fade-size: 30%) { | |
width: $text-width; | |
overflow: hidden; | |
white-space: nowrap; | |
position: relative; | |
&:after { | |
content: ''; | |
position: absolute; |
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 | |
if ( file_exists( dirname( __FILE__ ) . '/wp-local-config.php' ) ) { | |
include( dirname( __FILE__ ) . '/wp-local-config.php' ); | |
define( 'WP_LOCAL_DEV', true ); | |
} else { | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, |
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
[class^="icon-"], [class*=" icon-"]{ | |
background:none; | |
} |
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
$.urlParam = function(name){ | |
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href); | |
if (results==null){ | |
return null; | |
}else{ | |
return results[1] || 0; | |
} | |
} |
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
$(function() { | |
$('a[href*=#]:not([href=#])').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
$('html,body').animate({ | |
scrollTop: target.offset().top | |
}, 1000); | |
return false; |
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
#Make sure heroku toolbelt and rvm are installed | |
#heroku toolbelt available to download on their site, rvm available via curl | |
\curl -sSL https://get.rvm.io | bash -s stable --ruby | |
rvm use "2.1.1" | |
rvm use --create 2.1.1@project | |
gem install rails | |
#if using postgres (good for heroku) pass argument to 'rails new' | |
rails new project --database=postgresql |
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 actions = { | |
action1: function() {}, | |
action2: function() {} | |
//.... | |
}; | |
$('body').on('click', '[data-action]', function() { | |
var action = $(this).data('action'); | |
if (action in actions) { | |
actions[action].apply(this, arguments); |
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 FadeTransitionRegion = Backbone.Marionette.Region.extend({ | |
show: function(view){ | |
this.ensureEl(); | |
view.render(); | |
this.close(function() { | |
if (this.currentView && this.currentView !== view) { return; } | |
this.currentView = view; |