Skip to content

Instantly share code, notes, and snippets.

Date Time Street Address Neighborhood Age Gender Race Name Cause
1/1/2009 2:15 a.m. 100 N. Green St. Near West Side 47 Male Black David Garrett Gunshot
1/3/2009 4:44 a.m. 11300 S. Racine Ave. Morgan Park 34 Male Black Jojuan Miller Gunshot
1/3/2009 5:13 p.m. 2100 E. 68th St. South Shore 40 Male Black Famous Ware Gunshot
1/5/2009 9200 S. Dobson Ave. Burnside 20 Male Black Xavier Lawrence Gunshot
1/8/2009 3:35 p.m. 5900 S. Springfield Ave. West Lawn 18 Male White David Hresil Gunshot
1/10/2009 8:46 p.m. 5000 S. Wabash Ave. Grand Boulevard 28 Male Black Aaron Blanton Gunshot
1/11/2009 1:05 a.m. 8900 S. Halsted St. Washington Heights 34 Male Black Tracy Barnard Hughes Gunshot
1/13/2009 2:01 a.m. 6500 S. Western Ave. Chicago Lawn 21 Male Black Ronnie L. Gibbs Gunshot
1/17/2009 2:23 a.m. 6200 S. Sacramento Ave. Chicago Lawn 19 Male Black Greg Bryant Stabbing
@tgrecojs
tgrecojs / monads.js
Last active February 16, 2023 04:15
common group of ADTs
const Reducer = run => ({
run,
concat: other => Reducer((acc, x) => other.run(run(acc, x), x)),
contramap: f => Reducer((acc, x) => run(acc, f(x))),
map: f => Reducer((acc, x) => f(run(acc, x)))
});
const Id = x => ({
map: f => Id(f(x)),
chain: f => f(x),
import { assert } from './util'
const compose = (...fns) => x => fns.reduceRight((y, f) => f(y), x);
// const { proxy: accountProxy, revoke: revokeAccount } = Proxy.revocable(objProto, {});
// Reflect.get(accountProxy, 'balance')
// objProto.deposit(10000)
// Reflect.get(accountProxy,'balance')
@tgrecojs
tgrecojs / intro.md
Last active January 11, 2023 00:26
riteway testing with agoric

Riteway test wrapper

  • Utility lib for using the riteway testing library with agoric.

Explicit test failure messages

  • forces you to write tests cases the "rite" way:
    • Readable
    • Integrated
    • Thorough
    • Explicit,
@tgrecojs
tgrecojs / contract.js
Created December 2, 2022 01:35
zoe fungible faucet contract
// @ts-check
/* global harden */
import '@agoric/zoe/exported.js';
import { AmountMath } from '@agoric/ertp';
import { assert } from '@agoric/assert';
import { Far } from '@endo/marshal';
import { assertIssuerKeywords, swap } from '@agoric/zoe/src/contractSupport';
/**
* This is a very simple contract that creates a new issuer and mints payments
(function(){
const url = top._CVE_URL;
alert(`this message originated in a script that was successfully fetched from "${url}" [even though "${top.location.hostname}"'s Content Security Policy may not allow it!] (CVE-2020-6519)`);
}())

Inter Protocol Digrams

vaultInstance overview

flowchart TD
        %%{ init: { 'flowchart': { 'curve': 'monotoneY' } } }%%

subgraph vaultFactory[Vault Factory]
    direction BT
    vfT1[The vaultFactory owns a number of VaultManagers and a mint for Minted] ---> vfT2
    vfT2[vaultFactory is a 'Vault Director Machine'  <br/> <br /> - it creates the vaultDirector  </br> - vaultDirector is root user] --> vfT3

Keybase proof

I hereby claim:

  • I am tgrecojs on github.
  • I am tgrex (https://keybase.io/tgrex) on keybase.
  • I have a public key ASA5uPWzWkk7TmfvtMAuxDOTC_VyWc3hNLybADS0Hgyyawo

To claim this, I am signing this object:

const Either = (() => {
const Right = x => ({
chain: f => f(x),
ap: other => other.map(x),
alt: other => Right(x),
extend: f => f(Right(x)),
concat: other =>
other.fold(
x => other,
y => Right(x.concat(y)),