Skip to content

Instantly share code, notes, and snippets.

View ChristopherJohnston's full-sized avatar

Chris Johnston ChristopherJohnston

View GitHub Profile
@ChristopherJohnston
ChristopherJohnston / import.ts
Created February 26, 2024 13:24
Split import from splitwise
import { getPrisma } from '@/lib/prisma'
import { Prisma } from '@prisma/client'
import { randomId, getCategories } from '@/lib/api'
import { Client } from 'pg'
import { default as csv } from 'csv-parser'
import { createReadStream } from 'fs'
async function writeData(groupName: string, currency: string, data: any) {
const prisma = await getPrisma()
@ChristopherJohnston
ChristopherJohnston / block.py
Created December 21, 2017 01:07
Example Blockchain hash calculations using Python
from hashlib import sha256
import time
import struct
import binascii
import datetime
VERSION = 1
def hexify(value, type):
return binascii.hexlify(struct.Struct(type).pack(value))

Keybase proof

I hereby claim:

  • I am christopherjohnston on github.
  • I am chris_johnston (https://keybase.io/chris_johnston) on keybase.
  • I have a public key whose fingerprint is B57F A904 610D 66B7 93DD 97F2 4135 3612 51E0 62E5

To claim this, I am signing this object: