Skip to content

Instantly share code, notes, and snippets.

View mokolodi1's full-sized avatar

Teo Fleming mokolodi1

  • Amazon
  • Santa Monica, CA
  • 03:00 (UTC -07:00)
View GitHub Profile
@mokolodi1
mokolodi1 / SimpleSchema-example.js
Created August 20, 2015 23:30
SimpleSchema cheat sheet
var schemaName = new SimpleSchema({
"first_field": {
type: String|Number|Boolean|[Object],
label: "First field",
optional: true,
custom: function () {
if (Meteor.isClient && this.isSet) {
Meteor.call("accountsIsUsernameAvailable", this.value, function (error, result) {
if (!result) {
Meteor.users.simpleSchema().namedContext("createUserForm").addInvalidKeys([{name: "username", type: "notUnique"}]);
@mokolodi1
mokolodi1 / pull_to_development.sh
Created October 2, 2015 00:10
Pulls in changes from a feature branch to development
# $1 is the branch name
git push origin $1
git checkout development
git pull --rebase origin $1
# installation
cd webapp
starrynight scaffold --framework nightwatch
starrynight generate --autoconfig
# running
# http://nightwatchjs.org/api
# http://starrynight.meteor.com/testing
starrynight run-tests --framework nightwatch
{
"type" : "mutation",
"algorithm" : "wekamine",
"signature_slug": "LUAD_KEAP1_NonSilent",
"label" : "KEAP1 non-silent mutation",
"gene_label" : "KEAP1",
"input_data_normalization": "quantile_normalized_counts",
"input_data_type": "microarray",
"training_set": "TCGA LUAD expression non-silent tumors vs. silent tumors",
"sample_values" : [
# show all jobs with command
ps -ef
# create symbolic link
ln -s /path/somewhere name_in_this_folder
@mokolodi1
mokolodi1 / GeneExpression.js
Last active November 21, 2015 01:49
a working schema for GeneExpression
GeneExpression = new Meteor.Collection("gene_expression");
Expression2 = new Meteor.Collection("expression2");
var normalValue = {
type: Number,
decimal: true,
optional: true,
};
GeneExpression.attachSchema(new SimpleSchema({
IsoformExpression = new Meteor.Collection("isoform_expression");
// ExpressionIsoform = new Meteor.Collection("expression_isoform");
var normalValue = {
type: Number,
decimal: true,
optional: true,
min: 0,
};
SampleGroups = new Meteor.Collection("sample_groups");
var sampleSchema = new SimpleSchema({
study_label: { type: String },
sample_label: { type: String },
patient_label: { type: String, optional: true },
});
SampleGroups.attachSchema(new SimpleSchema({
user_id: { type: String },
| Command | Description |
|---------|-------------|
| `w` | Shows currently logged in user |
| `write username TTYport` | Write to another person's terminal |
// publish users that are in the specified collaborations
Meteor.publish("usersInCollaborations", function (collaborations) {
// grab the associated collaborators (personal and otherwise) for all collaborations
let combinedCollabs = _.reduce(collaborations, (memo, name) => {
// grab the collaboration
let collab = Collaborations.findOne({ name });
// get the collaborators and add them to the working list
memo.concat(concat.getAssociatedCollaborators());