Skip to content

Instantly share code, notes, and snippets.

View cheeseonamonkey's full-sized avatar
😅
Sweating, and smiling

Alexander H cheeseonamonkey

😅
Sweating, and smiling
View GitHub Profile
@cheeseonamonkey
cheeseonamonkey / fix-pip.sh
Created October 29, 2025 10:28 — forked from felipealfonsog/fix-pip.sh
Removing Python's EXTERNALLY-MANAGED lock
#!/usr/bin/env bash
echo "──────────────────────────────────────────────"
echo " Removing Python's EXTERNALLY-MANAGED lock "
echo "──────────────────────────────────────────────"
echo "* Developed and engineered by:"
echo "* Felipe Alfonso Gonzalez <[email protected]>"
echo "* Computer Science Engineer"
echo "* Chile"
echo "------------------------------------------------"
@cheeseonamonkey
cheeseonamonkey / chessFetchers.js
Last active September 24, 2025 01:41
Get chess.com games of username
// fetch archives of a username
async function fetchUserArchives(username) {
const url = `https://api.chess.com/pub/player/${username}/games/archives`;
const response = await fetch(url);
const data = await response.json();
return data.archives;
}
// fetch games from an archive
async function fetchArchiveGames(username, month, year) {
@cheeseonamonkey
cheeseonamonkey / backup_home.zsh
Last active October 18, 2024 19:45
backup_home.zsh
#!/bin/bash
# Set the backup filename
BACKUP_FILE="home_backup_$(date +%Y%m%d).squashfs"
# Create a temporary directory to hold the files to be backed up
TEMP_DIR=$(mktemp -d)
# Copy the files to the temporary directory
cp -r "$HOME"/.bash_logout "$TEMP_DIR"
@cheeseonamonkey
cheeseonamonkey / bcache_benchmarker.zsh
Last active October 13, 2024 20:38
bcache_benchmarker.zsh
#!/bin/zsh
# Define paths and test file size
TEST_FILE_SIZE=1024 # Size in MB (1G = 1024MB)
TEST_FILE_PATH_ROOT="/testfile"
TEST_FILE_PATH_HDD="/hdd/testfile"
# Clear bcache stats
echo "Clearing bcache stats..."
echo 1 | sudo tee /sys/block/bcache0/bcache/clear_stats > /dev/null
// Piece values
const piece = {
"P": 100,
"N": 280,
"B": 320,
"R": 479,
"Q": 929,
"K": 60000
};
@cheeseonamonkey
cheeseonamonkey / chesscomapi.js
Created May 20, 2024 20:09 — forked from replete/chesscomapi.js
get game data from chess.com API
//https://api.chess.com/pub/player/{username}/games/2023/02
(async function main () {
async function getChessGamesForMonth(username, year, month) {
const res = await fetch(`https://api.chess.com/pub/player/${username}/games/${year}/${month}`);
if (res.ok) {
const data = await res.json();
return data.games
} else {
console.error('Problem loading chess.com games from API', res);

Most Important Azure Services

Service Description Example
Azure Compute Virtual Machines, Virtual Machine Scale Sets, Azure Kubernetes Service Azure VMs hosting web applications
Azure Storage Blob Storage, File Storage, Queue Storage, Table Storage Storing user files in Azure Blob Storage
Azure Networking Virtual Network, Load Balancer, Application Gateway, VPN Gateway Creating a secure network for an application
Azure Databases Azure SQL Database, Cosmos DB, Azure Database for MySQL/PostgreSQL Storing customer data in Azure SQL Database
Azure Identity Azure Active Directory, Azure AD B2C, Azure AD B2B Managing user identities for an application
Azure AI Azure Machine Learning, Azure Cognitive Services, Azure Bot Services Integrating chatbots into a website using Azure Bot Services
Azure D
@cheeseonamonkey
cheeseonamonkey / GithubReadmeTemplate.md
Created May 5, 2024 00:16
github readme template (source: /othneildrew/Best-README-Template/)

@cheeseonamonkey
cheeseonamonkey / downloadWikiDumps.js
Created April 27, 2024 02:07
Wikipedia dumps download script
/*
npm install axios cheerio fs-extra
*/
// Import the necessary libraries
const axios = require('axios');
const cheerio = require('cheerio');
const fs = require('fs-extra');
const path = require('path');
@cheeseonamonkey
cheeseonamonkey / usage.md
Last active September 15, 2025 00:04
Wiki to Plaintext

usage:

ui:

image

shell:

    py wiki_to_text.py '/hdd/Downloads/simplewiki-20240120-pages-meta-current.xml.bz2' `pwd`/output/