Skip to content

Instantly share code, notes, and snippets.

View 0xBigBoss's full-sized avatar
🤠

Big Boss 0xBigBoss

🤠
View GitHub Profile
@0xBigBoss
0xBigBoss / erc-4337-deposit-to-entrypoint.ts
Created December 29, 2023 20:29
ERC-4337 Account abstraction sponsor a transactions by setting the deposit on the Entry Point
// sponsor the creation by setting the deposit on the Entry Point
const { request: depositRequest } = await baseMainnetClient.simulateContract({
address: entrypoint.address,
functionName: 'depositTo',
abi: iEntryPointABI,
args: [senderAddress],
account: dummyAccount,
value: parseEther('0.5'),
})
const depositHash = await walletClient.writeContract(depositRequest)
@0xBigBoss
0xBigBoss / webauthn-signature-verifier.ts
Created December 29, 2023 15:27
Verify a digital signature using ECDSA and Web Crypto API
export async function verifySignature({
authenticatorData,
clientDataJSON,
r,
s,
x,
y,
}: {
authenticatorData: string
clientDataJSON: string
@0xBigBoss
0xBigBoss / gh-org-contribs
Last active October 25, 2023 18:07
ZX script to fetch all contributors to an organization public repos.
#!/usr/bin/env zx
// -*- mode: js -*-
const orgName = process.argv[3];
if (!orgName) {
console.log(`Usage: gh-org-contribs ${chalk.bold("<org-name>")}`);
process.exit(1);
}
@0xBigBoss
0xBigBoss / docker_context_analyze.sh
Created October 13, 2023 03:30
Analyze a docker context and what files would be included in your docker image. Creates a directory at /tmp/docker-context.
printf 'FROM scratch\nCOPY . /' | DOCKER_BUILDKIT=1 docker build -f - -o /tmp/docker-context .
@0xBigBoss
0xBigBoss / upgrade.zx.md
Last active July 29, 2023 22:25
Pocket Network v1 Upgrade Feature e2e

Upgrade Feature e2e

You need to have zx installed before executing this file.

npm install -g zx
zx upgrade.zx.md

Ensure ACL Owner is imported

➤ YN0000: built @my/ui in 4528 ms
➤ YN0000: Done in 5s 16ms
- info Loaded env from /Users/0xbigboss/send/send-distributions-app/apps/next/.env.local
- info Loaded env from /Users/0xbigboss/send/send-distributions-app/apps/next/.env
Welcome to Tamagui!
You can update this monorepo to the latest Tamagui release just by running:
@0xBigBoss
0xBigBoss / draft.md
Created June 30, 2023 03:29
[E2E Feature Flags] Onchain Feature Flags

Objective

Implementing F. E2E Feature Flags 🔴

  1. Adding New Feature 🔴
  2. Enabling Feature 🔴
  3. Disabling Feature 🔴
  4. Modifying Feature Value 🔴

Origin Document

@0xBigBoss
0xBigBoss / gencert.sh
Last active June 21, 2023 20:45
Generate a local self-signed certificate for example.com and *.example.com.
#!/bin/bash
# Set the domain name
domain="example.com"
wildcard_domain="*.example.com"
# Check if the certificate and key files already exist
if [[ -f "${domain}.crt" && -f "${domain}.key" ]]; then
echo "Certificate and key files already exist. Exiting..."
exit 0
@0xBigBoss
0xBigBoss / k8s_dash
Last active June 13, 2023 18:50
Installs and opens the Kubernetes dashboard using the recommended Quickstart settings.
#!/bin/bash
# Function to check if Kubernetes Dashboard is installed
function is_dashboard_installed {
kubectl get services --namespace=kubernetes-dashboard | grep kubernetes-dashboard >/dev/null 2>&1
return $?
}
# Function to check if Service Account and ClusterRoleBinding are installed
function is_user_installed {
@0xBigBoss
0xBigBoss / analyze_docker_context.sh
Created May 27, 2023 04:14
analyze dockerignore in current directory
printf 'FROM scratch\nCOPY . /' | DOCKER_BUILDKIT=1 docker build -f - -o /tmp/docker-context .