Skip to content

Instantly share code, notes, and snippets.

View ffernandoalves's full-sized avatar
:shipit:
!

Fernando Alves ffernandoalves

:shipit:
!
View GitHub Profile
@mathix420
mathix420 / medium.user.js
Last active April 11, 2025 02:18
Bypass Medium Paywall - Working late 2023 - Greasy Fork, Violentmonkey, Tampermonkey - Click the RAW button to install
// ==UserScript==
// @name Medium Paywall Bypass
// @namespace Violentmonkey Scripts
// @run-at document-start
// @match *://*.medium.com/*
// @match *://medium.com/*
// @match *://*/*
// @grant none
// @version 2.4
// @inject-into content
@sjhalayka
sjhalayka / main.cpp
Created August 1, 2020 04:53
Bare bones GLFW + Dear Imgui
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include "dear imgui/imgui.h"
#include "dear imgui/imgui_impl_glfw.h"
#include "dear imgui/imgui_impl_opengl3.h"
// Automatically link in the GLFW and GLEW libraries if compiling on MSVC++
#ifdef _MSC_VER
#pragma comment(lib, "glew32")
@orbingol
orbingol / dynamic_attributes.py
Last active February 22, 2025 17:21
Creating dynamic attributes in Python via overriding "__getattr__" and "__setattr__" magic methods
# Illustrates creating dynamic attributes in Python
#
# For implementation details of the dynamic attributes, please see the following methods:
# - GPSPosition.__getattr__
# - GPSPosition.__setattr__
#
class GPSPosition(object):
__slots__ = ('_coords', '_attribs', '_iter_index')
@Zibri
Zibri / gitclean.sh
Last active December 8, 2024 05:38
Bash script to remove all revisions from github or gist repository.
#!/bin/bash
#
# By Zibri (2019)
#
# Usage: gitclean username password giturl
#
gitclean ()
{
odir=$PWD;
if [ "$#" -ne 3 ]; then
#include <iostream>
#include <windows.h>
#include <cstdio>
using namespace std;
typedef int tipochave;
typedef struct aux {
tipochave chave;
@Abacn
Abacn / qhulltest.cpp
Last active October 15, 2024 20:15
Calling qhull library in C++
/* Compiling command:
g++ -o Qhullex Qhullex.cpp -lqhullstatic_r -lqhullcpp
Note:
(1) this is the minimum example (user_eg3) in qhull package, also mentioned in http://www.qhull.org/html/qh-code.htm#cpp .
However, the version on the website (Dated 03/19/2019) is inconsistent with the source code and it does not pass the compiler
(2) libqhullstatic_r is the correct library to use.
* Linking to libqhull results in runtime error
"QH6248 qh_lib_check: Incorrect qhull library called. Caller uses reentrant Qhull while library is non-reentrant";
* Linking to libqhull_r results in runtime error
@rmukh
rmukh / links.md
Last active October 18, 2024 00:17
Couple of useful 3D convex hull links
from uuid import uuid4
from aiogram.types import InlineQueryResultGame
from backend.settings import BOT_TOKEN
def get_ngrok_https():
import json
import os
@Yousha
Yousha / .gitattributes
Last active May 16, 2024 17:23
.gitattributes for C/C++ developers.
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf
@aaangeletakis
aaangeletakis / How-To-Install-SDL-On-Ubuntu.md
Last active January 14, 2025 12:13
How do I install SDL on ubuntu?

What you need to do to install SDL is:

#install sdl2
sudo apt install libsdl2-dev libsdl2-2.0-0 -y;

#install sdl image  - if you want to display images
sudo apt install libjpeg-dev libwebp-dev libtiff5-dev libsdl2-image-dev libsdl2-image-2.0-0 -y;

#install sdl mixer  - if you want sound