# By default we use the Node.js version set in your package.json or the latest
# version from the 0.10 release
#
# You can use nvm to install any Node.js (or io.js) version you require.
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
# Create your superuser | |
$ mongo | |
> use admin | |
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]}) | |
> exit | |
# Alias for convenience (optional and at your own risk) | |
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile | |
$ source ~/.bash_profile |
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
for message in result.data.messages { | |
let json = JSON(message) | |
var date : NSDate! | |
if let messageDate = json["timetoken"].number { | |
let dateAsInt = messageDate as NSInteger! | |
let unixTime = dateAsInt / 10000000 | |
date = NSDate(timeIntervalSince1970: NSTimeInterval(unixTime)) | |
} | |
println("my date \(date)") | |
} |
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
// Slide In From Right | |
// ------------------------------- | |
@-webkit-keyframes slideInFromRight { | |
from { -webkit-transform: translate3d(100%, 0, 0); } | |
to { -webkit-transform: translate3d(0, 0, 0); } | |
} | |
@-moz-keyframes slideInFromRight { | |
from { -moz-transform: translateX(100%); } | |
to { -moz-transform: translateX(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
<ion-conent> | |
<div class=“list”> | |
<!—content—> | |
</div> | |
</ion-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
@mixin show-it { | |
height: auto; | |
visibility: visible; | |
@include opacity(1); // Compass mixin | |
} | |
@mixin hide-it { | |
position: absolute; | |
-webkit-transform: translate3d(-9999rem,0,0); | |
-moz-transform: translate3d(-9999rem,0,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
// Mobile | |
@mixin kill-mobile-zoom { | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: none; | |
} | |
@mixin kill-tap-highlight { | |
-webkit-tap-highlight-color: rgba(0,0,0,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
var express = require("express"), | |
app = express.createServer(express.logger()); | |
port = process.env.PORT || 3000; | |
app.configure(function(){ | |
app.use(express.methodOverride()); | |
app.use(express.bodyParser()); | |
app.use(express.static(__dirname + '/')); | |
app.use(express.errorHandler({ | |
dumpExceptions: true, |
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
source :rubygems | |
gem 'rake' | |
gem 'rack' | |
gem 'rack-rewrite' | |
gem 'thin' | |
gem 'sprockets', '2.2.0' | |
gem 'sass' | |
gem 'coffee-script' |
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
<% if Rails.env.development? %> | |
@onLoadFailed = (event, data) -> | |
text = data.xhr.responseText | |
newHtml = text.split(/<\/?html[^>]*>/g)[1] | |
$("html").html newHtml | |
$(document).on "pageloadfailed", onLoadFailed | |
<% end %> |
NewerOlder