Skip to content

Instantly share code, notes, and snippets.

View solrevdev's full-sized avatar
💭
🤓

John Smith solrevdev

💭
🤓
View GitHub Profile
@solrevdev
solrevdev / Preferences.sublime-settings
Last active October 6, 2025 12:32
Preferences.sublime-settings for sublime text 4. Changes from light/dark and includes my current font faves etc
// Settings in here override those in "Default/Preferences.sublime-settings",
// and are overridden in turn by syntax-specific settings.
{
"font_face" : "CaskaydiaCove Nerd Font",
"font_size" : 16,
"font_options" : ["ss01"],
"font_family" : "'CaskaydiaCove Nerd Font','JetBrains Mono',Monaco, 'Anonymous Pro','Liberation Mono', SFMono-Regular, Consolas, 'Dank Mono','Fira Code','Source Code Pro', Menlo, Monaco, 'Courier New', monospace",
"dark_theme": "Adaptive.sublime-theme",
"light_theme": "Adaptive.sublime-theme",
"theme": "Default.sublime-theme",
@solrevdev
solrevdev / chatgpt-prompt-gen.txt
Last active July 10, 2025 22:10
A chat gpt prompt generator
I want you to become my Prompt Creator.
Your goal is to help me craft the best possible prompt for my needs.
The prompt will be used by you, ChatGPT.
You will follow the following process:
1.
@solrevdev
solrevdev / asdf-current-ruby.sh
Created March 29, 2025 11:40
finds current asdf ruby version
#!/usr/bin/env bash
current_ruby=$(asdf current ruby | awk '{print $2}')
if [ -z "$current_ruby" ]; then
echo "Error: Could not determine current Ruby version via asdf." >&2
exit 1
else
echo "Found $current_ruby"
exit 0
@solrevdev
solrevdev / index.html
Last active October 26, 2024 20:32
Vue.js - gistpad - display local police info
<div id="app">
<h2>Police data for Oxfordshire</h2>
<p>Using data from <a href="https://data.police.uk/docs/method/crime-street/">https://data.police.uk/docs/method/crime-street/</a></p>
<p>Built using <a href="https://vuejs.org/">vue.js</a> and <a href="https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gistfs">gistpad</a></p>
<p>Dataset source <a href="https://data.police.uk/api/crimes-street/all-crime?poly=51.85110973276099,%20-1.4057047320491165:51.86298424914946,%20-1.1282999468928665:51.71262569681858,%20-1.1241800738459915:51.70241375059155,%20-1.3905985308772415:51.850261433101906,%20-1.4043314410334915">https://data.police.uk/api/crimes-street/all-crime?poly=51.85110973276099,%20-1.4057047320491165:51.86298424914946,%20-1.1282999468928665:51.71262569681858,%20-1.1241800738459915:51.70241375059155,%20-1.3905985308772415:51.850261433101906,%20-1.4043314410334915</a></p>
<p>Sample data: <a href="sample.json">sample.json</a></p>
<button @click="clearData">Clear data<
@solrevdev
solrevdev / update.ps1
Created March 6, 2024 09:55
update.ps1 - a script that i use on windows servers to keep tooling up to date
#!/usr/bin/env pwsh
Write-Output "Updates starting at $(Get-Date)"
scoop update
choco upgrade all -y
# Update .NET tools
$tools = dotnet tool list -g | Select-Object -Skip 2
foreach ($row in $tools) {
@solrevdev
solrevdev / archive-all-chatgpt-chats.js
Created December 22, 2023 09:54 — forked from aomarks/archive-all-chatgpt-chats.js
Archive all ChatGPT chats browser script
// This script will iterate over all of your ChatGPT sessions and archive them one-by-one.
//
// 1. Go to https://chat.openai.com/
// 2. Open Chrome devtools (see https://developer.chrome.com/docs/devtools/open) or equivalent in your browser
// 3. Open the console tab
// 4. Paste the code below and press enter
const pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
const history = document.querySelector('[aria-label="Chat history"]');
while (true) {
@solrevdev
solrevdev / Microsoft.PowerShell_profile.ps1
Created December 17, 2023 12:01
/Users/solrevdev/.config/powershell/Microsoft.PowerShell_profile.ps1
# https://chat.openai.com/c/1422db25-ebe5-4964-be64-0ea089c2842c
# Determine the architecture of the macOS machine
if ($env:OS -eq "Windows_NT") {
# Windows Subsystem for Linux interoperability, if needed
# Set environment variables for WSL
} else {
# Default to Intel paths
$brewPrefix = "/usr/local"
$brewCellar = "/usr/local/Cellar"
$brewRepository = "/usr/local/Homebrew"
@solrevdev
solrevdev / Microsoft.VSCode_profile.ps1
Created December 17, 2023 12:01
/Users/solrevdev/.config/powershell/Microsoft.VSCode_profile.ps1
# https://chat.openai.com/c/1422db25-ebe5-4964-be64-0ea089c2842c
# Determine the architecture of the macOS machine
if ($env:OS -eq "Windows_NT") {
# Windows Subsystem for Linux interoperability, if needed
# Set environment variables for WSL
} else {
# Default to Intel paths
$brewPrefix = "/usr/local"
$brewCellar = "/usr/local/Cellar"
$brewRepository = "/usr/local/Homebrew"
@solrevdev
solrevdev / dont-fuck-with-paste.js
Created November 14, 2023 13:07
When sites try to block you from pasting data into fields. Stop them. allow paste!
var allowPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('paste', allowPaste, true);
// see
// https://www.cyberciti.biz/linux-news/google-chrome-extension-to-removes-password-paste-blocking-on-website/
// also see
@solrevdev
solrevdev / git-update-feature-branch.md
Last active October 24, 2023 08:38 — forked from santisbon/Update-branch.md
Updating local master from remote then merge those new changes to a feature branch

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master