Skip to content

Instantly share code, notes, and snippets.

View nullableVoidPtr's full-sized avatar
👋
henlo break pls

Avery nullableVoidPtr

👋
henlo break pls
View GitHub Profile
@nullableVoidPtr
nullableVoidPtr / SelfWealthDarkMode.css
Last active January 28, 2021 10:40
Unofficial darkmode for SelfWealth, inject this using Stylus
nav.left-nav {
background-color: var(--brand-grey);
}
nav.left-nav ul.nav-section li a:hover {
background-color: var(--gray-dark);
color: var(--white);
}
body,
.heading,
h1,
@nullableVoidPtr
nullableVoidPtr / extract_commbank.py
Last active December 10, 2023 00:55
Generate transactions CSV from Commonwealth Bank of Australia PDF statements
#!/usr/bin/env python
# SPDX-License-Identifier: MIT
# Copyright nullableVoidPtr
import sys
import PyPDF2
import re
from decimal import Decimal
from datetime import datetime
from typing import Iterable, Tuple, Optional
@nullableVoidPtr
nullableVoidPtr / cursed64.js
Last active October 2, 2020 15:52
'functional' {a,b}to{b,a} implementation with no named functions or loops
const btoa = input =>
(output =>
(length =>
length % 3 ?
output.slice(0, (length % 3) - 3) + "=".repeat(3 - (length % 3)) :
output
)(input.length)
)(input.replace(/.{1,3}/g, chunk =>
(f =>
(x =>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char s[12] = {0};
int i = 12;
long long N;
for (scanf("%lld", &N); N; s[--i] = 'a' + (--N % 26), N /= 26);
printf("%s\n", &s[i]);
}
#!/usr/bin/python3
import asyncio
import aiohttp
import aiofiles
from pathlib import Path
import datetime
import os
import time
from sys import argv
from bs4 import BeautifulSoup, SoupStrainer
#!/usr/bin/python3
import re
from pathlib import Path
import datetime
import requests
import os
import time
from sys import argv
from bs4 import BeautifulSoup
const BOMB = -1;
const BLANK = 0;
function generateMap(width, height, bombCount)
{
const map = Array.from(new Array(height), () => Array.from(new Array(width), () => 0));
for(let i = 0; i < bombCount; ) {
const posX = Math.floor(Math.random() * width);
const posY = Math.floor(Math.random() * height);
#include <stdio.h>
unsigned char gcd256(unsigned char a) {
for (int i = 0; i < 8; i++) if ((a >> i) & 1) return 1 << i;
}
int main() {
for (int i = 0; i < 256; i++) printf("%d\n", gcd256(i));
}
#!/usr/bin/python
from sys import argv
from struct import unpack
def dump_coff(input_buffer):
header = dict(zip(['signature', 'bytes_in_last_block', 'blocks_in_file',
'num_relocs', 'header_paragraphs', 'min_extra_paragraphs',
'max_extra_paragraphs', 'ss', 'sp', 'checksum', 'ip', 'cs',
'reloc_table_offset', 'overlay_number'], unpack("<HHHHHHHHHHHHHH", input_buffer[:28])))
if header['signature'] != 0x5A4D:
def decodeScrapeshieldEmail(s):
retval = ""
key = int(s[:2], 16)
for char in [int(s[i:i+2], 16) for i in range(2, len(s), 2)]:
retval += chr(char ^ key)
return retval
#return "".join([chr(c^int(s[:2],2))for c in [int(s[i:i+2],16)for i in range(2,len(s),2))]])