Skip to content

Instantly share code, notes, and snippets.

View Gabrielcarvfer's full-sized avatar

Gabriel Ferreira Gabrielcarvfer

View GitHub Profile
// ==UserScript==
// @name GitLab Color Transforms
// @namespace gitlab-color-transforms
// @version 1.3.0
// @description Modular, registry-based value transforms (color swaps, CSS overrides) for GitLab pages
// @match https://gitlab.com/*
// @match https://gitlab.example.org/*
// @run-at document-idle
// @grant GM_xmlhttpRequest
// @connect *
@Gabrielcarvfer
Gabrielcarvfer / gitlab-open-closed-items.user.js
Last active October 7, 2026 13:07
GitLab: Open/Closed items instead of Work items
// ==UserScript==
// @name GitLab: Open/Closed items instead of Work items
// @namespace gitlab-open-closed-items
// @version 1.2.1
// @description Replaces "Work items" in the left sidebar with "Open issues" and "Closed issues" links
// @match https://gitlab.com/*
// @match https://gitlab.example.org/*
// @run-at document-idle
// @grant none
// ==/UserScript==
apt install build-essential flex bison pkg-config libssl-dev \
libelf-dev libdw-dev libunwind-dev libaudit-dev libbabeltrace-ctf-dev \
libtraceevent-dev libnuma-dev libpfm4-dev libslang2-dev systemtap-sdt-dev \
libdebuginfod-dev python3 python3-dev libpython3-dev libperl-dev openjdk-17-jdk \
hotspot
git clone https://github.com/microsoft/WSL2-Linux-Kernel --depth 1
cd WSL2-Linux-Kernel/tools/perf
make -j8
sudo cp perf /usr/local/bin
@Gabrielcarvfer
Gabrielcarvfer / gitlab_disable_issue_drawer_link_hijacking.js
Created April 7, 2025 22:28
Disable new GitLab issue drawer link hijacking
@Gabrielcarvfer
Gabrielcarvfer / gitlab_navigation_userscript.js
Last active September 14, 2025 18:21
Make Gitlab navigation less bad, like it was in the past
// ==UserScript==
// @name Make Gitlab navigation great again
// @namespace http://tampermonkey.net/
// @version 0.9
// @description Trying to make the new Gitlab navigation feel less crappy
// @author Gabriel Ferreira
// @match https://gitlab.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=gitlab.com
// @grant none
// ==/UserScript==
@Gabrielcarvfer
Gabrielcarvfer / launch_sims.py
Last active July 6, 2022 22:18
launch_sims.py
import pickle
import os
import glob
import subprocess
import lzma
# Simulation_path is the CWD for the simulation (where results will be saved)
# Base_dir is the path to the directory containing the simulation program
# args is a list of arguments for the simulation program
def execute_simulation(simulation_path, base_dir, args):
#include <cmath>
#include <ns3/core-module.h>
#include <ns3/mobility-module.h>
#include <ns3/netanim-module.h>
using namespace ns3;
Vector polarToRectangular(double radius, double theta, double offsetx, double offsety)
{
@Gabrielcarvfer
Gabrielcarvfer / Latex2Markdown.py
Created August 31, 2021 23:20
Latex2Markdown.py script for alshedivat/al-folio theme
#!/usr/bin/python3
#
# Latex2Markdown
#
# Copyright (C) 2021 Gabriel Ferreira
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
@Gabrielcarvfer
Gabrielcarvfer / fetch_cases_covid19_g1.py
Last active March 24, 2020 20:50
Fetch COVID-19 cases from the G1 website
import requests
import json
from datetime import datetime
import csv
import sys
#G1 source https://especiais.g1.globo.com/bemestar/coronavirus/mapa-coronavirus/
urlBrazilMap = "https://especiais.g1.globo.com/bemestar/coronavirus/mapa-coronavirus/data/brazil-map.json"
urlCases = "https://especiais.g1.globo.com/bemestar/coronavirus/mapa-coronavirus/data/brazil-cases.json"
@Gabrielcarvfer
Gabrielcarvfer / crawlerRottenTomatoesRiseOfSkywalker.py
Last active December 31, 2019 17:41
Rise of Skywalker rotten score
from selenium import webdriver
from scrapy import Spider
import time
#url = 'https://www.rottentomatoes.com/m/empire_strikes_back/reviews'
url = 'https://www.rottentomatoes.com/m/star_wars_the_rise_of_skywalker/reviews'
class SkywalkaSpider(Spider):
name = 'Skywalka'
allowed_domains = [url]