Skip to content

Instantly share code, notes, and snippets.

@olisolomons
olisolomons / ebay-used-filter.js
Created August 14, 2025 10:32
Do people actually buy new stuff on eBay?
// ==UserScript==
// @name eBay Used Filter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Automatically selects the "Used" filter on eBay search pages.
// @author You
// @match https://*.ebay.co.uk/sch/*
// @grant none
// ==/UserScript==
@olisolomons
olisolomons / main.go
Created February 23, 2024 15:34
Advent of Code 2023 day 1
package main
import (
"bufio"
"fmt"
"os"
"regexp"
"strconv"
)
@olisolomons
olisolomons / lazy.clj
Created July 28, 2023 16:14
clojure laziness explaination
(ns lazy
(:require
[clojure.pprint :as p]))
;; First, make a simple lazy calculation data type
(defrecord Lazy [content]
clojure.lang.IDeref
(deref [_]
(:result

Keybase proof

I hereby claim:

  • I am olisolomons on github.
  • I am olisolomons (https://keybase.io/olisolomons) on keybase.
  • I have a public key ASD60RI8hhV2yNlIdWddRJCJk12R3uwmNU-v4cdRSdXaDgo

To claim this, I am signing this object:

@olisolomons
olisolomons / delay_dropbox.py
Created February 19, 2022 16:52
Make dropbox start properly
import os
import subprocess
import shutil
import time
import sys
# copied from dropbox source code
PARENT_DIR = os.path.expanduser("~")
DROPBOX_DIST_PATH = "%s/.dropbox-dist" % PARENT_DIR
DROPBOXD_PATH = os.path.join(DROPBOX_DIST_PATH, "dropboxd")
@olisolomons
olisolomons / clock.py
Last active April 6, 2023 21:23
Simple GTK clock
#!/usr/bin/python3
# This code is licensed under the terms of the GPL3 license
# Written by: Oli Solomons
# 2023
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk, GLib
@olisolomons
olisolomons / python_console.py
Last active September 18, 2025 07:11
Python interpreter console tkinter widget
import code
import hashlib
import queue
import sys
import threading
import tkinter as tk
import traceback
from tkinter.scrolledtext import ScrolledText
@olisolomons
olisolomons / table.py
Last active July 29, 2019 14:20
Table scanner - answer to interview question
class Table:
"""A table of numbers"""
def __init__(self, *args, **kwargs):
if len(args) == 3:
self.from_vals(*args)
elif len(args) == 2:
x, y = args
if kwargs['mode'] == 'random':
vals = [random.randint(0, 9) for _ in range(x * y)]