Skip to content

Instantly share code, notes, and snippets.

{
"packages": {
"accounts-guest": {},
"jquery-mobile": {
"git": "https://github.com/Pyo25/meteor-jquery-mobile.git"
}
}
}
@digilord
digilord / smart.json
Created February 12, 2014 01:44
Package git example.
{
"meteor": {},
"packages": {
"router": {
"git": "https://github.com/justinriggio/meteor-router.git"
},
"x-editable-bootstrap": {
"git": "https://github.com/digilord/meteor-x-editable-bootstrap.git"
},
"underscore-string-latest": {},
var getOpenGitIssues = function(){
var issuesByNumber = Fiber(function(){
var future = new Future();
var _issues;
var _issuesByNumber = {};
github.issues.repoIssues({user:self.project.username, repo: self.project.name}, function(error, data){
future.return(data)
});
_issues = future.wait();
// Packages we need
var GitHubApi = require("github");
var sugar = require("sugar");
var _ = require("underscore")._;
// Start of variable assignments
var issues_by_numbers = {};
var project = "MyGitHubProject";
var github = new GitHubApi({
@digilord
digilord / app.html
Created February 10, 2014 22:43
Bootstrap CDN with a Meteor Application
<head>
<title>My Cool Meteor App</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
</head>
<body>
Your app specific stuff here
@digilord
digilord / packages.json
Created February 10, 2014 21:07
Meteor packages.json file example
{
"pusher": "0.1.3",
"mime": "1.2.11",
"rimraf": "2.2.4",
"mkdirp": "0.3.5",
"csv": "0.3.6",
"stripe": "2.4.0"
}
@digilord
digilord / countries.coffee
Created February 7, 2014 17:05
CoffeeScript to import a list of countries into a new Meteor project. Can be used in select elements.
Meteor.startup () ->
# Countries collection initialization.
countries_csv = Assets.getText('country.csv')
csv = Meteor.require('csv')
countries_count = Countries.find().count()
if countries_count is 0
Future = Npm.require('fibers/future')
future = new Future()
csv()
.from.string(countries_csv, {comment: '#'})
// Add a title comment so that you know what's happening and when
casper.test.comment('Development SlideSlider - Homepage');
// Setup any variables you may need. In this case we need a search term
//var search_term = "speed of an unladen swallow";
// Start casper running on a web page, in this case the awesome
// duckduckgo seach engine.
casper.start('http://io.local:3000/', function () {
processFeed = function(item, feedID, lastFeedInserted) {
console.log("last inserted: " + lastFeedInserted + " New feed: " + item.title);
Feeds.insert({
feedID: feedID,
title: item.title
});
};
Meteor.methods({
addFeeds: function() {
try {
processFeed = function(item, feedID, lastFeedInserted) {
console.log("last inserted: " + lastFeedInserted + " New feed: " + item.title);
Feeds.insert({
feedID: feedID,
title: item.title
});
};
Meteor.methods({
addFeeds: function() {
try {