Skip to content

Instantly share code, notes, and snippets.

View gwpantazes's full-sized avatar

George Pantazes gwpantazes

View GitHub Profile
gwpantazes /
Last active November 7, 2023 18:52
Testing for "cannot allocate memory" error in Ruby against ``

Test Ruby against

We are poking around and looking for the following "cannot allocate memory" error message:

Failed to open TCP connection to (Cannot allocate memory - connect(2) for \"\" port 443)

Target testing Ruby 3.2's call here: (Ruby TCPSocket implementation:

gwpantazes /
Created September 10, 2023 22:47
Scrape Full Species List from Idaho Fish and Game
We can't make this file beautiful and searchable because it's too large.
A Moth,Abagrotis apposita,Native,Year-round,
A Moth,Abagrotis brunneipennis,Native,Year-round,
A Moth,Abagrotis discoidalis,Native,Year-round,
A Moth,Abagrotis dodi,Native,Year-round,
A Moth,Abagrotis duanca,Native,Year-round,
A Moth,Abagrotis erratica,Native,Year-round,
A Moth,Abagrotis forbesi,Native,Year-round,
A Moth,Abagrotis glenni,Native,Year-round,
A Moth,Abagrotis hermina,Native,Year-round,
gwpantazes / Dockerfile
Created May 25, 2023 01:07
Jobs Done Dockerfile
FROM node:16.18
RUN git clone --single-branch /jobsdone
WORKDIR /jobsdone
COPY data.js data.js
RUN yarn install \
&& yarn build \
&& yarn global add http-server
gwpantazes / generateNameFromCommitShortHash.js
Last active March 6, 2023 18:10
Generate Code Name from Commit Short Hash
#!/usr/bin/env node
* @file Generate a deterministic name from a commit's short hash.
* Inspired by Docker 0.7.x which generates names from notable scientists and hackers.
const adjectives = [
gwpantazes /
Created January 30, 2023 04:24
todoproject - A very simple project idea logger
#!/usr/bin/env bash
# Configure by exporting TODOPROJECT_FILE, the file path to write to.
# Recommended: alias tp="path/to/"
function initFile {
if [[ -f "${todoproject_file}" ]]; then return 0; fi
mkdir -p "$(dirname "${todoproject_file}")"
printf "Timestamp of Thought\tProject\n" > "${todoproject_file}"
gwpantazes / half_baked_nodejs_open_in_editor.js
Created November 17, 2022 18:32
Half-baked solution to Open in Editor in Node.js like git commit does (Forsaken in favor of Inquirer Prompt type 'Editor')
import { spawnSync } from 'child_process'
import { readFileSync } from 'fs'
import { temporaryWriteSync } from 'tempy'
// Get the default editor
const editor = process.env['VISUAL'] || process.env['EDITOR'] || 'vi'
console.log(`Opening in EDITOR: ${editor}. Save and quit the editor process to continue.`)
// If within another interactive program, uncomment this to prevent wacky visuals
gwpantazes / html_document_modify.js
Last active November 5, 2022 18:32
Smoke test to modify an HTML document with javascript
let newelement = document.createElement('h1')
newelement.textContent = 'MODIFIED'
gwpantazes / .gitconfig
Last active September 1, 2022 16:27
My .gitconfig Preferences
pager = "if command -v diff-so-fancy > /dev/null; then diff-so-fancy | less --tabs=4 -RFX; else less --tabs=4 -RFX; fi"
diffFilter = "if command -v diff-so-fancy > /dev/null; then diff-so-fancy --patch; else less --tabs=4 -RFX; fi"
timeline = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all --since='90 days ago'
gwpantazes / gist:801fbaca52f85eb9fcf7dd1db47a1cf4
Created January 20, 2022 18:30
Skyrim Vanilla+ Mod List for PS4/PS5 Skyrim Special/Anniversary Edition
# Skyrim Vanilla+ Mod List for PS4/PS5 Skyrim Special/Anniversary Edition
> Compatible with PS4/PS5 Anniversary Edition
Version: v.0.0.1 - Updated on Thu Jan 20 12:26:45 CST 2022
The goal of this mod list is to have an extremely stable vanilla experience with a few nice tweaks, such as patches, loading screens, lighting and graphics, etc.
## Mod List Load Order
gwpantazes / gist:a21a6d75ca14e347abb4f118adcfdc52
Created September 30, 2020 02:40 — forked from samnang/gist:1759336
Install Bash version 4 on MacOS X
# Install Bash 4 using homebrew
brew install bash
# Or build it from source...
curl -O
tar xzf bash-4.2.tar.gz
cd bash-4.2
./configure --prefix=/usr/local/bin && make && sudo make install
# Add the new shell to the list of legit shells