Skip to content

Instantly share code, notes, and snippets.

View brucevanhorn2's full-sized avatar
💭
I may be slow to respond.

Bruce M. Van Horn II brucevanhorn2

💭
I may be slow to respond.
View GitHub Profile
@brucevanhorn2
brucevanhorn2 / settings.json
Created February 12, 2025 05:36
My Windows 11 terminal settings for automated setup on new environments
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
@brucevanhorn2
brucevanhorn2 / StartMenuLayout.json
Created February 12, 2025 05:22
My start menu layout in windows 11 - used to automate my setup
{
"pinnedList": [
{
"desktopAppLink": "%ALLUSERSPROFILE%\\Microsoft\\Windows\\Start Menu\\Programs\\Microsoft Edge.lnk"
},
{
"packagedAppId": "Microsoft.OutlookforWindows_8wekyb3d8bbwe!Microsoft.OutlookforWindows"
},
{
"packagedAppId": "windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel"
@brucevanhorn2
brucevanhorn2 / main.py
Created February 9, 2025 01:38
LLM on your computer
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_name = "meta-llama/Llama-2-13b-chat-hf"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
device_map="auto",
load_in_8bit=True, # Enable 8-bit quantization to save VRAM
@brucevanhorn2
brucevanhorn2 / README.md
Created November 11, 2024 17:15
Code Data Collection from Git

Code Data Collection

This is a command I use to gather data from git logs for processing and visualization.

@brucevanhorn2
brucevanhorn2 / 1_shell.omp.json
Last active February 6, 2025 21:17
My 1-shell oh-my-posh theme customization
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"transient_prompt": {
"template": "\u2ce9 ",
"foreground": "#FEF5ED",
"background": "transparent"
},
"console_title_template": "{{ .Folder }}",
"blocks": [
{
@brucevanhorn2
brucevanhorn2 / README.md
Created February 9, 2023 01:17
SQL Server Connectivity Test Script

SQL Server Database Connectivity Tester

OK so you just made a SQL database somewhere... A VM, in the cloud, whatever. Then you made an app server somewhere else and you want to make sure the app server vm can actually access the database. This little script tests the ability to connect, do some basic CRUD, then cleans up after itself.

This is helpful if you run into problems and you need to rule out connectivity to the database.

You need Python3 and pymssql to make it work.

@brucevanhorn2
brucevanhorn2 / README.md
Created December 16, 2022 22:33
VSI 5 Enterprise Summary Export - 12 Months of Data

VSI 5 Enterprise Summary Export - 12 Months of Data

This gist contains a few exmaples of how to export your VSI data. In particular, 12 months of enterprise summary data. You can export to either a CSV file or a JSON file allowing you to then import the data into any analytics tool you choose.

This is a RESTful API call, so you need to create a script that can make an HTTP POST request to https://vsi5.visualstorageintelligence.com/api/export/v1/enterprise_summary_12_months. The payload you post should be in JSON format and should contain the following key value pairs:

output_format: "csv" or "json" request_user: the email address you use to login to VSI request_password: the password you use to login to VSI

VSI 5 Business Unit Forecast by Data Center Export

This REST api call allows you to export your company's business unit forecast by data center. You need to send an HTTP POST to https://vsi5.visualstorageintelligence.com/api/export/v1/get_bu_forecasting along with the folloing parameters in JSON format:

export_format : "json" or "csv" request_date : formatted as mm-dd-yyyy such as 11-04-2022 request_user : the email address you use to login to VSI request_password : the password you use to login to VSI

In this gist, we have a curl script, a PowerShell script, and a Python 3 script to help with automated retrieval.

@brucevanhorn2
brucevanhorn2 / README.md
Last active November 29, 2022 17:45
See all the updates for my projects in git

Latest Update Report

Your scrum master says

Knock knock

Who's there?

Water

@brucevanhorn2
brucevanhorn2 / vsi5-export.py
Created November 10, 2022 18:08
VSI 5 Enterprise Summary Export (Python 3 Version)
import http.client
import json
conn = http.client.HTTPSConnection("vsi5.visualstorageintelligence.com")
payload = json.dumps({
"export_format": "json",
"request_date": "10-31-2022",
"request_user": "your email here",
"request_password": "your password here"
})