This file contains hidden or 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
| sudo mkdir /var/run/couchdb && sudo couchdb -b -A /etc/couchdb/ |
This file contains hidden or 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
| <!DOCTYPE HTML> | |
| <head> | |
| <link href='http://fonts.googleapis.com/css?family=Old+Standard+TT:400,700' rel='stylesheet' type='text/css'> | |
| <style> | |
| body { | |
| font-family: 'Old Standard TT', serif; | |
| } | |
| h1, | |
| h2, |
This file contains hidden or 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
| #!/bin/bash | |
| melt $1 -filter volume:"normalise" -consumer xml:$1.mlt video_off=1 all=1 | |
| melt $1.mlt -consumer avformat:$1-normalized.mp4 properties=MPEG-4 |
This file contains hidden or 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
| ol {counter-reset: item; list-style-type: none;} | |
| ol li:before {font-weight: bold; content: 'Case ' counter(item, decimal) ': '; counter-increment: item;} |
This file contains hidden or 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
| #!/bin/bash | |
| couchapp generate $1 | |
| cd $1/_attachments | |
| rm -Rf script/ style/ | |
| rm index.html | |
| wget https://github.com/angular/angular-seed/archive/master.zip | |
| unzip master.zip | |
| mv angular-seed-master/app/* . | |
| mv angular-seed-master/bower.json .. | |
| rm -Rf master.zip angular-seed-master/ |
This file contains hidden or 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
| function createDefaultRoles() { | |
| defaultRoles = ['admin', 'researcher']; | |
| defaultRoles.forEach(function(roleName) { | |
| if (!Meteor.roles.findOne({ | |
| name: roleName | |
| })) { | |
| Roles.createRole(roleName); | |
| } | |
| }); | |
| } |
This file contains hidden or 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
| Accounts.onLogin(function (users) { | |
| /* if there's only one user, add that user to admin group */ | |
| if (Meteor.users.find().count() === 1) { | |
| Roles.addUsersToRoles(users.user._id, ['admin']); | |
| } | |
| }); |
This file contains hidden or 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
| function remindToFloss() { | |
| var ss = SpreadsheetApp.openById("INSERT SHEET ID HERE"); | |
| var responses = ss.getSheets()[0].getDataRange(); | |
| var participants = ss.getSheets()[1].getDataRange(); | |
| var needsNotifying = []; | |
| // Compile a list of email addresses that may need notifications | |
| for (var i = 0; i <= participants.getNumRows() - 1; i++) { | |
| var email = participants.getValues()[i][0]; |
This file contains hidden or 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
| #!/bin/sh | |
| mkdir -p client/compatibility client/styles client/lib client/views client/views/common lib server/lib public/images public/fonts .meteor | |
| echo "local" > .meteor/gitignore | |
| echo "meteor-platform\nautopublish\ninsecure\naccounts-base" > .meteor/packages | |
| echo "METEOR@0.9.2.1" > .meteor/release | |
| echo "Router.configure({layoutTemplate: 'layout'}); Router.map(function() {this.route('home', {path: '/', template: 'home'});});" > client/routes.js | |
| echo "<head><title>My App</title><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"></head><body></body><template name=\"layout\">{{>navbar}}<div class=\"container-fluid\">{{>yield}} </div></template>" > client/views/common/layout.html | |
| echo "<template name=\"navbar\"><nav class=\"navbar navbar-default\" role=\"navigation\"><div class=\"container-fluid\"><div class=\"navbar-header\"><button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\"\#bs-example-navbar- |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="http://simplewebrtc.com/latest.js"></script> | |
| </head> | |
| <body> | |
| <video height="300" id="localVideo"></video> | |
| <div id="remotesVideos"></div> | |
| <script> | |
| var webrtc = new SimpleWebRTC({ |