Skip to content

Instantly share code, notes, and snippets.

View jxu's full-sized avatar
:shipit:
if it compiles it ships

jxu

:shipit:
if it compiles it ships
  • Wit's End
View GitHub Profile
@scholtes
scholtes / readme.md
Last active August 5, 2025 18:02
Wordle dictionary

Deprecated!

⚠This gist will remain available for posterity, but be aware that Wordle no longer uses these dictionaries.⚠

Wordle dictionary

Wordle is a web browser game that you can play at this link. You get 6 chances to guess a single 5 letter word and there is only 1 word per day.

@jakobkogler
jakobkogler / benchmark_output.txt
Created July 1, 2021 19:59
Benchmark prime sieve speed between vector<char> and vector<bool>
>> g++ -std=c++20 -Ofast benchmark_prime_sieve.cpp && ./a.out
N = 30000000:
norm: bool: 106 ms
norm: char: 235 ms
norm: bool is 2.217 times FASTER
seg: bool: 147 ms
seg: char: 38 ms
seg: bool is 3.868 times SLOWER
N = 60000000:
@x0nu11byt3
x0nu11byt3 / elf_format_cheatsheet.md
Created February 27, 2021 05:26
ELF Format Cheatsheet

ELF Format Cheatsheet

Introduction

Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.

ELF

Compilation

@atoonk
atoonk / AWS_v4prefixes.md
Last active May 10, 2025 21:52
AWS prefixes

Summary

Total number of IPv4 addresses: 100,750,168. That’s the equivalent of just over six /8’s Also see this blog: https://toonk.io/aws-and-their-billions-in-ipv4-addresses/

just for fun, let's put a value number on that

Total value at, $20 per IP: => $2,015,003,360

Total value at, $25 per IP: => $2,518,754,200

@orlp
orlp / mazejudge.py
Last active January 17, 2021 10:58
import collections
import numpy as np
import scipy.sparse
import scipy.sparse.linalg
import sys
import imageio
import io
import base64
class MazeJudge:
@shivams
shivams / textlive-full-beefless.md
Last active June 17, 2024 17:15
`texlive-full` without the beef

TLDR;

On an Debian/Ubuntu-based system, to install texlive-full without docs and language packs, simply do this:

sudo apt install `sudo apt --assume-no install texlive-full | \
		awk '/The following additional packages will be installed/{f=1;next} /Suggested packages/{f=0} f' | \
		tr ' ' '\n' | grep -vP 'doc$' | grep -vP 'texlive-lang' | grep -vP 'latex-cjk' | tr '\n' ' '`

After this, if you wish to install the language packs, selectively install them. E.g.:

@jakelevi1996
jakelevi1996 / Multiple source files in C.md
Last active September 7, 2025 04:49
Multiple source files in C.

Multiple source files in C

This Gist presents an introduction to a few different ways of working with multiple source files in C, including:

  1. Simple .c source files and .h header files compiled into a .exe
  2. First compiling into .o object files, and then linking together
  3. Makefiles
  4. Statically linked libraries
  5. Dynamically linked libraries

The concepts are demonstrated using gcc (tdm64-1) 5.1.0 on Windows 8.1, using 3 C source files (linkedlist.c, listprimes.c and main.c) and 2 header files (linkedlist.h and listprimes.h), all of which are included at the end. It is assumed that all the source files are saved in a single directory, and any terminal commands are entered in a terminal window open in that same directory.

@Bilka2
Bilka2 / control.lua
Last active September 23, 2025 12:28
Create a timelapse from a factorio replay save file
-- Just add this to the end of the control.lua file in the save file and then replay the file
-- This sequence is adjusted for https://www.speedrun.com/Factorio/run/mr87xlgy
script.on_nth_tick(300, function(event)
if event.tick < 90000 then
game.take_screenshot{
surface = game.surfaces[1],
position = {-88,-9},
resolution = {1920,1080},
zoom = 0.2,