Skip to content

Instantly share code, notes, and snippets.

View JohnnyBizzel's full-sized avatar

Johnny JohnnyBizzel

View GitHub Profile
@JohnnyBizzel
JohnnyBizzel / PokerTest.html
Created March 29, 2018 16:13
Poker hand tester for poker-comparer.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>POKER TEST</title>
<meta name="description" content="DESCRIPTION">
</head>
@JohnnyBizzel
JohnnyBizzel / poker-comparison.js
Last active March 28, 2018 00:08
Charlie's fixed poker comparer
const Result = { "win": 1, "loss": 2, "tie": 3 };
/*
High pair:
AH 8S AS KC JH
KS 8D 4D 9S 4S
Same hand:
KD 4S KC 3H 8S (marked as loss)
*/
@JohnnyBizzel
JohnnyBizzel / pygalExample.py
Created March 1, 2018 01:25
Example of a bar chart
import pygal
import os
bar = pygal.Bar()
bar.title = "Test Graph"
bar.add('Lightning', 89)
bar.add('Penguins', 76)
bar.add('Rangers', 60)
bar.add('Predators', 87)
@JohnnyBizzel
JohnnyBizzel / country-borders.json
Last active February 12, 2018 00:18
Countries with land borders (not maritime borders)
{
"nodes": [
{ "country": "East Timor", "code": "tl" },
{ "country": "Canada", "code": "ca" },
{ "country": "Turkmenistan", "code": "tm" },
{ "country": "United States of America", "code": "us" },
{ "country": "Lithuania", "code": "lt" },
{ "country": "Cambodia", "code": "kh" },
{ "country": "Ethiopia", "code": "et" },
{ "country": "Swaziland", "code": "sz" },
@JohnnyBizzel
JohnnyBizzel / tiled-img-gallery.html
Created February 5, 2018 20:55
Tiled image gallery
@JohnnyBizzel
JohnnyBizzel / d3 heatmap
Created January 24, 2018 21:30
FCC heatmap code
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<!-- <link rel="shortcut icon" type="image/x-icon" href="https://production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" />-->
<link rel="mask-icon" type="" href="https://production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" />
<title>CodePen - D3 Heat Map - Global land surface temperatures</title>
<style>
@JohnnyBizzel
JohnnyBizzel / index.html
Created September 18, 2017 01:38
Simon's Piano game
<h1>Simon Keyboard Game</h1>
<div class="user-controls">
<div class="on-off">
<button>Off</button>
</div>
<div class="scoreboard">
<span>00</span>
</div>
<div class="strict-mode">
<button>Strict Mode</button>
var Result = { "win": 1, "loss": 2, "tie": 3 }
function PokerHand(hand) {
this.hand = hand;
}
var CardValues = { "A": 14, "K": 13, "Q": 12, "J": 11, "T": 10, "9": 9,
"8": 8, "7": 7, "6": 6, "5": 5, "4": 4, "3": 3, "2": 2 }
// TODO: Rank Hand against all possible hand ranks, then compareWith
@JohnnyBizzel
JohnnyBizzel / Polldetails.js
Last active January 12, 2017 14:44
Part of Voting App
import React, { Component, PropTypes } from 'react';
import styles from '../layout/styles';
import {Doughnut} from 'react-chartjs-2';
import Api from '../../utils/ApiManager';
import Chart from 'chart.js';
import {Link} from 'react-router';
class RadioRows extends Component {
constructor(props) {
import React, { Component } from 'react';
import styles from '../layout/styles';
import {Doughnut} from 'react-chartjs-2';
import Api from '../../utils/ApiManager';
import Chart from 'chart.js';
import {Link} from 'react-router';
// class RadioRow extends Component {