Skip to content

Instantly share code, notes, and snippets.

View JimRottinger's full-sized avatar

Jim Rottinger JimRottinger

View GitHub Profile
@JimRottinger
JimRottinger / server.js
Last active August 13, 2018 20:04
Booting up two node servers on different ports than can serve html or JS files
const http = require('http');
const fileSystem = require('fs');
const path = require('path');
const hostname = 'localhost';
const host_port = 8000;
const client_port = 8001;
function serveAsset(rootPath, url, res) {
// default root route to index.html in the folder
@JimRottinger
JimRottinger / example.hsreplay
Created May 21, 2018 20:28
Example hsreplay xml file
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hsreplay SYSTEM "https://hearthsim.info/hsreplay/dtd/hsreplay-1.6.dtd">
<HSReplay version="1.6">
<Game ts="11:27:02.657831">
<GameEntity id="1">
<Tag tag="202" value="1"/>
<Tag tag="49" value="1"/>
<Tag tag="53" value="1"/>
</GameEntity>
<Player id="2" playerID="1" accountHi="144115193835963207" accountLo="24163744" name="jrott#1315">
@JimRottinger
JimRottinger / hs_stats.js
Last active April 27, 2018 16:38
Random HS Game Data Generation
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'redacted',
user : 'redacted',
password : 'redacted',
database : 'redacted'
});
function randomClass() {