Skip to content

Instantly share code, notes, and snippets.

View lucasew's full-sized avatar
🤓
Learning

Lucas Eduardo lucasew

🤓
Learning
  • Universidade Tecnológica Federal do Paraná
  • Santa Helena - PR
View GitHub Profile
@lucasew
lucasew / maracutaia.sh
Created January 17, 2024 20:43
Command I used to generate the PostgreSQL command to insert the watched videos in my Invidious instance from the Takeout dump of YouTube.
# Get yours by using the following query: `select email from users;`
YOUR_USER=lucas59356@gmail.com
HISTORY_FILE_YOUTUBE=histórico\ de\ visualizações.html
# Basically it parses all YouTube video ids on the HTML file and generates a query to insert on Invidious.
# As far as I tested there are no issues of having duplicated items on that array.
# On my instance I run postgres bare metal instead of containers so it allows me to login as the postgres
# user by having a shell opened in the context of that user. This can be achieved with the `sudo su - postgres`
# then start psql to get the database shell, from that change to the invidious database with `\c invidious` and then
# you are ready to paste the query.
@lucasew
lucasew / nix-epsxe.md
Created May 5, 2023 03:55
epsxe wip package in nix
{ stdenvNoCC
, fetchzip
, autoPatchelfHook
, unzip
, libstdcxx5
, SDL
, SDL_ttf
, gtk3
, gdk-pixbuf
@lucasew
lucasew / sleepless.ldif
Created October 1, 2022 17:12
The LDIF file you are probably looking for
# this glorious ldif file defines two users that can be logged in with a Linux machine
# tested with Ubuntu Mate 22.04 in a VM using osixia's container to bootstrap the OpenLDAP server
dn: ou=People,dc=example,dc=com
changetype: add
objectClass: organizationalUnit
ou: People
dn: ou=Groups,dc=example,dc=com
changetype: add
objectClass: organizationalUnit
@lucasew
lucasew / normalize.js
Created September 20, 2021 00:32
Script to convert Google Tasks takeout export to CSV
#! /usr/bin/env node
const fs = require('fs')
const [, inputFile] = process.argv
const input = fs.readFileSync("./Tasks.json")
const data = JSON.parse(input)
function columnify(...columns) {
return ",".concat(columns.map((c) => `"${c}"`))
@lucasew
lucasew / main.nix
Last active May 24, 2021 19:56
THE TEST (entrypoint is then)
# https://app.codility.com/programmers/lessons/3-time_complexity/tape_equilibrium/
with builtins;
rec {
theFn = l:
theFnRecur l 0;
theFnRecur = l: i:
let
len = length l;
in if len >= i then
@lucasew
lucasew / 0.txt
Created April 7, 2021 18:10
Teste
trabson
@lucasew
lucasew / keybase.md
Created October 20, 2019 01:00
Keybase Proof

Keybase proof

I hereby claim:

  • I am lucasew on github.
  • I am lucasew (https://keybase.io/lucasew) on keybase.
  • I have a public key whose fingerprint is 0960 C62B FF1F AB6A 564D 833B D51A 9603 FA32 04DB

To claim this, I am signing this object: