Skip to content

Instantly share code, notes, and snippets.

View v-borg's full-sized avatar

Victor Borges v-borg

  • Freelancer
  • Passos, Minas Gerais
  • 12:58 (UTC -03:00)
View GitHub Profile
@bashbunni
bashbunni / .zshrc
Last active April 30, 2026 18:58
CLI Pomodoro for Linux (zsh)
# study stream aliases
# Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro
declare -A pomo_options
pomo_options["work"]="45"
pomo_options["break"]="10"
pomodoro () {
if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then
val=$1
@gszauer
gszauer / Font.cpp
Last active February 28, 2026 08:22
Minimal ttf parser and rasterizer
#define _CRT_SECURE_NO_WARNINGS
#include "Font.h"
#include <tuple>
using std::vector;
using std::tuple;
using std::get;
void DrawPixel(i32 x, i32 y, u8 r, u8 g, u8 b);
@ChristopherA8
ChristopherA8 / png.c
Created July 30, 2021 05:34
Creating a png image from scratch
/*
*
* Generate a png image from scratch
*
* Author: Christopher A
* Date: July 29, 2021
*
*/
#include <stdio.h>
@jfuerth
jfuerth / egl_bar.c
Last active October 16, 2025 10:58
Self-contained example of an EGL + X11 OpenGL ES 2.0 rectangle moving across the screen
// egl_bar.c - self-contained example of a vertical bar moving across the screen.
// compile with gcc -Wall -O0 -g -o egl_bar egl_bar.c log.c -lX11 -lEGL -lGLESv2 -lm
#include <stdio.h>
#include <math.h>
#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@sts10
sts10 / kitty.conf
Created January 16, 2020 20:24
My config file for Kitty Terminal Emulator
# vim:fileencoding=utf-8:ft=conf:foldmethod=marker
#: Fonts {{{
#: kitty has very powerful font management. You can configure
#: individual font faces and even specify special fonts for particular
#: characters.
font_family JetBrains Mono Medium
bold_font JetBrains Mono Bold
@ZeVS777
ZeVS777 / Mesh.cpp
Last active January 28, 2025 23:00
Udemy - Computer Graphics with Modern OpenGL and C++ / code files after 02 - Beginner 016 CODING Clean Up
#include "Mesh.h"
Mesh::Mesh()
{
VAO = 0, VBO = 0, IBO = 0, indexCount = 0;
}
void Mesh::CreateMesh(GLfloat* vertices, unsigned int* indices, unsigned int numOfVertices, unsigned int numOfIndices)
{
indexCount = numOfIndices;
@heroheman
heroheman / ranger-cheatsheet.md
Last active April 18, 2026 21:21
Ranger Cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts
@x3ek
x3ek / sdl_nanovg_example.cpp
Last active April 10, 2026 12:20
SDL + GLAD + OpenGL + NanoVG Example in C++
#include <SDL.h>
#include <glad\glad.h>
#include <nanovg.h>
#define NANOVG_GL3_IMPLEMENTATION
#include <nanovg_gl.h>
#include <nanovg_gl_utils.h> // For framebuffer utilities not shown in this code
#include <string>
#include <iostream>
#include <iomanip> // for setw
@rickyzhang82
rickyzhang82 / keycode.linux
Created September 15, 2017 22:11
Key code for Linux
# /usr/share/BasiliskII/keycodes
#
# Basilisk II (C) 1997-2005 Christian Bauer
#
# This file is used to translate the (server-specific) scancodes to
# Mac keycodes depending on the window server being used.
#
# The format of this file is as follows:
#
# sdl <driver string>
@jra101
jra101 / Makefile
Last active November 4, 2020 21:21
Minimal OpenGL on Linux
MAIN = triangle
CC = g++
CFLAGS = -DLINUX -std=c++0x -Wall -Wextra -Werror -g
LFLAGS = -lX11 -lGL
SRCS = main.cpp
OBJS = $(SRCS:.cpp=.o)
DEPS = $(OBJS:.o=.d)
all: $(MAIN)