Skip to content

Instantly share code, notes, and snippets.

View thomasht86's full-sized avatar

Thomas Hjelde Thoresen thomasht86

View GitHub Profile
@minimaxir
minimaxir / CLAUDE.md
Created January 2, 2026 01:53
Python CLAUDE.md (20260101)

Agent Guidelines for Python Code Quality

This document provides guidelines for maintaining high-quality Python code. These rules MUST be followed by all AI coding agents and contributors.

Your Core Principles

All code you write MUST be fully optimized.

"Fully optimized" includes:

@thomasht86
thomasht86 / setup.sh
Last active January 3, 2026 17:12
Claude code on mobile
#!/bin/bash
#
# Mobile Claude - One-command setup for running Claude Code remotely
# Supports: Arch, Ubuntu/Debian, Fedora, macOS
#
# Usage: curl -fsSL https://gist.github.com/thomasht86/86f0f8f62db1839054abd8a7e501ff7d/raw/935bbfa0957cd5926751742189441cf10fbe2ba0/setup.sh | bash
#
set -e
@jph00
jph00 / polya.md
Last active January 21, 2026 11:36
Summary of Polya's "How To Solve It With Code"

A guide to George Polya's "How to Solve It"

Introduction

George Polya (1887-1985) was a Hungarian mathematician and educator who revolutionized our understanding of problem-solving and teaching. While he made significant contributions to mathematics, his most enduring legacy is his insights into how people learn and solve problems. His 1945 book "How to Solve It" has influenced educators across numerous fields, extending far beyond mathematics.

Polya's Teaching Philosophy

Polya's approach centered on three key principles. First, he championed active learning, believing students learn best by discovering solutions themselves rather than being told answers. Second, he emphasized heuristic thinking - the art of guided discovery and learning from experience, viewing problem-solving as a skill that can be developed through practice. Third, he developed sophisticated questionin

@mwufi
mwufi / install_docker_in_colab.sh
Last active December 7, 2025 11:46
Install Docker in Google Colab!
# First let's update all the packages to the latest ones with the following command
sudo apt update -qq
# Now we want to install some prerequisite packages which will let us use HTTPS over apt
sudo apt install apt-transport-https ca-certificates curl software-properties-common -qq
# After that we will add the GPG key for the official Docker repository to the system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# We will add the Docker repository to our APT sources
@thomasht86
thomasht86 / read-flowfile-contents.py
Created May 25, 2018 05:12 — forked from ijokarumawak/read-flowfile-contents.py
Example Python script to use from NiFi ExecuteScript processor which reads the first line from an incoming flow file.
from org.apache.nifi.processors.script import ExecuteScript
from org.apache.nifi.processor.io import InputStreamCallback
from java.io import BufferedReader, InputStreamReader
class ReadFirstLine(InputStreamCallback) :
__line = None;
def __init__(self) :
pass
@Aerijo
Aerijo / making_language_grammar.md
Last active September 20, 2025 20:59
Guide to writing an Atom language grammar

A guide to writing a language grammar (TextMate) in Atom

Tree sitter

  • Atom is transitioning to an entirely new way of defining grammars using tree-sitter. This will be enabled by default quite soon now. It is theoretically faster and more powerful than regex based grammars (the one described in this guide), but requires a steeper learning curve. My understanding is that regex based grammars will still be supported however (at least until version 2), so this guide can still be useful. To enable it yourself, go to Settings -> Core and check Use Tree Sitter Parsers

Links for tree-sitter help: