Skip to content

Instantly share code, notes, and snippets.

View gecko0307's full-sized avatar
💭
I may be slow to respond.

Timur Gafarov gecko0307

💭
I may be slow to respond.
View GitHub Profile
@gecko0307
gecko0307 / main.d
Last active February 23, 2020 09:56
dlib text rendering example
/*
* dlib text rendering example
* Based on the code by Oleg Baharev (aquaratixc)
* https://lhs-blog.info/programming/dlang/dobavlyaem-tekst-na-izobrazheniya-v-dlib/
*/
module main;
import dlib.image;
import dlib.math;
@gecko0307
gecko0307 / codding.d
Created March 22, 2015 17:58
CRC32 hash collision: 'gnu' and 'codding'
module codding;
/*
* Demonstration of 'gnu' and 'codding' hash collision for CRC32
*/
import std.range;
uint crc32(R)(R range, uint inCrc = 0) if (isInputRange!R)
{
@gecko0307
gecko0307 / 0_reuse_code.js
Created February 1, 2014 06:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
module main;
import std.c.string;
import std.zip;
import std.stdint;
// https://github.com/minexew/minexewgames-engine-public/blob/master/src/minexewgames/framework/stream.d
import stream;
class ZipMemberStream: InputStream
@gecko0307
gecko0307 / i18n.d
Created January 14, 2014 15:04
Internationalization module for D programs.
module i18n;
import std.stdio;
import std.conv;
import std.format;
import std.array;
import std.process;
import std.path;
import std.file;
import std.string;
@gecko0307
gecko0307 / inverse.d
Created August 1, 2013 08:38
Linked list inverse
import std.stdio;
struct ListElement
{
ListElement* next = null;
string datum;
}
ListElement* reverse(ListElement* head)
{