Skip to content

Instantly share code, notes, and snippets.

View servel333's full-sized avatar

Nathaniel Perry servel333

View GitHub Profile
@servel333
servel333 / Chat_Reflection_and_Actionable_Insights_prompt.md
Last active April 28, 2024 04:35
Conversation Summary and Development Insights ChatGPT Prompt

Conversation Analysis Prompt

Description

This document contains a prompt designed to be used at the end of a conversation to help summarize the discussion, reflect on the personal writing style, and identify actionable steps. It is intended to facilitate a deeper understanding and continuity between conversations, supporting personal reflection or professional development. This prompt ensures comprehensive feedback that encompasses all important aspects of the conversation and can be referred to in future interactions.

Prompt

Use the following prompt at the conclusion of any discussion to gather a structured and useful summary:

@servel333
servel333 / regex-increment-number.sh
Last active April 27, 2024 06:53
Regex to increment a number in text.
#!/bin/sh
# Regex to increment a number in text.
# Source: https://stackoverflow.com/a/31599758/761771
echo " 0 1 2 3 7 8 9 10 19 99 109 199 909 999 1099 1909" |
perl -pe 's/\b([0-9]+)\b/0$1~01234567890/g' |
perl -pe 's/\b0(?!9*~)|([0-9])(?=9*~[0-9]*?\1([0-9]))|~[0-9]*/$2/g'
# Output > 1 2 3 4 8 9 10 11 20 100 110 200 910 1000 1100 1910
@servel333
servel333 / regress_beat_saber_installed_version.bat
Last active April 13, 2024 12:38
Downloads older versions of Beat Saber through Steam and can backup and overwrite the installed version.
@echo off
setlocal
:: Downloads older versions of Beat Saber through Steam and can backup and overwrite the installed version.
:: #### Configuration #### -------------------------------------------------------------------------
set "username=natep"
:: if BACKUP_DIRECTORY is not set it will default to a path. See LOAD DEFAULTS.
@servel333
servel333 / LOGnotes.md
Last active December 4, 2022 05:10
Legend of Grimrock console command reference and notes
@servel333
servel333 / Steam-Deck-notes.md
Last active September 9, 2022 00:42
Steam Deck notes and information
@servel333
servel333 / GUIDE.MD
Last active December 22, 2020 16:33
API Query String Parameter Style Guide

Motivation

There is no clear standard (or this is a "yet another"?) for formatting query string parameters for various applications in an API.

Problems

Specify model attributes to filter on

  • &attribute[ATTRIBUTE-NAME]=ATTRIBUTE-VALUE

Specify model attributes to filter on with operators

  • Operators: greater than, greater than or equal, less than, less than or equal, in, etc...
@servel333
servel333 / runnable.js
Last active October 8, 2021 16:31
JavaScript one-liners and simple blocks, and some bash
#!/usr/bin/env node
/* eslint-disable no-alert */
/* eslint-disable no-console */
const allParams = process.argv.slice(2).join(' ');
const relativeDir = require('path').resolve(__dirname, '../some/path');
const thisScript = require('path').basename(__filename);
@servel333
servel333 / handlebars-operators.md
Created February 15, 2018 15:39
Handlebars {{#if (op ... )}} operators
@servel333
servel333 / macbookpro-packages.sh
Last active October 6, 2017 18:51
Suggested packages for a MacBook Pro
# Suggested packages for a MacBook Pro
# Created Sep 2017 for a MacBook Pro Late 2013
lsb_release -a
# -> Description: Ubuntu 17.04
# -> Codename: zesty
# Read your model
sudo dmidecode -s system-product-name
# -> MacBookPro11,3

API model query string

  • is_archived=*: Returns a list of both soft-deleted and non-soft-deleted records
  • is_archived=true: Returns a list of only soft-deleted records
  • is_archived=false: Returns a list of only non-soft-deleted records
  • absent is_archived: Returns a list of only non-soft-deleted records

Example