Skip to content

Instantly share code, notes, and snippets.

View JellyWX's full-sized avatar
💙
Idle

Jude Southworth JellyWX

💙
Idle
View GitHub Profile
@JellyWX
JellyWX / filterlist
Created December 7, 2023 08:20
Custom uBlock filter list
||accounts.google.com/gsi/iframe/select$subdocument
codesandbox.io
@JellyWX
JellyWX / search.brave.js
Last active April 18, 2024 08:08
Tampermonkey Userscripts
// ==UserScript==
// @name Remove summarizer
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://search.brave.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=brave.com
// @grant none
// ==/UserScript==
@JellyWX
JellyWX / jude.goggles
Last active October 24, 2023 07:24
Brave Search goggle file
! name: jude
! description: Goggle for my own search results
! public: false
! author: Jude S
! tlds
*.uk$boost=1
*.org$boost=1
! everyday sites
@JellyWX
JellyWX / pre-commit
Created September 8, 2022 07:37 — forked from mgershovitz/pre-commit
Git pre-commit hook to prevent accidentally committing debug code (add NO_COMMIT in source comment)
#!/bin/bash
if git diff --cached | grep '^[+d].*NO_COMMIT'; then
echo "Can't commit file with NO_COMMIT comment, remove the debug code and try again"
exit 1
fi
@JellyWX
JellyWX / forms.py
Created July 31, 2019 11:10
Small form modelling system for Flask
import typing
from werkzeug.security import generate_password_hash, check_password_hash
from werkzeug import ImmutableMultiDict
class Field():
class FieldLengthExceeded(Exception):
pass
class MissingFieldData(Exception):
pass
#include "bubble_sort.h"
void bubble_sort(int *array, int buffer_len)
{
bool sorted = true;
for (int i = 0; i < buffer_len; ++i)
{
sorted = true;
for (int j = 0; j < buffer_len - i - 1; ++j)
{
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <string.h>
#include <ctype.h>
#define RESET "\x1B[0m"
#define BLOCK "█"
import random
BIN_SIZE = 26
OBJECT_COUNT = 3000
MAX_OBJECT_SIZE = 25
assert MAX_OBJECT_SIZE <= BIN_SIZE # check that objects cannot be too big
class Result(): # custom result class for handling errors
def __init__(self, err=None, ok=None, ):
@JellyWX
JellyWX / matmul.rs
Last active February 7, 2019 14:27
use std::ops::Mul;
use std::fmt::{Display, Formatter, Result as FmtResult};
#[derive(Debug)]
enum MulError {
BadDimensions,
}
struct Matrix {
contents: Vec<f64>,
#include <iostream>
int main() {
while (true) {
std::cout << "Type 2 numbers: ";
long num1, num2;
std::cin >> num1 >> num2;
long out = 0;