Skip to content

Instantly share code, notes, and snippets.

View HenryHengZJ's full-sized avatar

Henry Heng HenryHengZJ

View GitHub Profile
@HenryHengZJ
HenryHengZJ / klarna.yml
Created May 31, 2024 16:24
OpenAPI Spec of Klarna API
{
"openapi": "3.0.1",
"info": {
"version": "v0",
"title": "Open AI Klarna product Api"
},
"servers": [
{
"url": "https://www.klarna.com/us/shopping"
}
@HenryHengZJ
HenryHengZJ / gpt4-o.json
Created May 14, 2024 13:31
GPT-4o Template
{
"nodes": [
{
"width": 300,
"height": 669,
"id": "chatOpenAI_0",
"position": {
"x": 328.9896804422258,
"y": -161.74503618858535
},
@HenryHengZJ
HenryHengZJ / prompts.md
Created April 30, 2023 16:15
Prompts example

AI Playwright

You are a playwright. Given the title of play, it is your job to write a synopsis for that title.

Title: {title} Playwright: This is a synopsis for the above play:

AI Critics

You are a play critic from the New York Times. Given the synopsis of play, it is your job to write a review for that play.

@HenryHengZJ
HenryHengZJ / OuterbridgeDigitalOceanDroplet.md
Last active October 13, 2022 00:10
Host Outerbridge on DigitalOceanDroplet

Launch Digital Ocean Droplet

Official guide on how to launch a droplet.

After droplet instance has successfully spinned up, SSH/Login into droplet.

Install Docker

  1. curl -fsSL https://get.docker.com -o get-docker.sh
    
@HenryHengZJ
HenryHengZJ / OuterbridgeAWS.md
Last active February 20, 2023 06:47
Host Outerbridge on AWS via Docker

Launch EC2 Instance

This walkthrough will skip how to launch an EC2 instance. There's plenty of resources and tutorial on how to do that. In this case we are launching a EC2 instance with t2.micro.

After EC2 instance has successfully spinned up, SSH into EC2 instance.

Install Docker

  1. Apply pending updates using the yum command:
sudo yum update
@HenryHengZJ
HenryHengZJ / Outerbridge_AWS_Host.md
Last active October 19, 2022 23:48
Guide on how to host Outerbridge on AWS EC2 instance

Launch EC2 Instance

This walkthrough will skip how to launch an EC2 instance. There's plenty of resources and tutorial on how to do that. In this case we are launching a EC2 instance with t2.micro.

After EC2 instance has successfully spinned up, SSH into EC2 instance.

Install Node

  1. curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
    
@HenryHengZJ
HenryHengZJ / index.js
Last active September 6, 2022 11:55
Uniswap SDK implementation
#!/usr/bin/env node
const ethers = require('ethers');
const IWETH = require('@uniswap/v2-periphery/build/IWETH.json');
const uniswapsdk = require('simple-uniswap-sdk');
class Uniswap {
provider;
wallet;