Skip to content

Instantly share code, notes, and snippets.

@ehatton
ehatton / xml_breaker.py
Last active March 19, 2021 11:22 — forked from nicwolff/XML_breaker.py
Python script to break large XML files
import os
import sys
from xml.sax import parse
from xml.sax.saxutils import XMLGenerator
class CycleFile:
def __init__(self, filename):
self.basename, self.ext = os.path.splitext(filename)
self.index = 0
@ehatton
ehatton / reset_fish_shell_colors.fish
Last active July 31, 2020 16:42
Resets fish terminal colors. Uses named colours instead of specific hex values so that it integrates better with terminal colour themes.
# Resets fish terminal colors. Uses named colours instead of specific hex
# values so that it integrates better with terminal colour themes.
set fish_color_autosuggestion brblack
set fish_color_cancel -r
set fish_color_command --bold
set fish_color_comment red
set fish_color_cwd_root red
set fish_color_cwd green
set fish_color_end brmagenta
@ehatton
ehatton / python_vscode_snippets.json
Last active April 28, 2020 13:28
Python snippets for VS Code
# Python snippets for VS Code
{
"class": {
"prefix": "cls",
"body": [
"class ${1:ClassName}:",
"\tdef __init__(self):",
"\t\tself.$2 = $2$0"
],
"description": "Code snippet for class without parameters"