Skip to content

Instantly share code, notes, and snippets.

@schenkmi
schenkmi / jq.md
Created March 20, 2025 07:21 — forked from jwbee/jq.md
Make Ubuntu packages 90% faster by rebuilding them

Make Ubuntu packages 90% faster by rebuilding them

TL;DR

You can take the same source code package that Ubuntu uses to build jq, compile it again, and realize 90% better performance.

Setting

I use jq for processing GeoJSON files and other open data offered in JSON format. Today I am working with a 500MB GeoJSON file that contains the Alameda County Assessor's parcel map. I want to run a query that prints the city for every parcel worth more than a threshold amount. The program is

@schenkmi
schenkmi / preseed-default-debian11.host
Last active June 20, 2022 13:52
Debian 11 default preseed
#_preseed_V1
# Localization
###########################################
d-i debian-installer/language string en
d-i debian-installer/country string US
#d-i debian-installer/country string CH
d-i debian-installer/locale string en_US.UTF-8
d-i keyboard-configuration/xkb-keymap select us
@schenkmi
schenkmi / preseed-debian11.host
Last active June 20, 2022 09:44
preseed-debian11.host
#_preseed_V1
# Localization
###########################################
d-i debian-installer/language string en
d-i debian-installer/country string CH
d-i debian-installer/locale string en_US.UTF-8
d-i keyboard-configuration/xkb-keymap select ch
@schenkmi
schenkmi / git_rebase.md
Created September 14, 2020 07:15
GIT Rebase from upstream

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

Download current IndexByDate.txt from http://www.bitsavers.org/components/
wget http://www.bitsavers.org/components/IndexByDate.txt
Delete old stuff and do
for val in `awk '{print $3}' IndexByDate.txt`;do wget -x -nH http://www.bitsavers.org/components/$val; done