Skip to content

Instantly share code, notes, and snippets.

View angww's full-sized avatar
🎯
Focusing

Angelo Araujo angww

🎯
Focusing
View GitHub Profile
@angww
angww / Cubieboard_A20_GPIO_test.c
Last active March 28, 2021 05:08
This snippet code is to test GPIO on Cubieboard A20
/*
This snippet code is to test GPIO on Cubieboard A20.
The main loop blinks two LEDs waiting a button click (conected in PORT_BTN) via interrupt,
using funcion poll and wont consuming 100% of cpu.
This code was tested with:
* Cubiebord A20 (armv7)
* Armbian 21.02.3 (Ubuntu based)
@angww
angww / keybase.md
Last active February 29, 2020 01:22

Keybase proof

I hereby claim:

  • I am angww on github.
  • I am angw (https://keybase.io/angw) on keybase.
  • I have a public key ASCuXSi5ZgA621iun7-OpkQalumR92W9Pwq6KjcNmT-qDwo

To claim this, I am signing this object:

@angww
angww / cssinliner.py
Created September 30, 2019 02:34
Small program to automate workflow
#pip install premailer
import sys
from premailer import transform
if len(sys.argv) < 2:
print("Falta o agumento 1. Arquivo HTML de entrada.")
sys.exit(1)
file_in_name = str(sys.argv[1])
@angww
angww / motorola-sbv5121-scan.go
Created July 2, 2019 04:01
Scrape the old Motorola Modem SBV-5121 using chromedp for implement a log of de Internet status.
package main
import (
"context"
"log"
"strings"
"github.com/chromedp/chromedp"
)
@angww
angww / rodoviaria-portoalegre-scrapper.js
Created December 22, 2018 05:44
Web scrapper da rodoviária de Porto Alegre para arquivo CSV
const puppeteer = require('puppeteer');
const fs = require('fs');
const URL = 'http://rodoviaria-poa.com.br/institucional/php/hora.php';
/**** LIB FUNCTIONS */
const querySelectorFrom = (selector, elements) => {
const elementsArr = [...elements];
return [...document.querySelectorAll(selector)]
.filter(elm => elementsArr.includes(elm));
};
package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"os"
"os/exec"