Skip to content

Instantly share code, notes, and snippets.

View c-smile's full-sized avatar

Andrew c-smile

View GitHub Profile
@c-smile
c-smile / dib32.cpp
Created November 24, 2016 18:20
DIB (device independent bitmap) combined with HDC (device context)
#include <windows.h>
class dib32
{
const unsigned _width;
const unsigned _height;
void* _bits;
mutable HBITMAP _old_bitmap;
mutable HDC _dc;
HBITMAP _bitmap;
@c-smile
c-smile / md.tis
Last active May 19, 2019 03:22
Sciter: HTML to Markdown
namespace MD {
function makeTextStream() {
var out = []; // lines
var curl = ""; // current line
var curo = 0; // current line offset (a.k.a. level)
function outPrefix(text, level = 0) {
if(curl) out.push(curl);