Skip to content

Instantly share code, notes, and snippets.

View k-bx's full-sized avatar

Kostia R k-bx

View GitHub Profile
@jwbee
jwbee / jq.md
Last active April 5, 2025 13:06
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

@cGandom
cGandom / RaspberryPi4-qemu.md
Last active April 18, 2025 16:06
Emulating Raspberry Pi 4 with Qemu

Emulating Raspberry Pi 4 with Qemu

Just a quick update before we dive in: what we're actually doing here is running Raspberry Pi OS (64-bit) on a QEMU virtual ARM setup. This isn't full-blown hardware emulation of the Raspberry Pi 4, but more about creating a virtual environment for the OS. It doesn't mimic all the specific hardware features of the Pi 4, but it's pretty useful and great for general testing. I turned to this solution mainly to extract a modified sysroot from the Raspberry Pi OS, something not readily available in other resources. For those looking into detailed emulation of the actual Raspberry Pi 4's hardware in QEMU, check out this link for the latest updates: https://gitlab.com/qemu-project/qemu/-/issues/1208.

Hope it helps! :D

Shortcomings: No GUI yet, only console.

Steps

@akihikodaki
akihikodaki / README.en.md
Last active April 14, 2025 16:19
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@AndyShiue
AndyShiue / CuTT.md
Last active January 29, 2025 14:35
Cubical type theory for dummies

I think I’ve figured out most parts of the cubical type theory papers; I’m going to take a shot to explain it informally in the format of Q&As. I prefer using syntax or terminologies that fit better rather than the more standard ones.

Q: What is cubical type theory?

A: It’s a type theory giving homotopy type theory its computational meaning.

Q: What is homotopy type theory then?

A: It’s traditional type theory (which refers to Martin-Löf type theory in this Q&A) augmented with higher inductive types and the univalence axiom.

@mikaelhg
mikaelhg / 01_pkcs12-cacerts-workaround.sh
Last active January 17, 2025 07:11
Workaround for java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
# Ubuntu 18.04 and various Docker images such as openjdk:9-jdk throw exceptions when
# Java applications use SSL and HTTPS, because Java 9 changed a file format, if you
# create that file from scratch, like Debian / Ubuntu do.
#
# Before applying, run your application with the Java command line parameter
# java -Djavax.net.ssl.trustStorePassword=changeit ...
# to verify that this workaround is relevant to your particular issue.
#
# The parameter by itself can be used as a workaround, as well.
@jwalgran
jwalgran / ch19.md
Created November 21, 2017 21:57
Haskell Programming Chapter 19 Notes

Chapter 19 - Applying structure

19.1 Applied structure

A big change of pace from previous chapters. A guided safari through a jungle of real projects.

19.2 Monoid

Templating content in Scotty

@matthewjberger
matthewjberger / instructions.md
Last active April 20, 2025 02:17
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@UnkindPartition
UnkindPartition / results
Created January 11, 2017 10:19
forM_ speed test
benchmarking vec base
time 15.54 μs (15.43 μs .. 15.63 μs)
1.000 R² (1.000 R² .. 1.000 R²)
mean 15.45 μs (15.40 μs .. 15.51 μs)
std dev 180.4 ns (157.0 ns .. 209.1 ns)
benchmarking vec roman
time 16.86 μs (16.77 μs .. 16.95 μs)
1.000 R² (1.000 R² .. 1.000 R²)
mean 16.86 μs (16.81 μs .. 16.92 μs)
@imjasonh
imjasonh / markdown.css
Last active January 3, 2025 20:15
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@martijnvermaat
martijnvermaat / raspberry-pi-config.md
Last active February 3, 2023 01:53
Notes on my Raspberry Pi server config

Notes on my Raspberry Pi server config

This describes how I installed and configured my Raspberry Pi model B (512MB).

The Pi is mainly used as SSH jump host, IRC client, Git server, backup fileserver, etc. It doesn't need stellar performance, it just has to be cheap, low in power usage, and secure.

Raspbian on encrypted root