Skip to content

Instantly share code, notes, and snippets.

View LeoBakerHytch's full-sized avatar

Leo Baker-Hytch LeoBakerHytch

View GitHub Profile

Keybase proof

I hereby claim:

  • I am leobakerhytch on github.
  • I am ltobh (https://keybase.io/ltobh) on keybase.
  • I have a public key ASAgmK-ws23XAkypJmmeoQUAlcHyGCJ4fmQh_jzpyk1BHwo

To claim this, I am signing this object:

import * as denv from 'ts-dotenv';
import fs from 'fs';
describe('.env loading', () => {
it('has a .env', () => {
expect(fs.existsSync('.env')).toBe(true); //succeeds
console.log(fs.readFileSync('.env','utf-8')) //api_key=123456
});
it('loads .env', () => {
const env = denv.load({ api_key: String });
@LeoBakerHytch
LeoBakerHytch / chatgpt_parser_md.py
Created December 5, 2022 21:34 — forked from thomasantony/chatgpt_parser_md.py
Convert saved HTML transcripts from ChatGPT to Markdown
# Save the transcripts using the "Save Page WE" Chrome Extension
# This script was generated by ChatGPT
import sys
from bs4 import BeautifulSoup
# Check if a file was provided as a command line argument
if len(sys.argv) < 2:
print("Please provide an HTML file as a command line argument.")
sys.exit(1)

Keybase proof

I hereby claim:

  • I am leobakerhytch on github.
  • I am leobakerhytch (https://keybase.io/leobakerhytch) on keybase.
  • I have a public key ASDQJ9OAb8N0QVt4hDVXbfkq-UJGgBxA7XrBDf71G7LMTgo

To claim this, I am signing this object:

@LeoBakerHytch
LeoBakerHytch / README.md
Last active February 12, 2017 18:09 — forked from relekang/README.md
Stylebot stylesheet for wikipedia.org

Makes wikipedia look like this

Wikipedia

Navigation sidebar & table of contents fade in on hover

Uses the following typefaces:

const lodashScript = document.createElement('script');
lodashScript.src = 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.js';
lodashScript.type = 'text/javascript';
document.head.appendChild(lodashScript);
@LeoBakerHytch
LeoBakerHytch / README.md
Last active December 24, 2016 01:08 — forked from denvazh/README.md
Scheduled update for homebrew

Scheduled updates for homebrew

This two launchdaemon scripts provide scheduled updates and upgrade for homebrew packages.

It will run in the following way:

  • brew update every day at 13:15
  • brew upgrade every day at 13:30

How to install

@LeoBakerHytch
LeoBakerHytch / workspace
Last active July 9, 2016 13:46 — forked from scottsb/casesafe.sh
Create and manage a case-sensitive disk-image on OSX.
#!/bin/bash
# ---------------------------------------------------------
# Customizable Settings
# ---------------------------------------------------------
# where to store the sparse-image
WORKSPACE=${HOME}/.Development.dmg.sparseimage
# location where workspace will be mounted