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
{ | |
"name" : "WASDnation", | |
"desc" : "We rock!", | |
"url" : "http://wasdnation.com", | |
"tags" : [ | |
"wow", | |
" csgo", | |
" casual" | |
], | |
"ranks" : [ |
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
Template.quickForm.events({ | |
// Submission of Category form | |
"submit #catForm": function(event) { | |
// Do some form verification here | |
var theName = event.target.catName.value; | |
var theLimit = event.target.catLimit.value; | |
// Thanks to: http://stackoverflow.com/questions/308122/simple-regular-expression-for-a-decimal-with-a-precision-of-2 |
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
<!-- Category --> | |
<form id="catForm"> | |
<section class="form-group"> | |
<label for="transAmount">Name:</label> | |
<input type="text" class="form-control input-sm" id="catName" placeholder="Category Name"> | |
</section> | |
<section class="form-group"> | |
<label for="transAmount">Budget (Optional):</label> | |
<section class="input-group"> | |
<span class="input-group-addon input-sm">$</span> |
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
// Storage for mod uploads (.zip only) | |
var modStore = new FS.Store.S3("modFiles", { | |
accessKeyId: Meteor.settings.awsAccessKeyId, | |
secretAccessKey: Meteor.settings.awsSecretKey, | |
bucket: Meteor.settings.awsBucket, | |
folder: "mods" | |
}); | |
ModFiles = new FS.Collection("modFiles", { |
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 urlBase = "stuff"; | |
var names = ['blah', 'blah', 'blah', 'blah', 'blah']; | |
// This will add the URL to your names, making them proper Twitch URLs. | |
_.map(names, function(name) { | |
return urlBase + name; | |
}); | |
// We need an empty array here to hold the data we're getting from Twitch. | |
var responses = []; |
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
// Rendered (jQuery stuff) | |
Template.msgList.onRendered(function() { | |
$(".message-block").mouseover(function() { | |
alert("Triggered!"); | |
$(this).find(".message-delete").css("color", "#3E3F3A"); | |
}); | |
$(".message-block").mouseout(function() { | |
$(this).find(".message-delete").css("color", "#F8F5F0"); |
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
// Mod Follows | |
Follows = new Mongo.Collection("follows"); | |
Follows.allow({ | |
insert: function(userId, doc) { | |
return userId; | |
}, | |
update: function(userId, doc) { | |
return false; | |
}, |
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
Template.layout.onCreated(function() { | |
var follows = Follows.find({owner: this.userId}, { fields: { uid: 1 }}).map(function(doc) { | |
return doc._id; | |
}); | |
console.log(follows); | |
Events.find( { uid: { $in: follows } }).observe({ |
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
// Event Handler | |
Template.template.events({ | |
'blur .order': function(event) { | |
var position = $(event.target).val(); | |
Meteor.call('updateOrder', this, position, function(err) { | |
throw new Meteor.Error("Couldn't update record"); | |
}); | |
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
client = MPD.connect({ | |
port: 6600, | |
host: 'localhost' | |
}); | |
client.on('system-player', function() { | |
client.sendCommand(cmd('currentsong', []), function(err, msg) { | |
if (err) throw new Meteor.Error("dead", "He's dead, Jim!"); | |
console.log(msg) | |
}) |