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 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
@CallbackController = RouteController.extend( | |
fastRender: true | |
onBeforeAction: (pause) -> | |
p = @params | |
run = false | |
switch p.key | |
when "stripe" | |
u = Meteor.user() |
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
Template.foo.helpers({ | |
data1: function(){ | |
var array = []; | |
var storedData = Session.get("data"); | |
//underscore | |
_.each(Object.keys(storedData),function(key){ | |
array.push(storedData[key]); | |
}); | |
return array; | |
}, |
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
#!/bin/bash -x | |
# useradd -m digilord # Uncomment and change digilord to your username if you want to add a user for yourself | |
sudo apt-get install build-essential -y | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update -y | |
sudo apt-get install nodejs -y | |
sudo apt-get install mongodb -y |
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
/dev/vda / ext4 rw,noatime,errors=remount-ro 0 0 | |
proc /proc proc rw,noexec,nosuid,nodev 0 0 | |
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0 | |
none /sys/fs/fuse/connections fusectl rw 0 0 | |
none /sys/kernel/debug debugfs rw 0 0 | |
none /sys/kernel/security securityfs rw 0 0 | |
udev /dev devtmpfs rw,mode=0755 0 0 | |
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0 | |
tmpfs /run tmpfs rw,noexec,nosuid,size=10%,mode=0755 0 0 | |
none /run/lock tmpfs rw,noexec,nosuid,nodev,size=5242880 0 0 |
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
#!/bin/bash -x | |
# useradd -m digilord # Uncomment and change digilord to your username if you want to add a user for yourself | |
sudo apt-get install build-essential -y | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update -y | |
sudo apt-get install nodejs -y | |
sudo apt-get install mongodb -y |
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
Error: failed to connect to [localhost:27017] | |
at null.<anonymous> (/home/snapter/bundle/programs/server/npm/mongo-livedata/main/node_modules/mongodb/lib/mongodb/connection/server.js:540:74) | |
at EventEmitter.emit (events.js:106:17) | |
at null.<anonymous> (/home/snapter/bundle/programs/server/npm/mongo-livedata/main/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:140:15) | |
at EventEmitter.emit (events.js:98:17) | |
at Socket.<anonymous> (/home/snapter/bundle/programs/server/npm/mongo-livedata/main/node_modules/mongodb/lib/mongodb/connection/connection.js:478:10) | |
at Socket.EventEmitter.emit (events.js:95:17) | |
at net.js:441:14 | |
at process._tickCallback (node.js:415:13) | |
root@default:/etc/nginx/sites-available# |
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 torrentStream = require('torrent-stream'); | |
var fs = require('fs'); | |
var http = require('http'); | |
var engine = torrentStream('magnet:?xt=urn:btih:283BD2E33EC85094789891A44CD5A3D2A2714205'); | |
engine.on('ready', function() { | |
var file = engine.files[0]; | |
file.select(); | |
var server = http.createServer(function(req, res) { |
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
Error: Settings are not valid JSON | |
at packages/meteor/server_environment.js:31 | |
at packages/meteor.js:59:4 | |
at packages/meteor.js:1070:3 | |
at /home/snapter/bundle/programs/server/boot.js:155:10 | |
at Array.forEach (native) | |
at Function._.each._.forEach (/home/snapter/bundle/programs/server/node_modules/underscore/underscore.js:79:11) | |
at /home/snapter/bundle/programs/server/boot.js:82:5 |
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
#!upstart | |
description "Snapter Upstart" | |
author "Ariel Fuggini" | |
env APP_NAME='snapter' | |
env PORT='3000' | |
env METEOR_SETTINGS="$(cat /vagrant/snapter/config/production/settings.json)" | |
env ROOT_URL="http://snapter.co" | |
env NODE_BIN='/usr/local/bin/node' | |
env MONGO_URL="mongodb://localhost:27017/meteor" |