Skip to content

Instantly share code, notes, and snippets.

View karlbunch's full-sized avatar

Karl Bunch karlbunch

View GitHub Profile
#!/usr/bin/env bash
set -euo pipefail
# patch-claude-code.sh — Rebalance Claude Code prompts to fix corner-cutting behavior
#
# What this does:
# Patches the npm-installed @anthropic-ai/claude-code cli.js to rebalance
# system prompt instructions that cause the model to cut corners, simplify
# excessively, and defer complicated work.
#
import os
import pickle
import warnings
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from tensorflow.keras.callbacks import EarlyStopping
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import Dropout
/**
* An Anti-Reverse Engineering Guide, Joshua Tully
* https://www.codeproject.com/Articles/30815/An-Anti-Reverse-Engineering-Guide
*/
bool FindDebugger1::HasDebugger()
{
__try { __asm INT 0x2D }
__except (EXCEPTION_EXECUTE_HANDLER){ return false; }
@axegon
axegon / README.md
Last active March 12, 2020 23:51
Fetching data from https://github.com/CSSEGISandData/COVID-19 into JSON files.

SETUP

Use a virtualenv if possible.

  1. Install the requirements: pip install -r requirements.txt
  2. Set the two environmental variables GHTOKEN and BLEEPBLOOP:
GHTOKEN = https://github.com/settings/tokens
BLEEPBLOOP = WHATEVER_YOU_WANT,_USED_FOR_SALT
@muhqu
muhqu / amzn-music
Created April 16, 2018 11:36
Control playback of Amazon Music via command line.
#!/bin/bash
#
# The MIT License (MIT)
#
# Copyright (c) 2018 Mathias Leppich <mleppich@muhqu.de>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@dentechy
dentechy / WSL-ssh-server.md
Last active May 6, 2026 19:43
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
@so0k
so0k / kubectl.md
Last active April 8, 2026 10:42
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@Scurby
Scurby / lua53.sh
Last active January 25, 2016 20:48
#!/bin/bash
#
# lua53 - Upgrade lua to 5.3.2 (latest)
#
# Author: Scurby <scurby@swgemu.com>
#
# Created: 1/22/2016
logger -t options "** OPTIONS **"
@zedar
zedar / ApacheHadoop_NativeLibs.adoc
Last active February 14, 2025 14:41
Add native libraries to Apache Hadoop installation

Apache Hadoop - add native libraries

If native libraries are not available the following message is displayed with every hadoop command: hadoop checknative

WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  • Clone hadoop source code


@robcowie
robcowie / spark_notes.md
Last active November 20, 2024 18:52
Apache Spark Notes

Install Apache Spark (OSX)

$ brew install apache-spark

Run the Spark python shell

A python shell with a preconfigured SparkContext (available as sc). It is