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
wget http://browserquest.mozilla.org/audio/music/village.mp3 | |
wget http://browserquest.mozilla.org/audio/music/beach.mp3 | |
wget http://browserquest.mozilla.org/audio/music/forest.mp3 | |
wget http://browserquest.mozilla.org/audio/music/cave.mp3 | |
wget http://browserquest.mozilla.org/audio/music/desert.mp3 | |
wget http://browserquest.mozilla.org/audio/music/lavaland.mp3 | |
wget http://browserquest.mozilla.org/audio/music/boss.mp3 | |
wget http://browserquest.mozilla.org/audio/music/village.ogg | |
wget http://browserquest.mozilla.org/audio/music/beach.ogg | |
wget http://browserquest.mozilla.org/audio/music/forest.ogg |
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
apt-get update | |
apt-get upgrade | |
apt-get install -y curl build-essential pkg-config bison git npm nodejs | |
git clone https://github.com/brynnb/BrowserQuest.git | |
npm install underscore log bison websocket websocket-server sanitizer memcache | |
cd BrowserQuest/client | |
npm install -g http-server |
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
apt-get update | |
apt-get upgrade | |
apt-get install -y curl build-essential pkg-config bison git npm nodejs | |
git clone https://github.com/browserquest/BrowserQuest.git | |
npm install underscore log bison websocket websocket-server sanitizer memcache | |
cd BrowserQuest/client | |
npm install -g http-server |
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 utils = require('./utils'), | |
glob = require('glob'), | |
async = require('async'), | |
fileLib = require("node-fs"), | |
path = require('path'), | |
_ = require('lodash'), | |
fs = require('fs'), | |
mkdirp = require('mkdirp'); | |
var basePath = process.cwd(), |
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 express = require('express'); | |
var fs = require('fs'); | |
var app = express(); | |
var bodyParser = require("body-parser"); | |
var server = require('http').Server(app); | |
var mongo = require('mongodb').MongoClient; | |
var ObjectId = require('mongodb').ObjectID; | |
var io = require('socket.io').listen(server); | |
var nodemailer = require('nodemailer'); |
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
javascript:(function(){function convertToMilliliters(value,unit){switch(unit.toLowerCase()){case 'fl oz':case 'fl. oz':return value*29.5735;case 'oz':return value*29.5735;case 'ml':return value;case 'l':return value*1000;default:console.warn(`Unrecognized unit: ${unit}`);return null;}}function parsePriceAndUnit(element){console.log('Parsing price and unit from element:', element);let priceText=element.querySelector('.a-offscreen').textContent.replace(/[^0-9.]/g,'');let match=element.textContent.match(/\/([a-zA-Z\s.]+)/);console.log(priceText,match);if(!match){console.warn('No unit match found in element:', element);return null;}let unitText=match[1].trim();return{price:parseFloat(priceText),unit:unitText};}var pricePerUnitElements=document.querySelectorAll('[class*="a-price a-text-price"]');var items=[];pricePerUnitElements.forEach(el=>{let parentContainer=el.closest('[data-component-type="s-search-result"]');if(parentContainer){let priceAndUnitParent=el.closest('.a-size-base.a-color-secondary');if(priceAndUn |