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
@FFY00
FFY00 / grafico-densidade.sh
Last active June 1, 2019 17:03
Pauta de Tecnologias de Internet
#!/bin/sh
pdftotext -layout "$@" - | sed -e '/^[0-9][0-9][0-9][0-9][0-9][0-9]/!d' -e 's|,|\.|g' -e '/FALTOU/d'| awk -F '[[:space:]][[:space:]]+' '{print $4}' | R -e 'd <- density(scan(file("stdin"))); plot(d, main="Notas de SI"); polygon(d, col="red")'
@FFY00
FFY00 / Makefile
Last active June 12, 2019 15:33
My resolution of the S.O. 2nd Practical Test
CFLAGS :=$(CFLAGS) -Wall -Wextra -std=c99 -pedantic -ggdb
LDFLAGS :=$(LDFLAGS) #-lm -pthread
PROGRAM =is_ASCII
SRCDIR =source
INCDIR =include
OUTDIR =out
SRCS :=$(wildcard $(SRCDIR)/*.c)
@FFY00
FFY00 / PKGBUILD.discord-canary.sh
Last active June 15, 2019 10:18
Discord PKGBUILDs
# Maintainer: Filipe Laíns (FFY00) <[email protected]>
pkgname=discord-canary
_pkgname=DiscordCanary
pkgver=0.0.82
pkgrel=4
pkgdesc="All-in-one voice and text chat for gamers that's free and secure. (canary build)"
arch=('x86_64')
url='https://discordapp.com'
license=('custom')
@FFY00
FFY00 / openapi.yml
Created August 6, 2019 09:38
Sample OpenAPI specification that uses anyOf in the request parameters
openapi: 3.0.0
servers:
- url: 'http://localhost:8080'
info:
version: 0.0.1
title: ratbag-emu
license:
name: MIT
url: 'https://raw.githubusercontent.com/libratbag/ratbag-emu/master/LICENSE'
@FFY00
FFY00 / ratbag-emu-server-fixture.py
Created September 20, 2019 14:54
ratbag-emu server fixture with random port
@pytest.fixture(autouse=True, scope='session')
@pytest.mark.first
def server(self, port_range=[9000, 9999]):
p = port = None
try:
stdout = open('ratbag-emu-log-stdout.txt', 'w')
stderr = open('ratbag-emu-log-stderr.txt', 'w')
def try_port(port):
ret = False
@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 / remove-watermark.sh
Created November 14, 2019 02:06
Remove watermark pdf
#!/bin/sh
pdftk $1 output fixed.pdf
pdftk fixed.pdf output uncompressed.pdf uncompress
sed -e 's|/Watermark||g' -e 's|<.*WatermarkSettings.*>||g' uncompressed.pdf > unwatermarked.pdf
pdftk unwatermarked.pdf output compressed.pdf compress
@FFY00
FFY00 / kernel-dev.md
Last active January 9, 2020 23:38
Kernel Development Setup
  1. Create the disk

Let's create a raw disk (you can use other tools like dd too)

qemu-img create -f raw kernel-dev.img 20G

Now install the system

@FFY00
FFY00 / noted.md
Created April 14, 2020 17:30
SymbiFlow meeting #1

SymbiFlow meeting #1

  • What is the current state/timeline?

  • GCC for FPGAs

    • Correct build system
      • Follows the Filesystem Hierarchy Standard (FHS)
        • Allows setting prefix (/usr/local for users, /usr for distributions)
        • Allows setting libdir (lib , lib32 or lib64, distribution dependent)
  • Allows setting libexecdir (if used)

#!/usr/bin/python
import inspect
def introspect(obj, prefix=None, filter_underscore=False, walked=set()):
try:
for el in inspect.getmembers(obj):
name, child_obj = el