This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* center radius (pixels) */ | |
#define C_RADIUS 128 | |
/* center line thickness (pixels) */ | |
#define C_LINE 1 | |
/* outline color */ | |
#define OUTLINE vec4(0.30, 0.30, 0.30, 1) | |
/* number of bars (use even values for best results) */ | |
#define NBARS 140 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn foo<T: Sized>() { | |
const foo: usize = mem::size_of::<T>() * 4; | |
} | |
fn bar<T: Sized>() { | |
let foo: usize = mem::size_of::<T>() * 4; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void | |
create_xlib_window(painter_t *painter) | |
{ | |
painter->_display = XOpenDisplay(config.output_display); | |
if (!painter->_display) { | |
fprintf(stderr, "Unable to open display: '%s'\n", XDisplayName(config.output_display)); | |
exit(EXIT_FAILURE); | |
} | |
int screen = DefaultScreen(painter->_display); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import sys | |
import json | |
import stat | |
import logging | |
import libvirt | |
from io import StringIO | |
from pathlib import Path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Lightmap fragment shader | |
Lighting is calculated per-fragment, and checks for collisions with boxes | |
provided to this shader in real-time (allowing for accurate, dynamic lights). | |
This shader is ran once for each light, which is blended per-component (max) | |
with other lights. | |
The final lightmap is later smoothed in the processing shader. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function print(text, timeout) | |
naughty.notify { | |
preset = naughty.config.presets.normal, | |
text = text, | |
border_width = 0, | |
timeout = timeout or 3, | |
position = "top_left" | |
} | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* BMP Image header */ | |
struct __attribute__((packed)) bmp_header { | |
uint16_t header; | |
uint32_t size; | |
uint16_t reserved0, reserved1; | |
uint32_t offset; | |
/* BITMAPINFOHEADER */ | |
uint32_t header_size, width, height; | |
uint16_t planes, bits_per_pixel; | |
uint32_t compression, image_size, hres, vres, colors, colors_used; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
static int foo = 42; | |
#define _arch_load(addr, memorder) \ | |
({ \ | |
__auto_type _addr = addr; \ | |
typeof(*_addr) _store; \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
#include <string.h> | |
#include <assert.h> | |
#include <luabase.h> | |
#include <ct.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
#include <string.h> | |
#include <assert.h> | |
#include "luajit-2.1/luajit.h" | |
#include "luajit-2.1/luaconf.h" | |
#include "luajit-2.1/lua.h" |