Skip to content

Instantly share code, notes, and snippets.

View doctaphred's full-sized avatar
🚮
computers are bad don't use them

Frederick Wagner doctaphred

🚮
computers are bad don't use them
View GitHub Profile
@timsayshey
timsayshey / bookmarklet.js
Last active December 16, 2021 20:48
Surprise Uber Delivery Day Bookmarklet - Random Delivery Date Selector
javascript: (function () { document.querySelector("label[for=schedule-option]").click(); var dateSelect = document.querySelector("div[role=dialog] select"); var opts = dateSelect.getElementsByTagName('option'); var i = Math.floor(Math.random() * opts.length); dateSelect.selected = i; dateSelect.style.display = 'none'; dateSelect.closest('div').innerHTML = "Random day selected! Prepare to be surprised! 😁"; })()
@alisdair
alisdair / intensify.sh
Created May 21, 2019 23:44
intensifies Slack emoji creator
#!/bin/bash
# Generate a `:something-intensifies:` Slack emoji, given a reasonable image
# input. I recommend grabbing an emoji from https://emojipedia.org/
set -euo pipefail
# Number of frames of shaking
count=10
# Max pixels to move while shaking
"""Example usage:
In [1]: !cat ayy.s
.text
.global _start
.type _start, @function
_start:
movq $10, %rdx
pushw $10
@ssanderson
ssanderson / loop.py
Last active January 17, 2021 06:35
A Class is a Poor Man's Loop
"""
$ python loop.py
Body: 0
Body: 1
Body: 2
Body: 3
Body: 4
Skipping 5
Body: 6
Body: 7

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@peteristhegreat
peteristhegreat / git diff sqlite3 .gitattributes
Last active August 12, 2024 07:58
Sqlite git diff - Get git to use an sql dump of sqlite3 for showing differences ( .gitconfig config attributes sqlite3 )
*.db diff=sqlite3
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
MIT License
Copyright (c) 2016 Matt Menzenski
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@nottrobin
nottrobin / wsgi.py
Last active September 3, 2018 02:59
Simple WSGI application server
from wsgiref.simple_server import make_server
def application(env, start_response):
"""
A basic WSGI application
"""
http_status = '200 OK'
response_headers = [('Content-Type', 'text/html')]
@maurisvh
maurisvh / spectrogram.py
Last active June 26, 2024 15:40
ANSI art spectrogram viewer that reads audio from a microphone
#!/usr/bin/python
import numpy
import pyaudio
import re
import sys
WIDTH = 79
BOOST = 1.0