Skip to content

Instantly share code, notes, and snippets.

// Menu: workspace-boilerplate
import '@johnlindquist/kit';
// "home" is a method that wraps `path.resolve` based on your home directory
// inspect(home('dev'));
let project = await arg('project name');
let projectDir = home('dev', project);
mkdir(projectDir);
mkdir(projectDir + '/packages');
// Menu: react component
import '@johnlindquist/kit';
// "home" is a method that wraps `path.resolve` based on your home directory
// inspect(home('dev'));
let project = await arg('dir');
let name = await arg('name');
let filePath = home('dev', project + `/src/components/`, name);
// writes a file to the filePath using `fs-extra's` "outputFile"
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
"console.log snippet": {
"scope": "javascript,typescript",
@bronifty
bronifty / .gitattributes
Created November 12, 2022 20:33
.gitattributes for git lfs
# text
*.csv filter=lfs diff=lfs merge=lfs -text
*.xlsx filter=lfs diff=lfs merge=lfs -text
*.docx filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
# images
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
@bronifty
bronifty / multipartupload.py
Created November 13, 2022 02:03
aws boto3 multipart upload python script
import argparse
import boto3
import json
import multiprocessing
# Starts Multipart Upload
def start_upload(bucket, key):
s3_client = boto3.client('s3')
response = s3_client.create_multipart_upload(
@bronifty
bronifty / Makefile
Created December 26, 2022 18:34
Makefile to run MySQL in Docker and populate a products table
#.PHONY: refers to a target that is not a file
.PHONY: all mysql sleep populate show
#all: signifies everything that will run when you run make
all: mysql sleep populate show
mysql:
docker run -d -p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=password \
-e MYSQL_USER=user \
-e MYSQL_PASSWORD=password \
@bronifty
bronifty / shebang
Last active September 1, 2023 15:33
#!/bin/bash
apt-get update
apt-get install unzip
ssh-keygen -t rsa -f /root/.ssh/id_rsa -N '' -q
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256"
echo "$(cat kubectl.sha256) kubectl" | sha256sum --check
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
curl -fsS https://packages.fluvio.io/v1/install.sh | bash
aws s3 ls s3://bronifty.xyz.target/ --recursive | awk '{print $4}' | xargs -I {} aws s3 rm s3://bronifty.xyz.target/{}
@bronifty
bronifty / index.ts
Created August 5, 2023 00:01 — forked from trvswgnr/SyncService.test.ts
daxxer challenge 2
class SyncService {
private processing = false;
constructor(
private bService: IBService,
private monitorService: IMonitorService,
private logService: ILogService,
private userCache: ICacheService<UserId>,
private idempotencyKeys: ICacheService<EventId>,
private queue: IQueueService<EventFromA>,
@bronifty
bronifty / aws_config
Last active October 2, 2023 16:05
aws configure sso
[default]
sso_session = wing
sso_account_id = 644023290801
sso_role_name = AdministratorAccess
region = us-east-1
output = json
[sso-session wing]
sso_start_url = https://d-9a670195a1.awsapps.com/start#
sso_region = us-east-2
sso_registration_scopes = sso:account:access