Skip to content

Instantly share code, notes, and snippets.

View jwodder's full-sized avatar

John T. Wodder II jwodder

  • A well house for a large spring
  • 19:28 (UTC -04:00)
View GitHub Profile
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 21, 2024 17:20
Hyperlinks in Terminal Emulators
@jart
jart / fastio.py
Created October 23, 2016 06:44
Multithreaded Python os.walk
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@HaleTom
HaleTom / print256colours.sh
Last active May 2, 2024 14:43
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@jwodder
jwodder / apt-check.py
Last active January 24, 2023 04:16
Display a table of available APT package updates
#!/usr/bin/python3
"""
This script lists all APT package updates currently available for your system
along with the version numbers of the old & new packages. It is derived from
``/usr/lib/update-notifier/apt-check`` in the ``update-notifier-common``
package on Ubuntu 14.04 (Trusty Tahr) and is made available under the same
license (the GNU GPL v2).
This script is know to work on Ubuntu Trusty and Xenial, and it should work on
any recent version of Ubuntu with the ``python3-apt`` package installed.
@jcs
jcs / netpbm-resize pseudo-code
Created June 4, 2016 16:25
using netpbm to resize jpegs and pngs of arbitrary size to fixed square, preserving ratio with transparency
#
# solution for resizing jpegs and pngs of arbitrary size down to a 72x72
# square, preserving source ratio, and filling non-square sides with
# transparency
#
# ahead of time, convert a transparent 72x72 png to blank-72.pam and save
# it with your code
#
# pngtopam -quiet -alphapam < blank-72.png > blank-72.pam
#

Most downloaded projects

SELECT
  file.project,
  COUNT(*) as total_downloads,
FROM
  TABLE_DATE_RANGE(
    [the-psf:pypi.downloads],
    TIMESTAMP("20160114"),
@habnabit
habnabit / ircbot.py
Last active January 26, 2023 09:09
an example IRC bot using twisted
import sys
from twisted.internet import defer, endpoints, protocol, reactor, task
from twisted.python import log
from twisted.words.protocols import irc
class MyFirstIRCProtocol(irc.IRCClient):
nickname = 'MyFirstIrcBot'
@tuzz
tuzz / github.css
Last active May 20, 2024 11:57
Github Markdown Stylesheet
/*
Copyright (c) 2017 Chris Patuzzo
https://twitter.com/chrispatuzzo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@mathiasbynens
mathiasbynens / appify
Created November 12, 2010 13:46 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh