This file contains hidden or 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
# Using Ubuntu | |
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
# Using Debian, as root | |
curl -sL https://deb.nodesource.com/setup_4.x | bash - | |
apt-get install -y nodejs |
This file contains hidden or 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
group :development do | |
# Access an IRB console on exception pages or by using <%= console %> in views | |
gem 'web-console', '~> 2.0' | |
# Monitor file changes | |
gem 'guard' | |
gem 'guard-livereload', '~> 2.4', require: false | |
gem 'rack-livereload' | |
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring |
This file contains hidden or 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
guard 'livereload' do | |
watch(%r{app/views/.+\.(erb|haml|slim)$}) | |
watch(%r{app/helpers/.+\.rb}) | |
watch(%r{public/.+\.(css|js|html)}) | |
watch(%r{config/locales/.+\.yml}) | |
# Rails Assets Pipeline | |
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html|png|jpg))).*}) { |m| "/assets/#{m[3]}" } | |
end |
This file contains hidden or 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
# warning: Insecure world writable dir /var/www in PATH, mode 040777 | |
# fix | |
chmod go-w /var/www |
This file contains hidden or 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
<div class="demo-container"> | |
<h1 id="main-title">Foobar</h1> | |
<h3 id="sub-title">Lorem Ipsum dolor</h3> | |
</div> |
This file contains hidden or 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 initialValues = { | |
y:40, | |
opacity:0 | |
} | |
var mainTitleActor = new ui.Actor({ | |
element: "#main-title", | |
values: initialValues | |
}); |
This file contains hidden or 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 showUpTween = new ui.Tween({ | |
values: { | |
y: 0, | |
opacity: 1 | |
}, | |
duration:600 | |
}); |
This file contains hidden or 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 sequence = new ui.Sequence(); | |
sequence.clear() | |
.do(this.mainTitleActor, this.showUpTween) | |
.at('+=150') | |
.do(this.subTitleActor, this.showUpTween) | |
.start(); |
This file contains hidden or 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> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>QUnit Example</title> | |
<link rel="stylesheet" href="http://{path-to-your-install}/qunit/qunit-1.15.0.css"> | |
</head> | |
<body> | |
<div id="qunit"></div> | |
<div id="qunit-fixture"></div> |
This file contains hidden or 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
test("division_parse", function(assert) { | |
var result = DivisionHelper.parse('1/2'); | |
assert.equal(result, 0.5) | |
}); |