Skip to content

Instantly share code, notes, and snippets.

View Solarflame5's full-sized avatar

Solarflame Solarflame5

  • Turkey
  • 13:17 (UTC +03:00)
View GitHub Profile
#!/usr/bin/env python3
# Download your data dump and place this file in the "messages" folder of your data dump.
# Run it using python
from datetime import datetime, timedelta, timezone
import dateutil.parser
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.dates as mdates
import csv
@aileftech
aileftech / hex-colors.txt
Created October 1, 2022 18:10
A Bash one-liner to produce a list of HEX color codes that read like (supposedly) valid English words
$ grep -P "^[ABCDEFabcdefOoIi]{6,6}$" /usr/share/dict/words | tr 'OoIi' '0011' | tr '[:lower:]' '[:upper:]' | awk '{print "#" $0}'
#ACAD1A
#B0BB1E
#DEBB1E
#AB1DED
#ACAC1A
#ACCEDE
#AC1D1C
#BAB1ED
#BA0BAB
@MCJack123
MCJack123 / sane-api.md
Created June 6, 2022 04:13
On Writing a Sane API

On Writing a Sane API

Over my years on the ComputerCraft Discord server, I've had the opportunity to witness the creation of numerous APIs/libraries of all sorts. I've gotten to examine these APIs in depth, as well as answer questions involving the APIs that the creators or users have. As an API designer myself, I compare the designs of other APIs with my designs, and I've noticed a number of patterns that make or break an API design. I've seen plenty of designs that make me go "WTF???", and lots that I just can't understand, even at my advanced level of programming (not to toot my own horn).

This article outlines some rules for making a sane API, which is easy to use, understandable, and doesn't make the user spin in circles to make things with it. Note that when I use the term "API", I'm primarily referring to code libraries and their public interfaces, but a number of points can be applied to web APIs as well. Since I have the most experience in Lua APIs, I'll be focu

.subviewbutton:not(.subviewbutton-iconic, [image], .all-tabs-close-button) > image {
width: 16px;
height: 16px;
margin-inline-end: 8px !important;
-moz-context-properties: fill;
fill: currentColor;
}
#overflowMenu-customize-button > .toolbarbutton-icon {
margin-inline-end: 0.5em !important;
@LnLcFlx
LnLcFlx / archlogo.txt
Last active May 17, 2024 03:11
Arch Linux logo using unicode block characters
\033[38;2;23;147;209m ▄
▟█▙
▟███▙
▟█████▙
▟███████▙
▂▔▀▜██████▙
▟██▅▂▝▜█████▙
▟█████████████▙
▟███████████████▙
▟█████████████████▙
@Mordenkainen
Mordenkainen / Regrowth Tips.md
Last active June 30, 2024 13:54
Regrowth Tips and Tricks

Picking A Place For Your First Base:

  • Near an Ocean is a must. The ocean is an easy source of food and usually has clay and red sand deposits around the shore. These easy to get early resources can speed progression quite a bit.
  • Try to be near a Witchery Wicker Man. The wheat you can get from the hay bales that make it up will provide enough bread to meet all of your food needs until you have been able to breed the plants needed for magical food. Also, these have a spawner under them. If it is a zombie spawner, it makes for a good source of zombie flesh for leather until you can breed cows, and if it is a skelly spawner the early bonemeal is a godsend.
  • Near a surface lava pool. This is actually a pretty important one. Fairly early on you will need a good amount of lava, and being able to get it without a lot of mining is nice.
  • Near a Witchery Henge (the stone rings) can also be helpful as they often have witch spawners and witches drop all sorts of items that can help progress faster (they also conta