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
Created January 28, 2022 01:29
Wordle dictionary

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.

This gist contains the contents of the dictionary Wordle uses as of January 27th, 2022. Wordle actually uses two dictionaries:

  • La words that can be guessed and which can be the word of the day
  • Ta words that can be guessed but are never selected as the word of the 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:
@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.:

@Bilka2
Bilka2 / control.lua
Last active January 30, 2023 04:29
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,
@seanh
seanh / html_tags_you_can_use_on_github.md
Last active September 20, 2024 13:39
HTML Tags You Can Use on GitHub

HTML Tags You Can Use on GitHub

Wherever HTML is rendered on GitHub (gists, README files in repos, comments on issues and pull requests, ...) you can use any of the HTML elements that GitHub Flavored Markdown (GFM) provides syntactic sugar for. You can either use the syntactic sugar that GFM (or other GitHub-supported markup language you're using) provides or, since Markdown can contain raw HTML, you can enter the HTML tags manually.

But GitHub also allows you to use a few HTML elements beyond what Markdown provides by entering the tags manually, and some of them are styled with CSS. Most raw HTML tags get stripped before rendering the HTML. Those tags that can be generated by GFM syntactic sugar, plus a few more, are whitelisted. These aren't documented anywhere that I can find. Here's what I've discovered so far:

<details> and <summary>

A `<detai

@eneko
eneko / list-of-curl-options.txt
Last active September 14, 2024 06:59
List of `curl` options
$ curl --help
Usage: curl [options...] <url>
--abstract-unix-socket <path> Connect via abstract Unix domain socket
--alt-svc <file name> Enable alt-svc with this cache file
--anyauth Pick any authentication method
-a, --append Append to target file when uploading
--basic Use HTTP Basic Authentication
--cacert <file> CA certificate to verify peer against
--capath <dir> CA directory to verify peer against
-E, --cert <certificate[:password]> Client certificate file and password
@Francesco149
Francesco149 / osu_on_linux_overhaul.md
Last active July 29, 2024 03:55
Ultimate guide to low-latency osu on linux