Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.
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
########## Install NGINX ############## | |
# Install software-properties-common package to give us add-apt-repository package | |
sudo apt-get install -y software-properties-common | |
# Install latest nginx version from community maintained ppa | |
sudo add-apt-repository ppa:nginx/stable | |
# Update packages after adding ppa |
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 mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
var ObjectId = mongoose.Types.ObjectId; | |
console.log('Running mongoose version %s', mongoose.version); | |
var UserSchema = new Schema({ | |
name : String, | |
posts : [{ | |
type : Schema.Types.ObjectId, |
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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.4' | |
} | |
} | |
apply plugin: 'android' |
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
# config/initializers/will_paginate.rb | |
module WillPaginate | |
module ActionView | |
def will_paginate(collection = nil, options = {}) | |
options[:renderer] ||= BootstrapLinkRenderer | |
super.try :html_safe | |
end | |
class BootstrapLinkRenderer < LinkRenderer |
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
module BootstrapPaginationHelper | |
class LinkRenderer < WillPaginate::ActionView::LinkRenderer | |
protected | |
def page_number(page) | |
unless page == current_page | |
link(page, page, :rel => rel_value(page)) | |
else | |
link(page, "#", :class => 'active') | |
end |
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
named_queries : { | |
'default' : 'only screen and (min-width: 1px)', | |
small : 'only screen and (min-width: 768px)', | |
medium : 'only screen and (min-width: 1280px)', | |
large : 'only screen and (min-width: 1440px)', | |
landscape : 'only screen and (orientation: landscape)', | |
portrait : 'only screen and (orientation: portrait)', | |
retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' | |
+ 'only screen and (min--moz-device-pixel-ratio: 2),' | |
+ 'only screen and (-o-min-device-pixel-ratio: 2/1),' |
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
resize : function () { | |
var cache = this.cache; | |
for (var uuid in cache) { | |
if (cache.hasOwnProperty(uuid)) { | |
var passed = this.results(uuid, cache[uuid]); | |
if (passed) { | |
this.settings.directives[passed | |
.scenario[1]](passed.el, passed.scenario[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
loaded : function (image, last, callback) { | |
function loaded () { | |
callback(image[0], last); | |
} | |
function bindLoad () { | |
this.one('load', loaded); | |
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { | |
var src = this.attr( 'src' ), |
NewerOlder