THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
//// TODO :: 3. Clean up | |
//// 4. Events | |
//// 5. Create a colormap | |
//// 6. glx ? | |
#ifdef DEBUG | |
#include <sys/socket.h> | |
#include <sys/ioctl.h> | |
#include <sys/un.h> | |
#include <sys/select.h> |
/* The world's smallest Brainfuck interpreter in C, by Kang Seonghoon | |
* http://j.mearie.org/post/1181041789/brainfuck-interpreter-in-2-lines-of-c */ | |
s[99],*r=s,*d,c;main(a,b){char*v=1[d=b];for(;c=*v++%93;)for(b=c&2,b=c%7?a&&(c&17 | |
?c&1?(*r+=b-1):(r+=b-1):syscall(4-!b,b,r,1),0):v;b&&c|a**r;v=d)main(!c,&a);d=v;} |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
//xcr.c | |
//cc -o xcr $(pkg-config --cflags --libs cairo xcb xcb-icccm) xcr.c -lcairo -lxcb -lxcb-icccm | |
#include <stdlib.h> | |
#include <string.h> | |
#include <cairo.h> | |
#include <cairo-xcb.h> | |
#include <xcb/xcb.h> | |
#include <xcb/xcb_image.h> | |
#include <xcb/xcb_aux.h> | |
#include <xcb/xcb_icccm.h> |
typedef char C; | |
typedef long I; | |
typedef struct a { | |
I t,r,d[3],p[2]; | |
}* A; | |
#define P printf |
// Based on http://www.jsoftware.com/jwiki/Essays/Incunabulum | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
typedef struct a { | |
long t; | |
long r; | |
long d[3]; | |
long p[2]; |
This is pretty out of date now... you may want to look elsewhere
Newer guides than mine (mine is a bit dated and has a lot of rough edges):
Have you looked at these?
// ---- loading a font | |
static void load_font(void) | |
{ | |
hb_blob_t *blob; | |
hb_face_t *face; | |
size_t filelen = 0; | |
void *filedata = stb_file("c:/windows/fonts/arial.ttf", &filelen); | |
if (filedata == 0) stbpg_fatal("Couldn't load font"); |