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 / util.c
Last active December 27, 2018 19:06
Remove newline C
/**
* @brief Removes newline from string. String will end in the first newline.
*/
void remove_newline(char str[MAX_STRING])
{
int i;
for(i = 0; i < MAX_STRING; i++)
{
if(str[i] == '\n')
{
@FFY00
FFY00 / recursos.txt
Last active January 28, 2019 23:37
Algebra Linear - Recursos do Técnico
(APONTAMENTOS)
https://fenix.tecnico.ulisboa.pt/disciplinas/AL8/2013-2014/1-semestre/teoria
(VIDEOS)
MOOC Técnico: Valores Próprios – Introducao
https://www.youtube.com/watch?v=npPpVDfGGvU
@FFY00
FFY00 / hidpp-dissector.lua
Last active March 7, 2019 23:07
HID++ Dissector
-- Protocol
local hidpp_proto = Proto("hidpp", "Logitech HID++")
-- Symbols
local IF_CLASS_UNKNOWN = 0xFFFF
local HID = 0x0003
-- Definitions
-- Report
local REPORT_SHORT = 0x10
@FFY00
FFY00 / NotAnotherAnimeTheme-FFY00.theme.css
Last active September 2, 2022 08:10
My config for NotAnotherAnimeTheme
//META{"name":"NotAnotherAnimeThemeDCSL","description":"Anime theme made by puckzxz#2080 and Quake#1470, make sure you're up to date at https://goo.gl/jfR9BS , Get support here https://discord.gg/FdZhbjY","author":"puckzxz#2080 & Quake#1470","version":"2.0"}*//{}
@import url(https://8xs4qxklp8.execute-api.us-east-2.amazonaws.com/release/gorawgit?giturl=/puckzxz/NotAnotherAnimeTheme/master/css/dcsl.css);
/* To make editing this theme easier I recommend using Notepad++ , you can download it for free here - https://notepad-plus-plus.org/download/ */
/* Any images you use MUST end with .jpg or .png or any other image extension */
/* This is NOT a valid link, https://imgur.com/a/ycjL2 */
/* THIS IS A VALID LINK https://i.imgur.com/rCqnrQ7.jpg */
@FFY00
FFY00 / hibernation-lid.sh
Last active March 25, 2019 22:08
Disable wake up from hibernation on lid open
#!/bin/bash
# Script name: /lib/systemd/system-sleep/hibernation-lid.sh
# Purpose: Disable wakeup events when hibernating
if [ "$2" = "hibernate" ]; then
# Hibernating. Disabling/Re-enabling lid wakeup events.
echo LID > /proc/acpi/wakeup
fi
@FFY00
FFY00 / palindromes.c
Last active April 28, 2019 23:16
Google Kickstarter 2019 - Ex.1 Palindromes
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/* let's assume lines have a maximum of 200 characters */
#define BUF_SIZE 200
/* use binary AND to find if number is odd,
if LSB is 1 (2^0 = 1 is set) then number is odd */
#define odd(n) (n & 1)
@FFY00
FFY00 / solaar-migration.py
Last active May 2, 2019 17:35
Solaar Migration
#!/usr/bin/env python
# Requires https://github.com/PyGithub/PyGithub/pull/1107
from github import Github
from github.GithubException import UnknownObjectException
g = Github("TOKEN_HERE")
print("Logged...")
repo_from = g.get_repo('pwr/Solaar')
repo_to = g.get_repo('pwr-Solaar/Solaar')
@FFY00
FFY00 / compile.sh
Last active June 4, 2019 12:16
Call Trace (GCC)
#!/bin/bash
gcc -finstrument-functions -g -c main.c -o main.o
gcc -c trace.c -o trace.o
gcc -no-pie trace.o main.o -o main
@FFY00
FFY00 / tracker-list.txt
Last active December 12, 2024 13:12
Torrent Trackers
http://104.28.1.30:8080/announce
http://104.28.16.69/announce
http://107.150.14.110:6969/announce
http://109.121.134.121:1337/announce
http://114.55.113.60:6969/announce