Skip to content

Instantly share code, notes, and snippets.

View sammcj's full-sized avatar
🦃

Sam sammcj

🦃
View GitHub Profile
@sammcj
sammcj / rules.txt
Created January 30, 2024 21:03
ublock origin rules for theme overrides
View rules.txt
! Dracula Theme for Reddit
www.reddit.com##body:style(background-color: #282a36 !important; color: #f8f8f2 !important;)
www.reddit.com##a:style(color: #bd93f9 !important;)
www.reddit.com##a:hover:style(color: #ff79c6 !important;)
www.reddit.com##button:style(color: #ff79c6 !important; border-color: #ff79c6 !important;)
www.reddit.com##button:hover:style(color: #f8f8f2 !important;)
www.reddit.com##.icon, svg:style(fill: #ff79c6 !important;)
www.reddit.com##h1, h2, h3, p, .r51dfG6q3N-4exmkjHQg_:style(color: #f8f8f2 !important;)
www.reddit.com##div._2X6EB3ZhEeXCh1eIVA64XM, ._24UNt1hkbrZxLzs5vkvuDh:style(background-color: #313244 !important;)
www.reddit.com##.Post, ._2WUlLsFSOnLb33dNA9kf50:style(background-color: #282a36 !important;)
@sammcj
sammcj / .textgen.env
Last active December 31, 2023 15:24
Willow Speech + Local LLM + HomeAssistant
View .textgen.env
# https://github.com/oobabooga/text-generation-webui/blob/main/README.md
# https://github.com/oobabooga/text-generation-webui/blob/main/docs/Spell-book.md
# by default the Dockerfile specifies these versions: 3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6+PTX
# https://developer.nvidia.com/cuda-gpus you can find the version for your card here
# Tesla P100 = sm_60, sm_61, sm_62 and compute_60, compute_61, compute_62
# TORCH_CUDA_ARCH_LIST=6.0,6.1,6.2,7.0,7.5,8.0,8.6+PTX
# RTX3090 = sm_86 and compute_86 (PTX)
#8.6+PTX
# Tesla P100 = sm_60, sm_61, sm_62 and compute_60, compute_61, compute_62
@sammcj
sammcj / describe_image.sh
Last active November 22, 2023 19:27
describe_image.sh
View describe_image.sh
#!/bin/bash
# This script is used to describe an image using the LLM model
# It can be integrated with the Finder's "Open With" menu
# Example models: https://huggingface.co/mys/ggml_llava-v1.5-7b/tree/main
# Path to AI llama/llava tool binary
# LLAVA_BIN="${HOME}/git/llama.cpp/build/bin/llava"
LLAVA_BIN="/usr/local/bin/llava"
@sammcj
sammcj / github_repo_settings.md
Created November 20, 2022 00:36
trying out upg
View github_repo_settings.md

"typescript" "manage and configure a list of Github repositories and their settings including branch protection rules"

$ upg

    __  ______  ____ _    UPG CLI
   / / / / __ \/ __ `/    Public Beta
  / /_/ / /_/ / /_/ /
 \__,_/ .___/\__, / 🇺🇸 Built by GPT Labs
@sammcj
sammcj / operations.graphql
Created November 15, 2022 23:57 — forked from duboisf/operations.graphql
Add branch protection to a repo using GitHub's Graphql API
View operations.graphql
fragment branchProtection on BranchProtectionRule {
allowsDeletions
allowsForcePushes
creator {
login
}
id
isAdminEnforced
requiredStatusCheckContexts
requiredApprovingReviewCount
@sammcj
sammcj / Example1.json
Created November 15, 2022 12:57
Mastodon Redirects
View Example1.json
{
"appVersion" : "3.1",
"bundleID" : "io.github.mshibanami.RedirectWebForSafari",
"createdAt" : "2022-11-15T12:28:49.242Z",
"kind" : "RedirectList",
"redirects" : [
{
"comments" : "",
"destinationURLPattern" : "https:\/\/aus.social\/@$2@$1.social",
"exampleURLs" : [
View docker-compose.yaml
---
version: "3.8"
x-restart: &restart
restart: unless-stopped
services:
scrutiny:
<<: *restart
container_name: scrutiny
@sammcj
sammcj / github-actions-notes.md
Last active April 25, 2023 20:10 — forked from br3ndonland/github-actions-notes.md
Getting the Gist of GitHub Actions
View github-actions-notes.md
View uBlock_Github_copycat.txt
! https://raw.githubusercontent.com/arosh/ublacklist-github-translation/master/uBlacklist.txt
! Github fake
*://bleepcoder.com/*
*://githubja.com/*
*://*.gitmemory.com/*
*://giters.com/*
*://githubmemory.com/*
*://*.wenyanet.com/*
*://issueexplorer.com/*
*://opensourcelibs.com/*
@sammcj
sammcj / LICENSE
Created December 13, 2021 04:11 — forked from garethr/LICENSE
A script for customers to use the Snyk API to get a list of projects impacted by the Log4Shell vulnerability
View LICENSE
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit