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(game, team1, team2) { | |
var percentages = { | |
round5: { 1: 100, 2: 94, 3: 85, 4: 78, 5: 68, 6: 66, 7: 60, 8: 48, 9: 52, 10: 40, 11: 34, 12: 35, 13: 22, 14: 15, 15: 6, 16: 0 }, | |
round4: { 1: 87, 2: 69, 3: 61, 4: 56, 5: 52, 6: 51, 7: 27, 8: 18, 9: 8, 10: 46, 11: 38, 12: 49, 13: 24, 14: 12, 15: 14, 16: 0 }, | |
round3: { 1: 79, 2: 72, 3: 50, 4: 35, 5: 21, 6: 33, 7: 37, 8: 70, 9: 40, 10: 33, 11: 33, 12: 5, 13: 0, 14: 0, 15: 0, 16: 0 }, | |
round2: { 1: 59, 2: 46, 3: 47, 4: 72, 5: 75, 6: 23, 7: 0, 8: 57, 9: 50, 10: 0, 11: 60, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0 }, | |
round1: { 1: 57, 2: 48, 3: 64, 4: 23, 5: 50, 6: 67, 7: 0, 8: 50, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0 }, | |
round0: { 1: 67, 2: 33, 3: 44, 4: 33, 5: 0, 6: 50, 7: 0, 8: 50, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 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
var request = require('request'); | |
var sendgrid = require('sendgrid')('YOUR sendgrid.com USERNAME', 'password'); | |
var areaCode = 972; | |
var headers = { Cookie: 'YOUR www.google.com COOKIE HERE' }; | |
var url = 'https://www.google.com/voice/setup/searchnew/?ac=' + areaCode + '&start=0&country=US'; | |
request.get({ url: url, headers: headers }, function(error, response, body) { | |
var json = JSON.parse(body); | |
var message = 'Google Voice: There are ' + json.JSON.num_matches + ' numbers in area code ' + areaCode + ' available at this time.'; |
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 redis = require('redis'); | |
function Cache(port, host, options) { | |
this.client = redis.createClient(port, host, options); | |
}; | |
// Returns data from cache if available; | |
// otherwise executes the specified function and places the results in cache before returning the data. | |
Cache.prototype.fetch = function(key, func, options, callback) { | |
// Options are optional |
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
const mcapi = require('mailchimp-api'); | |
const mailchimp = new mcapi.Mailchimp(process.env.mailchimpApiKey); | |
const mailchimpListId = process.env.mailchimpListId; | |
var subscribe = { | |
double_optin: false, | |
email: { email: 'test@mediocre.com' }, | |
id: mailchimpListId | |
}; |
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
{ | |
"deal": { | |
"features": "- Model: S003AP, ACB0BU\r\n- Steer the little ball with your phone, it's fun, really\r\n- Compatible with iOS or Android, despite Apple-centric packaging\r\n- Includes Nubby Cover for all-terrain spherical action\r\n- Augmented-reality game apps might be more fun than rolling Sphero around your non-augmented reality, but we're not promising anything on that point", | |
"id": "a6ki0000000TON3AAO", | |
"items": [ | |
{ | |
"attributes": [ | |
], | |
"condition": "Refurbished", |
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(game, team1, team2) { | |
var percentages = { | |
round5: { 1: 100, 2: 94, 3: 85, 4: 78, 5: 68, 6: 66, 7: 60, 8: 48, 9: 52, 10: 40, 11: 34, 12: 35, 13: 22, 14: 15, 15: 6, 16: 0 }, | |
round4: { 1: 87, 2: 69, 3: 61, 4: 56, 5: 52, 6: 51, 7: 27, 8: 18, 9: 8, 10: 46, 11: 38, 12: 49, 13: 24, 14: 12, 15: 14, 16: 0 }, | |
round3: { 1: 79, 2: 72, 3: 50, 4: 35, 5: 21, 6: 33, 7: 37, 8: 70, 9: 40, 10: 33, 11: 33, 12: 5, 13: 0, 14: 0, 15: 0, 16: 0 }, | |
round2: { 1: 59, 2: 46, 3: 47, 4: 72, 5: 75, 6: 23, 7: 0, 8: 57, 9: 50, 10: 0, 11: 60, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0 }, | |
round1: { 1: 57, 2: 48, 3: 64, 4: 23, 5: 50, 6: 67, 7: 0, 8: 50, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0 }, | |
round0: { 1: 67, 2: 33, 3: 44, 4: 33, 5: 0, 6: 50, 7: 0, 8: 50, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<appSettings> | |
</appSettings> | |
<system.web> | |
<customErrors mode="off" /> | |
<httpRuntime maxQueryStringLength="2097151" maxUrlLength="2097151" /> | |
</system.web> | |
<system.webServer> | |
<modules runAllManagedModulesForAllRequests="false" /> |
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 Campfire = require('campfire').Campfire; | |
var request = require('request'); | |
var areaCode = 972; | |
var campfire = new Campfire({ ssl: true, token: 'YOUR CAMPFIRE API TOKEN HERE', account: 'YOUR CAMPFIRE SUBDOMAIN NAME HERE' }); | |
var headers = { Cookie: 'YOUR www.google.com COOKIE HERE' }; | |
var url = 'https://www.google.com/voice/setup/searchnew/?ac=' + areaCode + '&start=0&country=US'; | |
request.get({ url: url, headers: headers }, function(error, response, body) { | |
var json = JSON.parse(body); |
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
[ | |
{ | |
"id": "logical-trustworthy-glass", | |
"username": "shawn", | |
"offer": "2-pack-restorology-genius-pillow-cooling-gel-fiber-pillow-with-sateen-gusset-1", | |
"total": 29.00 | |
}, | |
{ | |
"id": "distinguished-amusing-honeydew", | |
"username": "dave", |
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
# This is for Mac computers with Intel processors | |
# For Mac computers with Apple silicon (https://support.apple.com/en-us/HT211814) see https://gist.github.com/freshlogic/fa3dcc44eedd36b4602d541ccd5b4368 | |
# Homebrew | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
brew update | |
# MongoDB | |
brew tap mongodb/brew | |
brew install mongodb-community@4.0 |