Skip to content

Instantly share code, notes, and snippets.

🏳️‍🌈
writing software and breaking hardware

Filipe Laíns FFY00

🏳️‍🌈
writing software and breaking hardware
View GitHub Profile
View module-tree.py
#!/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
@FFY00
FFY00 / noted.md
Created Apr 14, 2020
SymbiFlow meeting #1
View noted.md

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)
@FFY00
FFY00 / kernel-dev.md
Last active Jan 9, 2020
Kernel Development Setup
View kernel-dev.md
  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 / remove-watermark.sh
Created Nov 14, 2019
Remove watermark pdf
View remove-watermark.sh
#!/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 / boot-log.txt
Last active Nov 5, 2019
Meraki GR10 Logs
View boot-log.txt
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 / ratbag-emu-server-fixture.py
Created Sep 20, 2019
ratbag-emu server fixture with random port
View ratbag-emu-server-fixture.py
@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 / openapi.yml
Created Aug 6, 2019
Sample OpenAPI specification that uses anyOf in the request parameters
View openapi.yml
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'
View PKGBUILD.discord-canary.sh
# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
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 / Makefile
Last active Jun 12, 2019
My resolution of the S.O. 2nd Practical Test
View Makefile
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 / grafico-densidade.sh
Last active Jun 1, 2019
Pauta de Tecnologias de Internet
View grafico-densidade.sh
#!/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")'
You can’t perform that action at this time.