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
#!/bin/bash | |
set -e | |
CURRENT_NAME="WatchParty" | |
CURRENT_OTP="watch-party" | |
NEW_NAME="Chat" | |
NEW_OTP="chat" |
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
{ | |
"name": "permissions-api", | |
"common": { | |
"container": { | |
"environment": { | |
"NODE_ENV": "development", | |
"MONGO_URI": "mongo", | |
"PERMISSIONS_SERVICES": "[\"https://monsters-local.kuali.co/api/v0/cm/permissions\"]", | |
"SERVICE_SECRET": "4439ew8uf23weausdfljho4iuweahfs7023das" | |
} |
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
#!/bin/sh | |
# | |
# Place in `.git/hooks/pre-commit` | |
# Make it executable: `chmod +x .git/hooks/pre-commit` | |
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep "\(.js\)\{1\}$") | |
if [[ "$STAGED_FILES" = "" ]]; then | |
echo "\nNo JS files to format.\n" | |
exit 0 |
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
import mongoose, {Schema} from 'mongoose' | |
export const ServiceSchema = new Schema({ | |
displayName: {type: String, required: true, unique: true} | |
}) | |
ServiceSchema.set('toObject', { | |
transform: function (doc, ret) { | |
ret.id = ret._id | |
delete ret._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
sample_data = [0, 1, 100, 99, 0, 10, 90, 30, 55, 33, 55, 75, 51, 49, 50, 51, 49, 51] | |
sample_output = [[1,99], [0,100], [10,90], [51,49], [50,50]] | |
var results = []; | |
for (var i = 0; i < sample_data.length; i++) { | |
for (var j = i + 1; j < sample_data.length; j++) { | |
if (sample_data[i] + sample_data[j] == 100) { | |
var combo = sample_data[i] | |
if (results.indexOf(sample_data[i]) == -1 && results.indexOf(100 - sample_data[i]) == -1) { | |
results.push(combo); |
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
var url = require('url'); | |
var request = require('request'); | |
var options = { | |
url: 'http://letsrevolutionizetesting.com/challenge', | |
headers: { | |
'Accept': 'application/json' | |
} | |
}; |
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
function awesome(param) { | |
// do something with the param | |
} | |
awesome(); |
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
angular.module('app', []) | |
.factory('MyFactory', [function () { | |
// something factory-like | |
}]) |