Skip to content

Instantly share code, notes, and snippets.

@letanure
letanure / estados-cidades.json
Last active June 20, 2025 10:53
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@SeanHood
SeanHood / README.md
Last active June 20, 2025 10:52
Vendoring Python dependencies for the lazy

Vendoring Python dependencies for the lazy

Say I've written a script in Python and want to ship the whole thing in a single directory/tarball to a machine without having to polute the system by running pip or yum. This is a way to do that.

# Install deps into a directory called vendor
pip install -r requirements.txt --prefix vendor
@XlogicX
XlogicX / games.md
Last active June 20, 2025 10:50
List of Boot Sector Gamers

Boot Sector Games

A list of playable boot sector games, most of which are on github. Fun to play, great to learn from. There are also many cool non-booting boot sectors out there that aren't games (so more like demos), but this page is just reserved to interactive boot sectors / games. This list is also not complete, but not on purpose, it is a best effort collection of games, so if you know of any fun boot sector games, please contribute.

This page lists a collection of 31 games spanning several authors: nanochess, me, daniel-e, shikhin, JulianSlzr, XanClic, QiZD90, darkvoxels, guyhill, w-shackleton, egtzori, VileR, ish_works, franeklubi, queso_fuego, franeklubi, Jethro82, waternine9, tevoran, palma3k, taylor-hartman. peterferrie should also be mentioned as he has touched a lot of these games.

TetrOS

https://github.com/daniel-e/tetros

Tetris Clone. Full color, no score. This was one of the older boot sector games out there. ![tetros](https://gist.github.com/assets/1570856/3a0d1023-cbe6-4b4d-

@willurd
willurd / web-servers.md
Last active June 20, 2025 10:49
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
@Mathews2115
Mathews2115 / Pis_networking_cheat.md
Last active June 20, 2025 10:39
Pi networking Cheat Sheet

Goals:

  • Eliminate all hotplug/auto networking interfacing on bootup
  • Get 2 RPI3 to talk to each other, one being the Outer Pi and one being the Inner Pi
  • Outer Pi has access to the internet, inner pi can get access to the net through the Outer Pi
  • helpful links
  • (setting up wifi manually, node, etc) https://www.w3schools.com/nodejs/nodejs_raspberrypi.asp

Outer Pi (access to the internet)

  • (disable all AUTO network interfaces…we are manually configuring from here on out)
  • sudo update-rc.d dhcpcd disable
@MoyuScript
MoyuScript / 压缩脚本.sh
Last active June 20, 2025 10:29
字体压缩
#!/bin/bash
# MIT License
# Copyright (c) 2022-present MoyuScript
# See: https://mit-license.org/
echo "Input path: $1"
echo "With subset: $2"
echo "Custom text file: $3"
@kajott
kajott / vaapi_egl_interop_example.c
Last active June 20, 2025 10:27
example code for minimal-overhead hardware-accelerated video decoding and display on Linux using VA-API/EGL interoperability
#if 0 // self-compiling code: chmod +x this file and run it like a script
BINARY=vaapi_egl_interop_example
gcc -std=c99 -Wall -Wextra -pedantic -Werror -g -fsanitize=address -o $BINARY $0 \
`pkg-config libavcodec libavformat libavutil libva gl egl libdrm --cflags --libs` \
-lX11 -lva-x11 -lva-drm || exit 1
test "$1" = "--compile-only" && exit 0
exec env ASAN_OPTIONS=fast_unwind_on_malloc=0 ./$BINARY $*
#endif /*
Minimal example application for hardware video decoding on Linux and display
@smashnet
smashnet / senec.py
Last active June 20, 2025 10:25
Library to get a lot of useful data out of Senec appliances.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Library to get a lot of useful data out of Senec appliances.
Tested with: SENEC.Home V3 hybrid duo
Kudos:
* SYSTEM_STATE_NAME taken from https://github.com/mchwalisz/pysenec