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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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! 😁"; })() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Example usage: | |
In [1]: !cat ayy.s | |
.text | |
.global _start | |
.type _start, @function | |
_start: | |
movq $10, %rdx | |
pushw $10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
$ python loop.py | |
Body: 0 | |
Body: 1 | |
Body: 2 | |
Body: 3 | |
Body: 4 | |
Skipping 5 | |
Body: 6 | |
Body: 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.db diff=sqlite3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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')] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import numpy | |
import pyaudio | |
import re | |
import sys | |
WIDTH = 79 | |
BOOST = 1.0 |
NewerOlder