Skip to content

Instantly share code, notes, and snippets.

View FFY00's full-sized avatar
🌈
struggling to live

Filipe Laíns FFY00

🌈
struggling to live
View GitHub Profile
import collections.abc
match []:
case collections.abc.Iterable():
print('iterable!')
case _:
print('default :/')
@FFY00
FFY00 / boot-log.txt
Last active April 1, 2024 20:23
Meraki GR10 Logs
U-Boot 2017.07-RELEASE-g78ed34f31579 (Sep 29 2017 - 07:43:44 -0700)
DRAM: 242 MiB
machid : 0x8010001
Product: meraki_Maggot
NAND: ONFI device found
128 MiB
Using default environment
In: serial
@FFY00
FFY00 / tracker-list.txt
Last active March 22, 2024 10:13
Torrent Trackers
http://104.28.1.30:8080/announce
http://104.28.16.69/announce
http://107.150.14.110:6969/announce
http://109.121.134.121:1337/announce
http://114.55.113.60:6969/announce
@FFY00
FFY00 / resize.py
Created January 24, 2023 23:55
Resize WEBP animations
import argparse
import textwrap
from PIL import Image, ImageSequence
def main() -> None:
parser = argparse.ArgumentParser(
description=textwrap.indent(
textwrap.dedent(
@FFY00
FFY00 / monitor.py
Last active February 7, 2024 01:51
from __future__ import annotations
import concurrent.futures
import contextlib
import datetime
import decimal
import functools
import time
import threading
import traceback
Platform: "linux-x86_64"
Python version: "3.11"
Current installation scheme: "posix_prefix"
Paths:
data = "/usr"
include = "/usr/include/python3.11"
platinclude = "/usr/include/python3.11"
platlib = "/usr/lib/python3.11/site-packages"
platstdlib = "/usr/lib/python3.11"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Version matching

General approach for this kind of standards:

  • Optimize for the most use-cases
  • Provide a escape hatch for use-cases our general approach doesn't work

Background

@FFY00
FFY00 / grafico-densidade.sh
Last active January 8, 2023 01:50
Pauta Sistemas Operativos - 1ª Prova Prática
#!/bin/bash
pdftotext -layout "$@" - | sed -e '/^ [0-9][0-9][0-9][0-9][0-9][0-9]/!d' -e 's|,|\.|g'| awk -F '[[:space:]][[:space:]]+' '{print $6}' | R -e 'd <- density(scan(file("stdin"))); plot(d, main="Notas de SO"); polygon(d, col="red")'
@FFY00
FFY00 / gist:d3c969764b72e8c5214202afd190a52e
Created November 17, 2022 18:42
Load package resources contents
$ tree
.
└── package
├── a
├── b
└── c
1 directory, 3 files
$ python
Python 3.10.8 (main, Nov 1 2022, 14:18:21) [GCC 12.2.0] on linux