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
Anchors in github markdown are created automatically when a header is created, the anchor link is the | |
header text modified to an all-lower-case string with spaces replaced with dashes. For example: | |
To link to a section with header `## This is a great section` you would create an anchor link reference | |
like this `(#this-is-a-great-section)`. | |
To create the link itself you use the standard markdown format [link-name](link-ref). To create a | |
table of contents you can repeat that for all the section headers in your document like this: | |
* [Section One](#section-one) |
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
# Generate a 256 key | |
head /dev/urandom | shasum -a 256 | |
# List supported algorithms for OpenSSL | |
openssl list-message-digest-algorithms |
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
App.MessagesRoute = Ember.Route.extend({ | |
model: function() { | |
return App.Message.find(); | |
}, | |
setupController: function(controller) { | |
controller.set('user', App.User.find(getCurrentUserId())); | |
} | |
}); | |
App.MessageRoute = Ember.Route.extend({ |
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
removeSpecialty: function(options) { | |
var userId = options.userId; | |
var toRemove = options.specialty || {}; | |
var topic = Topics.findOne({name:toRemove.name}); | |
var user = Meteor.users.findOne(userId) | |
if(!user) | |
throw new Meteor.Error("User not found") | |
if(!topic) | |
throw new Meteor.Error("Topic not found") | |
var current = _.map(user.profile.specialties, function(obj){return obj._id}) |
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
#! /usr/bin/env bash | |
# | |
# Create a folder structure for an sbt scala project with options | |
# to initialize git and eclipse plugin. | |
BUILD_SBT_FILE="./project/build.sbt" | |
GITIGNORE_FILE="./.gitignore" | |
APP_NAME=${PWD##*/} | |
DO_GIT=false | |
DO_ECLIPSE=false | |
PROJECT_PATH="." |