Skip to content

Instantly share code, notes, and snippets.

View james-see's full-sized avatar
🍀
make your own luck

JC james-see

🍀
make your own luck
View GitHub Profile
#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
@james-see
james-see / blah.txt
Created October 26, 2023 14:14
git alias for quickness
git config --global alias.rando '!sh -c "git add -A && git commit -m \"$(curl -s https://whatthecommit.com/index.txt)\" && git push"'
@aileftech
aileftech / hex-colors.txt
Created October 1, 2022 18:10
A Bash one-liner to produce a list of HEX color codes that read like (supposedly) valid English words
$ grep -P "^[ABCDEFabcdefOoIi]{6,6}$" /usr/share/dict/words | tr 'OoIi' '0011' | tr '[:lower:]' '[:upper:]' | awk '{print "#" $0}'
#ACAD1A
#B0BB1E
#DEBB1E
#AB1DED
#ACAC1A
#ACCEDE
#AC1D1C
#BAB1ED
#BA0BAB
@simonw
simonw / KeyValueStore.md
Created September 14, 2022 03:10
iPhone /MediaAnalysis/mediaanalysis.db KeyValueStore table

This is the contents of the KeyValueStore table in MediaAnalysis/mediaanalysis.db on my iPhone.

id key value
2595488 FaceAnalysisVersion 11
2595489 LatestFaceAnalysisVersionTimestamp 658412515
2595494 EmbeddingAnalysisVersion 6
2595495 LatestEmbeddingAnalysisVersionTimestamp 658412515
3025301 FaceAnalysisCompleteTimestamp 664464796
3095768 TotalTimeRunningWithoutPendingAnalysisInLatestVersion 15571
@zippy731
zippy731 / gist:fe62c6f2ca568c95cc9e5e5ddba1fd8e
Created August 26, 2022 04:58
settings for stablediffusion sidescroll demo
{
"batch_name": "StableFun",
"outdir": "/content/drive/MyDrive/AI/StableDiffusion/2022-08/StableFun/",
"save_grid": false,
"save_settings": true,
"save_samples": true,
"display_samples": true,
"n_samples": 1,
"W": 768,
"H": 512,
@bgoonz
bgoonz / resources.md
Created December 26, 2021 07:33
resources.md
@james-see
james-see / minio-flight.sh
Created November 8, 2021 05:20
mini quickstart linux
wget https://dl.minio.io/server/minio/release/linux-amd64/minio
chmod +x minio
sudo ./minio server /minio
wget https://dl.minio.io/client/mc/release/linux-amd64/mc
chmod +x mc
./mc config host add minio http://127.0.0.1:9000 Access_key Secret_key
sudo ln -s /home/jc/Downloads/mc /usr/bin/mc
sudo ln -s /home/jc/Downloads/minio /usr/bin/minio
#### create systemd minio ####
@avoidik
avoidik / README.md
Last active July 3, 2022 19:18
Run Minio as systemd service

Run Minio on Raspberry Pi using systemd

This short how-to guide covers only single-node Minio setup

Steps

Add system user

sudo mkdir -p /opt/minio/certs
@Dizolivemint
Dizolivemint / add_to_cart.user.js
Last active May 11, 2024 02:30 — forked from beporter/add_to_cart.user.js
Greasemonkey script to repeatedly refresh a given page, look for specific "Add to Cart" buttons, click them if present, and make a lot of noise on success.
// ==UserScript==
// @name Add Saved Items to Cart
// @namespace https://gist.github.com/beporter/ce76204bcba35d9edb66b395bb5e9305
// @version 0.5
// @description Repeatedly refresh a given "saved items" page (Amazon, Walmart, BestBuy), look for specific "Add to Cart" buttons, click them if present, and make a lot of noise on success.
// @author https://github.com/beporter
// @match https://www.amazon.com/gp/registry/wishlist/*
// @match https://www.amazon.com/hz/wishlist/ls/*
// @match https://www.bestbuy.com/cart
// @match https://www.bestbuy.com/site/customer/lists/manage/saveditems
@beporter
beporter / add_to_cart.user.js
Last active August 18, 2023 21:43
Greasemonkey script to repeatedly refresh a given page, look for specific "Add to Cart" buttons, click them if present, and make a lot of noise on success.
// ==UserScript==
// @name Add Saved Items to Cart
// @namespace https://gist.github.com/beporter/ce76204bcba35d9edb66b395bb5e9305
// @version 0.5
// @description Repeatedly refresh a given "saved items" page (Amazon, Walmart, BestBuy), look for specific "Add to Cart" buttons, click them if present, and make a lot of noise on success.
// @author https://github.com/beporter
// @match https://www.amazon.com/gp/registry/wishlist/*
// @match https://www.amazon.com/hz/wishlist/ls/*
// @match https://www.bestbuy.com/cart
// @match https://www.bestbuy.com/site/customer/lists/manage/saveditems