Skip to content

Instantly share code, notes, and snippets.

View mharris717's full-sized avatar

Mike Harris mharris717

View GitHub Profile
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<!-- saved from url=(0052)https://www.espn.com/nba/boxscore/_/gameId/401585418 -->
<html lang="en" data-react-helmet="lang">
<head class="at-element-marker">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script
async=""
src="./Grizzlies 113-110 Bucks (Feb 15, 2024) Box Score - ESPN_files/P31187EE2-AC6E-46CB-BB54-D07591BED067.js"
></script>
<style type="text/css" class="bc-style-j8Fbje7Qq-default">
from textual.app import App
from textual.reactive import reactive
from textual.widget import Widget
from textual.widgets import Footer, Header, Input, Label, ListItem, ListView, Static
"""
My naive expectation was that, when I update Numbers#term, the ListView would
re-render. But it doesn't.
I am almost positive I understand why. If term was used in a render method, it would smart refresh.
@mharris717
mharris717 / schema.json
Created March 27, 2023 15:50
subset.json
{
"components": {
"parameters": {
"owner": {
"name": "owner",
"description": "The account owner of the repository. The name is not case sensitive.",
"in": "path",
"required": true,
"schema": {
"type": "string"
export const NUM_BOARDS = 16;
export const NUM_GUESSES = 21;
export const START_DATE = (() => {
// Use this method so that the start date is offset by current timezone offset
// Old method had problems with the start date being before DST
const utcDate = new Date("2022-02-14T00:00:00Z").getTime();
const offset = new Date().getTimezoneOffset();
return new Date(utcDate + offset * 60 * 1000);
@mharris717
mharris717 / _tour.md
Last active August 2, 2021 15:35
DX-4084 Secondary Insurance
{
"openapi": "3.0.1",
"info": {
"title": "API for modeling Orgs, Projects, and Users",
"description": "",
"version": "0.0.1"
},
"servers": [
{
"url": "https://api.liveramp.com/orgs"
@mharris717
mharris717 / child_type.js
Created April 24, 2019 15:43
Change child type on parent data changes
/* global describe, it, beforeEach */
import expect from "expect";
import { create } from "../src/microstates";
function isStateType(obj, T) {
return obj.constructor.name === `Microstate<${T}>`;
}
function withInitBehavior(T, f) {
@mharris717
mharris717 / fetch.test.js
Last active March 21, 2019 15:06
Instance Fetch
/* global describe, it, beforeEach */
import expect from "expect";
import Identity from "../src/identity";
import { create } from "../src/microstates";
import { TodoMVC } from "./todomvc";
import Promise from "bluebird";
export default class FetchAttr {
1 Caligo Skin-Witch
1 Knight of Malice
1 Sporecrown Thallid
1 Yavimaya Sapherd
1 Baloth Gorger
1 Kwende, Pride of Femeref
2 Academy Journeymage
1 Cloudreader Sphinx
1 Muldrotha, the Gravetide
1 Fungal Infection
@mharris717
mharris717 / is_this_evil.rb
Created August 9, 2018 20:41
React Microstates Waaaaat
import React from "react";
import { Consumer } from "@microstates/react";
import { map } from "microstates";
export default class Blog extends React.Component {
render() {
return (
<Consumer>
{blog => {
return (