Skip to content

Instantly share code, notes, and snippets.

View brwnll's full-sized avatar

Dustin Brownell brwnll

  • Small Dog Studios
  • North Bend, WA
  • 12:42 (UTC -07:00)
  • X @brwnll
View GitHub Profile
@brwnll
brwnll / gist:7915142
Created December 11, 2013 17:49
Intent: Convert "day" values to Numbers, to be able to run comparison operators against the row.
// Data sample
[
{
"end": "23:00:00" ,
"day": "5" ,
"id": "003b2c9b-fdae-4112-b29b-6081ae138060" ,
"start": "16:00:00"
},
{
"end": "17:00:00" ,
@brwnll
brwnll / form_macro.php
Last active September 7, 2020 09:46
Laravel 4 form inputs for Number and Telephone
<?php
/***
* If you prefer automatic updates or using packages, this is available as a composer
* package: https://github.com/smalldogs/html5inputs
*
* Thank you to @silentcoast for the adding the support of non-valued attributes (such as `required`)
*
* This file allows you to use the other 11 HTML elements the same way as text, email, and URL.
*
* 1. Create the folder /app/misc, or use your preferred directory
@brwnll
brwnll / nfl-players-2017.json
Created August 9, 2017 04:59
NFL.com Players Scrape
[{"position":"OG","number":"72","name":"Dustin Stanton","team":"CIN","stats":{"G":"--","GS":"--"}},{"position":"DT","number":"98","name":"Brandon Thompson","team":"CIN","stats":{"TCKL":"--","SCK":"--","FF":"--","INT":"--"}},{"position":"DB","number":"41","name":"Cedric Thompson","team":"CIN","stats":{"TCKL":"--","SCK":"--","FF":"--","INT":"--"}},{"position":"DT","number":"68","name":"Josh Tupou","team":"CIN","stats":{"TCKL":"--","SCK":"--","FF":"--","INT":"--"}},{"position":"TE","number":"87","name":"C.J. Uzomah","team":"CIN","stats":{"REC":"25","YDS":"234","AVG":"9.4","TDS":"1"}},{"position":"ILB","number":"59","name":"Nick Vigil","team":"CIN","stats":{"TCKL":"21","SCK":"0.0","FF":"0","INT":"--"}},{"position":"OG","number":"63","name":"Christian Westerman","team":"CIN","stats":{"G":"0","GS":"0"}},{"position":"WR","number":"13","name":"Kermit Whitfield","team":"CIN","stats":{"REC":"--","YDS":"--","AVG":"--","TDS":"--"}},{"position":"DT","number":"69","name":"DeShawn Williams","team":"CIN","stats":{"TCKL":"2",
/**
*
* @param {Object} el - A DOM node element
* @param {String} classname - The class name to search for
*/
function findNode(el = {}, classname = '') {
if (!el.className) el.className = '';
// Class will be exact match or space seperated
const firstOfMany = classname ' ';
@brwnll
brwnll / rules.md
Last active February 29, 2024 00:11
Fantasy Football League Rules

League Constitution

  1. All rules should be based on encouraging human to human interaction

  2. There shall be no autodraft, autodraft makes drafts boring.

  3. Teams will be divided into equally sized divisions. Advancement to the playoffs will be based on ranking within the division.

  4. The payouts will be as follows:

  • Second place will get their entry fee returned.
@brwnll
brwnll / sleeper-data.json
Created December 8, 2021 22:21
A quick NodeJS parser to calculate division win/loss record for a 2 division Sleeper league
This file has been truncated, but you can view the full file.
{
"results": {
"week1": [
{
"starters_games": null,
"starters": [
"1234",
"5000",
"6813",
"1689",