Skip to content

Instantly share code, notes, and snippets.

View halfnibble's full-sized avatar
🎃
Coding

Josh Wedekind halfnibble

🎃
Coding
View GitHub Profile
@halfnibble
halfnibble / AI_Report.md
Created August 8, 2025 01:37
AI report

Based on current trends in 2025, companies of all sizes—from small startups to large enterprises—are increasingly seeking AI services to streamline operations, boost revenue, and optimize resource allocation. This demand is driven by the need for cost-effective, scalable solutions amid economic pressures and rapid technological advancements. Key focus areas include automating routine tasks to improve processes, enhancing customer interactions for better sales outcomes, and leveraging data-driven insights for smarter capital decisions like inventory management or risk assessment.

These services align well with reusable solutions built on open-source models (e.g., from Hugging Face repositories like LLaMA, Mistral, or Stable Diffusion, using frameworks such as TensorFlow, PyTorch, or scikit-learn). Such approaches allow for fine-tuning on company-specific data, deployment as APIs or microservices, and broad applicability across industries like retail, finance, healthcare, and manufacturing. Below, I outline th

@halfnibble
halfnibble / loc.sh
Last active July 16, 2025 07:31
Count Language LOC
#!/bin/bash
# Usage: ./script.sh [directory]
# If no directory is provided, it uses the current directory.
dir="${1:-.}"
# Common directories to exclude (3rd party libraries and build artifacts)
exclude_dirs=( -name node_modules -o -name Pods -o -name Carthage -o -name build -o -name .build -o -name .gradle -o -name venv -o -name .venv -o -name env )
@halfnibble
halfnibble / main.go
Created June 25, 2024 03:35
Rush.js multiple project `npm start` runner
// I place this in ./cli/main.go, whereas rush.json is at the root of my repo.
// Then run from within ./cli with `$ go run main.go`
package main
import (
"encoding/json"
"fmt"
"os"
"os/exec"
"path/filepath"
@halfnibble
halfnibble / seed-languages.js
Created February 24, 2024 20:07
Seed test languages data
// scripts/seed-languages.js
// DEPENDENCIES
const mongoose = require('mongoose');
// CONFIGURATION
require('dotenv').config();
mongoose.connect(process.env.MONGO_URI, { useNewUrlParser: true, useUnifiedTopology: true }, () => {
console.log('connected to mongo: ', process.env.MONGO_URI);
});
@halfnibble
halfnibble / seed-bakers.js
Created February 17, 2024 18:50
Baker seeder
// seeders/seed-bakers.js
const Baker = require('../models/baker');
require('dotenv').config();
const mongoose = require('mongoose');
const MONGO_URI = process.env.MONGO_URI;
mongoose
.connect(MONGO_URI)
.then(() => {
@halfnibble
halfnibble / index.js
Created February 3, 2024 18:22
rainbow-routes/index.js
const express = require('express');
const app = express();
app.get('/:color?', (req, res) => {
let myColor = req.params.color;
console.log('myColor is: ', myColor);
if (typeof myColor === 'undefined') {
// Set to default when undefined.
myColor = 'white';
@halfnibble
halfnibble / README.md
Created April 23, 2023 21:38
API Readme Table
Method Path Purpose
GET / Home page
GET /places Places index page
POST /places Create new place
GET /places/new Form page for creating a new place
GET /places/:id Details about a particular place
PUT /places/:id Update a particular place
GET /places/:id/edit Form page for editing an existing place
DELETE /places/:id Delete a particular place
@halfnibble
halfnibble / login_register.js
Created October 24, 2021 05:55
Toggle Login and Register forms on the Moore Wright Group Woocommerce page.
/**
* Add this JavaScript early in the DOM so it will execute when the page loads.
* You can use something like the "Simple Custom CSS and JS" plugin:
* https://wordpress.org/plugins/custom-css-js/#
*
* If you want to test it, execute the code inside the "DOMContentLoaded"
* function in the developer console on the login|register page.
*/
document.addEventListener("DOMContentLoaded", function (event) {
@halfnibble
halfnibble / uploader.py
Created January 18, 2021 01:37
Minecraft Server Backups - Azure Storage Uploader Script.
# Inspired by https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python
import os
from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient, __version__
# Make sure you update this per server
CONTAINER_NAME = 'mcbackups1'
try:
print("Azure Blob storage v" + __version__ + " - Python quickstart sample")
@halfnibble
halfnibble / webpack.config.js
Created June 22, 2020 17:23
Add file-loader to webpack config.
const path = require('path')
const ExtractTextWebpackPlugin = require('extract-text-webpack-plugin')
const { postLogin, postArticle } = require('./js/api')
const express = require('express')
module.exports = {
mode: 'development',
entry: {
'app': './js/index.js',
'styles': './sass/styles.sass'