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([ | |
'riot', | |
'text!https://rawgit.com/leonardorb/2430f80b49d0fb0c6f7c/raw/24cf291884cfb1fb72adedf020ddb82abea57d61/foldertree.html', | |
], function (riot, tpl) { | |
'use strict'; | |
riot.tag('foldertree', tpl); | |
}); |
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
<foldertree> | |
<h1>Hello, my name is {name}</h1> | |
this.name = opts.name; | |
</foldertree> |
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 keyframes($animation-name) | |
@-webkit-keyframes #{$animation-name} | |
@content | |
@-moz-keyframes #{$animation-name} | |
@content | |
@keyframes #{$animation-name} | |
@content | |
@mixin animation($str) | |
-webkit-animation: #{$str} |
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
Thorax.Router = Backbone.Router.extend({ | |
constructor: function() { | |
var response = Thorax.Router.__super__.constructor.apply(this, arguments); | |
initializeRouter.call(this); | |
return response; | |
}, | |
route: function(route, name, callback) { | |
if (!callback) { | |
callback = this[name]; | |
} |
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 Api::V1::SessionsController < ::Devise::SessionsController | |
#skip_before_filter :verify_authenticity_token | |
def create | |
@user = User.find_for_authentication(:email => params[:user][:email]) | |
if @user.nil? | |
render :json => {:success => false, :message => "Incorrect email or password."}, :status => 401 | |
else | |
if @user.valid_password?(params[:user][:password]) |
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
casper = require('casper').create( | |
verbose: true | |
logLevel: "debug" | |
clientScripts: ["libs/jquery.js", "libs/underscore.js"] | |
timeout: 10000 | |
onError: (self, m) -> | |
console.log "Fatal: " + m | |
self.exit() | |
) |
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
require.config | |
paths: | |
'jquery' : 'libs/jquery/jquery' | |
require(['jquery', 'topbar'], ($, topbar) -> | |
$ () -> | |
navBar = $('nav.main-navigation') | |
navOffsetTop = navBar.offset().top | |
$(window).scroll -> | |
topbar.fixedNavigation(navOffsetTop) |
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 ['jquery'], ($) -> | |
fixedNavigation: (navOffsetTop) -> | |
navBar = $('nav.main-navigation') | |
scrollTop = $(window).scrollTop() | |
if scrollTop > navOffsetTop | |
navBar.css | |
'position' : 'fixed' | |
'top' : 0 | |
'left' : 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 parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/' | |
} | |
RED='\[\e[0;31m\]' | |
LIGHT_BLUE='\[\e[0;34m\]' | |
LIGHT_GRAY='\[\e[1;37m\]' | |
LIGHT_GREEN='\[\e[0;32m\]' | |
WHITE='\[\e[0;37m\]' |
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
http://support.apple.com/kb/DL1531 |
NewerOlder