summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-12-28arch-proxy.py: ignore empty files in cacheHEADmasterPeter Wu1-0/+3
2022-12-28arch-proxy.py: accept upstream responses without Content-Length headerPeter Wu1-3/+11
This can occur while manually querying directory indexes.
2021-02-02upload-svr.go: set last-modified to file mtimePeter Wu1-2/+7
2021-02-02upload-svr.go: print interface addressesPeter Wu1-0/+46
Every time I need to invoke `ip addr` or `ifconfig` to find addresses, might as well save some time by printing the local addresses directly.
2020-08-29interrupts-graph.py: fix compatibility with newer library versionsPeter Wu1-14/+19
Address deprecation warnings. Line selection appears to be broken, but at least some graph is visible. Tested with python-matplotlib 3.3.1-1 and python-scipy 1.5.2-1.
2020-05-09list-libs: utility to find library dependenciesPeter Wu1-0/+50
Originally made for macOS. Linux (via GNU libc, glibc ld.so) already has a much more compact version that can display the library dependencies. As the user might try to run it on untrusted libraries, let's not execute the command by default and print a hint instead.
2020-01-22cert-info: add macOS compatibilityPeter Wu1-7/+11
2019-10-20arch-proxy.py: support zstd compressed packagesPeter Wu1-2/+4
"The imminent release of pacman 5.2 brings build tools with support for compressing packages with zstd. [..] If you use custom scripts make sure these do not rely on hardcoded file extensions. The zstd package file extension will be .pkg.tar.zst." https://www.archlinux.org/news/required-update-to-recent-libarchive/
2019-09-10upload-svr.go: fix panic with long filenamesPeter Wu1-1/+3
2019-05-04upload-svr.go: a modern temporary file serverPeter Wu1-0/+450
The previous tmp-upload script required PHP which is not always available. It also did not support TLS. This new version supports that and should be in a better position to handle large files as well. Created at 2019-03-31.
2019-05-04gcc-check: ignore -fuse-ld=lldPeter Wu1-0/+2
2018-10-25gcc-check: clang-check compatible wrapperPeter Wu1-0/+134
Perform syntax-only checks using a compilation database as produced by cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON, similar to clang-check.
2018-05-31arch-proxy.py: drop leading slashPeter Wu1-3/+3
The path already starts with a slash, do not concatenate it with another slash from the mirror URL.
2018-05-08arch-proxy.py: support mirrors and Arch Linux Archive (ALA)Peter Wu1-19/+98
For testing older packages while reusing a local package cache. Fix miscellaneous issues like printing stack traces when -Syu while the cache is up to date (peer would close connection).
2017-03-04arch-proxy.py: support resumed downloadsPeter Wu1-12/+72
Quick hack to support one specific range request type: resume downloading at some offset until the end. The full file is still downloaded from upstream as needed.
2017-03-04arch-proxy.py: support readonly cachePeter Wu1-13/+25
2017-02-24arch-proxy.py: quick proxy cache for Arch Linux packagesPeter Wu1-0/+161
With a freshly bootstrapped VM (using https://github.com/Lekensteyn/archdir), it became tiresome (and wasteful) to download the same packages when my local nginx cache was not available. This script serves as a simple proxy that tries to cache downloaded packages in the current working directory.
2016-09-11git-gerrit-diff: do not print already merged commitsPeter Wu1-3/+5
2016-09-11Revert "hwrand.pl,hwrand.py: forward randomness"Peter Wu2-15/+0
This reverts commit 7851407fe89228897d01278bb1929f817821a701. Hardware randomness is automatically added to the pools, these scripts are not really needed. The original issue that made the boot hang was fixed in Linux v4.7-12388-g0cbbc422.
2016-09-11block-grep: search for patterns, grouped per blockPeter Wu1-0/+78
2016-08-09hwrand.pl,hwrand.py: forward randomnessPeter Wu2-0/+15
Continuously fills the entropy pool from /dev/hwrng, crediting 4 bits of entropy per byte. Hopefully speeds up the provisioning of a test VM that invokes pacman-key --init... Authored by me, posted on https://unix.stackexchange.com/a/302338/8250
2016-07-29rare/watch-intr.py: utility for watching /proc/interruptsPeter Wu1-0/+33
Useful for using over SSH.
2015-12-15conntrack-restore: remember connection statePeter Wu1-0/+87
Useful when a network interface goes down and up again, this keeps connections such as SSH alive. Created 2015-11-02
2015-10-30git-gerrit-diff: default to --colorPeter Wu1-5/+15
2015-10-30git-gerrit-diff: always add separator between commitsPeter Wu1-1/+1
Fixes missing newline between the two different changesets (not merged in X, not merged in Y).
2015-10-24git-gerrit-diff: completion needs spacesPeter Wu1-2/+2
The git bash-completion scripts looks for the first word, so separate it from ';' and drop "git" to make it shorter (it gets ignored anyway).
2015-10-17sigs.py: print signals for a processPeter Wu1-0/+59
Print pending, blocked, ignored and caught signals for a process.
2015-10-16git-gerrit-diff: find out what changes are mergedPeter Wu1-0/+212
Useful to find out if I forgot to backport something and whether some branches can be removed or not.
2015-08-13htmlformat: dead-simply HTML formatterPeter Wu1-0/+18
Simple alternative to tidy Created at: 2013-08-28 00:03:00
2015-08-08git-log-describe.awk: fix submodule casePeter Wu1-3/+3
For submodules, the .git file is just a file, not a directory.
2015-05-30startcom-sha2.py: utility to fix broken SHA256 intermediatesPeter Wu1-0/+382
Replaces intermediate certificates (PEM format) by other certificates. Beware of line endings! Supports both Python 2.7 and 3.
2015-03-11dnscheck.py: checks for the existence of DNS namesPeter Wu1-0/+95
2015-02-16asan-help: pretty print ASAN_OPTIONSPeter Wu1-0/+104
ASAN_OPTIONS=help=1 is not supported by GCC 4.9, but I want to know its supported features anyway. Manually copy the names from gcc-4.9-20150204 and print the help text with names highlighted.
2015-01-24pactree-aur: mark pactree output with sourcesPeter Wu1-0/+42
Lsat modified 2014-12-30
2015-01-01tmp-upload: newline after success messagePeter Wu1-1/+1
2015-01-01cert-info: enable SNI, accept cert from CA bundlePeter Wu1-3/+4
2014-10-24digest.py: use threading insteadPeter Wu1-7/+8
At first I used multithreading because threading would still run with one CPU core due to the GIL. That probably happened because I accessed _hashes[algos] in the loop of _queue_updater. Now that this is not done anymore, and only the hash update function is called which releases the GIL for data larger than 2 KiB, multiple cores are actually used. For comparison, for a file of 2.3 GiB (min/avg/max/sd secs for n=10): - pee sha256sum md5sum < file: 16.5/16.9/17.4/.305 - python3 digest.py -sha256 -md5 < file: 13.7/15.0/18.7/1.77 - python2 digest.py -sha256 -md5 < file: 13.7/15.9/18.7/1.64 - jacksum -a sha256+md5 -F '#CHECKSUM{i} #FILENAME': 32.7/37.1/50/6.91 The file is actually 2367029248 bytes, resident in the disk cache. Environment: - CPU: Intel i5-460M - Arch Linux x86_64 - Linux 3.17-rc4 - coreutils 8.23 - moreutils 0.51 - jacksum 1.7.0 on OpenJDK 1.7.0_71 - Python 3.4.2, Python 2.7.8
2014-10-24digest.py: calculate multiple digestsPeter Wu1-0/+144
Created to "Simultaneously calculate multiple digests (md5, sha256)", http://unix.stackexchange.com/q/163747/8250 This implementation has a simple single-threaded class (Hasher) and a multi-threaded one. Currently uses the multithreading.Queue interface.
2014-10-24notifyudp.pl: do not ping for every public msgPeter Wu1-3/+10
Send a notification only if a highlight is found (e.g. when you are mentioned).
2014-09-27tmp-upload: display single-upload error messagePeter Wu1-1/+1
2014-09-27xxd-a: xxd -a, but for more duplicatesPeter Wu1-0/+3
mtime: 19 July 2013
2014-07-05gerrit-add-reviewers: helper to add reviewers for commitsPeter Wu1-0/+131
Originally I wanted it to be a git-review post-review hook, but there seems to be no way to get the most recently pushed commits.
2014-06-19interrupts-graph.py: make selection largerPeter Wu1-12/+32
Just changing the marker does not make selections more apparent. Increase line thickness and zorder to increase visibility.
2014-06-18interrupts-graph.py: conditionally update domainPeter Wu1-2/+9
Do not update domain if looking at a previous part, or if the new line fits in the current graph. This makes it easier to look at older data while updating the plot.
2014-06-18interrupts-graph.py: add --log and --no-smoothPeter Wu1-1/+8
2014-06-18interrupt-graph.py: fix double update; read fullyPeter Wu1-13/+16
get_diffs() was called in update(), but that would invalidate numbers. Now the input file is fully read (allows moving).
2014-06-18interrupts-graph.py: args for xrange and intervalPeter Wu1-0/+8
2014-06-18interrupts-graph.py: Allow unbounded x historyPeter Wu1-3/+13
2014-06-18interrupts-graph.py: prepare for optional dequePeter Wu1-5/+7
2014-06-18interrupts-graph.py: implement read/write to filePeter Wu1-2/+26