Skip to content

Instantly share code, notes, and snippets.

curl http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-nightly/2018-05-24/linux-headers-4.17.0-994_4.17.0-994.201805240410_all.deb
curl http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-nightly/2018-05-24/linux-headers-4.17.0-994-generic_4.17.0-994.201805240410_amd64.deb
curl http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-nightly/2018-05-24/linux-image-unsigned-4.17.0-994-generic_4.17.0-994.201805240410_amd64.deb
curl http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-nightly/2018-05-24/linux-image-unsigned-4.17.0-994-lowlatency_4.17.0-994.201805240410_amd64.deb
curl http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-nightly/2018-05-24/linux-modules-4.17.0-994-generic_4.17.0-994.201805240410_amd64.deb
curl http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-nightly/2018-05-24/linux-modules-4.17.0-994-lowlatency_4.17.0-994.201805240410_amd64.deb
curl -O http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-next/2018-05-15/linux-headers-4.17.0-997_4.17.0-997.201805142201_all.deb
curl -O http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-next/2018-05-15/linux-headers-4.17.0-997-generic_4.17.0-997.201805142201_amd64.deb
curl -O http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-next/2018-05-15/linux-image-unsigned-4.17.0-997-generic_4.17.0-997.201805142201_amd64.deb
curl -O http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-next/2018-05-15/linux-modules-4.17.0-997-generic_4.17.0-997.201805142201_amd64.deb
@richardARPANET
richardARPANET / impl_min_max_functions_in_python.py
Created November 7, 2018 09:32
impl_min_max_functions_in_python.py
"""
Python min/max functions (O(n) complexity).
"""
mylist = [1, 2, 0, 3]
def test_min():
assert min(mylist) == min_(mylist)
@richardARPANET
richardARPANET / profile_function.py
Created May 29, 2019 12:50
Profile any Python function easily.
from functools import wraps
import cProfile
def profileit(func):
@wraps(func)
def wrapper(*args, **kwargs):
profile = cProfile.Profile()
return_value = profile.runcall(func, *args, **kwargs)
profile.dump_stats(f'{func.__name__}.profile')
@richardARPANET
richardARPANET / round_to_attractive_price.py
Created September 10, 2020 15:11
For product pricing. Round to 'attractive' prices which don't scare off customers, e.g. 10.99, 10.50, 10.00, 9.95, etc.
from decimal import Decimal
def round_to_attractive_price(
value, attractive_after_decimals=(0, 50, 95, 99)
):
rounded = round(Decimal(value), 2)
before_decimal, after_decimal = str(rounded).split('.')
after_decimal = min(
attractive_after_decimals,
@richardARPANET
richardARPANET / uBlock filters for LinkedIn.txt
Last active October 12, 2020 11:31
uBlock filters for LinkedIn.com
linkedin.com##h4:has-text(, complete these steps to get the most out of LinkedIn):upward(4)
linkedin.com##h2:has-text(Profile Strength:):upward(4)
linkedin.com##h2:has-text(Strengthen your profile):upward(5)
linkedin.com##strong:has-text(Show recruiters you’re open to work):upward(14)
linkedin.com##a:has-text(Try Premium for free):upward(3)
linkedin.com##span:has-text(Promoted):upward(6)
@richardARPANET
richardARPANET / woke-block.txt
Last active February 3, 2021 19:55
uBlock origin filters to remove woke propaganda from various websites
kubernetes.io##.announcement
react-bootstrap.github.io##.navbar-dark.navbar-expand.navbar.justify-content-center
firebase.google.com##.devsite-banner-announcement.devsite-banner
sass-lang.com##.sl-c-alert--info.sl-c-alert
nodejs.org##.home-blacklivesmatterbutton
{
"meta": {
"theme": "elegant"
},
"basics": {
"name": "Thomas Davis",
"label": "Web Developer",
"image": "https://avatars0.githubusercontent.com/u/416209?s=460&u=38f220a2c9c658141804f881c334c594eb1642ac&v=4",
"summary": "I'm a full stack web developer who can build apps from the ground up. I've worked mostly at startups so I am used to wearing many hats. I am a very product focussed developer who priotizes user feedback first and foremost. I'm generally very flexible when investigating new roles. ",
"website": "https://lordajax.com",