Skip to content

Instantly share code, notes, and snippets.

View jeremyjs's full-sized avatar

Jeremy Meyer jeremyjs

  • San Francisco, CA
View GitHub Profile
@jeremyjs
jeremyjs / client-test.js
Last active June 21, 2016 22:14
src/services/ticket/
// src/client/test.js
const app = require('../client/app.js');
const handleErr = require('../../src/lib/handleErr');
const waitForToken = require('../client/lib/waitForToken');
waitForToken()
.then(token => app.authenticate({ type: 'token', token }))
.then(() => app.service('tickets').find({}), handleErr('find tickets'))
.then(tickets => {
accounts-base 1.2.1 A user account system
accounts-password 1.1.3 Password support for accounts
accounts-ui 1.1.6 Simple templates to add login widgets to an app
alanning:roles 1.2.14 Authorization package for Meteor
aldeed:autoform 5.7.1 Easily create forms with automatic insert and update, and automatic reactive validation.
aldeed:collection2 2.5.0 Automatic validation of insert and update operations on the client and server.
aldeed:simple-schema 1.3.3 A simple schema validation object with reactivity. Used by collection2 and autoform.
anti:i18n 0.4.3 Internalization: simplest package
blaze-html-templates 1.0.1 Compile HTML templates into reactive UI with Meteor Blaze
ca333:bitcoinjs 1.6.0 Pure JS bitcoin library
Iddocs = new Meteor.Collection ('iddocs');
Iddocs.attachBehaviour('softRemovable');
Iddocs.helpers({
update: function (modifier) {
return Meteor.call('updateDoc', this._id, modifier);
},
approve: function () {
```
accounts-base 1.2.0 A user account system
accounts-password 1.1.1 Password support for accounts
accounts-ui 1.1.5 Simple templates to add login widgets to an app
alanning:roles 1.2.13 Role-based authorization
aldeed:autoform 5.4.1 Easily create forms with automatic insert and update, and automatic reactive validation.
aldeed:simple-schema 1.1.0* A simple schema validation object with reactivity. Used by collection2 and autoform.
anti:i18n 0.4.3 Internalization: simplest package
cfs:filesystem 0.1.2 Filesystem storage adapter for CollectionFS
cfs:s3 0.1.3 Amazon Web Services S3 storage adapter for CollectionFS
@jeremyjs
jeremyjs / publish-counts-issue-35.js
Last active August 29, 2015 14:27 — forked from boxofrox/publish-counts-issue-35.js
Reactive publish-counts with computation example
// Don't leak observes in Meteor.publish callback.
// Define only one instance for server of buyer and distributor ids for reactive counts.
var BuyerQueue = new Meteor.Collection(null);
var DistributorQueue = new Meteor.Collection(null);
function isBuyer (doc) {
return _.include(doc.roles, 'buyer');
}
if(urls[i][0]=='/' && urls[i][1]=='/' ) {
char* u1 = urls[i];
u1 += 2;
while(u1[0] != '/') {
u1++;
}
strcat(url2,u1);
}
else if(!urls[i][0]=='/') {
strcat(url2,"/");
@jeremyjs
jeremyjs / cucumber logs
Last active August 29, 2015 14:21
xolvio/meteor-cucumber/issues/114
Spawn script arguments:
parentPid: 27797
taskName: cucumber
command: meteor
commandArguments: [ 'run',
'--test-app',
'--port',
'47281',
'--include-tests',
'cucumber/fixtures',
/**
* meyer88
* $SRCFILE
*/
#include <assert.h>
#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
Verifying that +jjman505 is my Bitcoin username. You can send me #bitcoin here: https://onename.io/jjman505

CONSTANT_NAME variable_name ClassName functionName

  1. Naming things is cheap--have DESCRIPTIVE NAMES. It should read as close to natural language as possible, avoiding abbrevs. and in-house language when possible.

  2. Functions should have one thing they do. Endeavor to have pure functions, so that they do not have side effects. Functions should be have a maximum of three arguments. Good functions have one or two.

  3. Avoid being clever and implicit whenever possible.