Skip to content

Instantly share code, notes, and snippets.

@bert
bert / README
Created July 15, 2011 21:01
Bresenham Algorithms in C
Some possible implementations of the Bresenham Algorithms in C.
The Bresenham line algorithm is an algorithm which determines which points in an
n-dimensional raster should be plotted in order to form a close approximation
to a straight line between two given points.
It is commonly used to draw lines on a computer screen, as it uses only integer
addition, subtraction and bit shifting, all of which are very cheap operations
in standard computer architectures.
It is one of the earliest algorithms developed in the field of computer graphics.
A minor extension to the original algorithm also deals with drawing circles.
@pezz
pezz / renoise.md
Last active September 7, 2025 14:56
How to use Renoise on a system without f*#$ing it over and doing your head in
@Twinklebear
Twinklebear / main.cpp
Last active June 27, 2025 01:14
Example of render to texture with SDL2
#include <iostream>
#ifdef __linux__
#include <SDL2/SDL.h>
#elif defined(_WIN32)
#include <SDL.h>
#endif
const int WIN_WIDTH = 640;
const int WIN_HEIGHT = 480;
@staltz
staltz / introrx.md
Last active August 2, 2026 17:36
The introduction to Reactive Programming you've been missing
@X-Raym
X-Raym / ReaScriptLesson03-VolumeConversion.lua
Last active December 7, 2024 08:58
ReaScript Lua Tutorial
---------------- Old Version :
vol_dB = 20 * ( math.log( vol_log, 10 ) )
vol_log = math.exp( vol_dB * 0.115129254 )
---------------- New Version :
-- Mod from SPK77
-- http://forum.cockos.com/showpost.php?p=1608719&postcount=6
@hed0rah
hed0rah / gcc-security.txt
Last active April 8, 2026 17:16
GCC security related flags reference.
GCC security related flags reference.
Source material:
http://security.stackexchange.com/questions/24444/what-is-the-most-hardened-set-of-options-for-gcc-compiling-c-c
https://wiki.gentoo.org/wiki/Hardened_Gentoo
https://wiki.debian.org/Hardening
===================================================================================
GCC Security related flags and options:
@Dalimil
Dalimil / Vector2.js
Created July 11, 2016 15:56
Basic Vector2 JavaScript Math Helper Class
function Vector2(x, y) {
this.x = (x === undefined) ? 0 : x;
this.y = (y === undefined) ? 0 : y;
}
Vector2.prototype = {
set: function(x, y) {
this.x = x || 0;
this.y = y || 0;
},
@pabloasanchez
pabloasanchez / Tab Context.sublime-menu
Last active December 21, 2020 23:20
Sublime Text 3 Plugin: Close all saved tabs
[
{ "caption": "-" },
{ "command": "close_saved", "caption": "Close Saved Files" }
]
@michael-lazar
michael-lazar / alternatives_to_rtv.md
Last active June 18, 2026 17:19
Alternatives to RTV
@joseluisq
joseluisq / resize_disk_image.md
Last active July 10, 2026 15:59
How to resize a qcow2 disk image on Linux

How to resize a qcow2 disk image on Linux

This example takes olddisk.qcow2 and resizes it into newdisk.qcow2, extending one of the guest's partitions to fill the extra space.

1. qcow2 format

1.1. Verify the filesystems of olddisk.qcow2