Skip to content

Instantly share code, notes, and snippets.

View jarcode-foss's full-sized avatar

Levi Webb jarcode-foss

  • Canada, BC
View GitHub Profile
0020:0024:trace:process:NtCreateUserProcess L"\\??\\C:\\windows\\system32\\wineboot.exe" image L"C:\\windows\\system32\\wineboot.exe" cmdline L"\"C:\\windows\\system32\\wineboot.exe\" --init" parent (nil)
0020:0024:trace:process:NtCreateUserProcess L"\\??\\C:\\windows\\system32\\wineboot.exe" pid 0028 tid 002c handles 0x14/0x18
0028:002c:trace:process:NtQueryInformationProcess (0xffffffffffffffff,0x00000025,0x21fa70,0x00000040,(nil))
0028:002c:trace:process:NtQueryInformationProcess (0xffffffffffffffff,0x0000001a,0x21f648,0x00000008,(nil))
0028:002c:trace:process:GetEnvironmentVariableW (L"WINEUNIXCP" 000000000021F3E0 85)
0028:002c:trace:process:ExpandEnvironmentStringsW (L"@tzres.dll,-11232" 0000000000000000 0)
0028:002c:trace:process:ExpandEnvironmentStringsW (L"@tzres.dll,-11232" 0000000000330C50 18)
0028:002c:trace:process:ExpandEnvironmentStringsW (L"@tzres.dll,-11233" 0000000000000000 0)
0028:002c:trace:process:ExpandEnvironmentStringsW (L"@tzres.dll,-11233" 0000000000330C80 18)
0028:002c:trace:process:
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <assert.h>
#include <luabase.h>
#include <ct.h>
#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"
@jarcode-foss
jarcode-foss / exception.c
Created July 10, 2022 14:03
exception.c
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <assert.h>
#include <luabase.h>
#include <ct.h>
@jarcode-foss
jarcode-foss / test_valgrind_cmpxchg.c
Created July 7, 2022 06:42
Demonstrate valgrind false positive for "Conditional jump or move depends on uninitialised value(s)"
#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; \
@jarcode-foss
jarcode-foss / bmp_icon.c
Created December 15, 2019 16:48
Assign _NET_WM_ICON cardinal and XWMHints pixmap for X11 window icons
/* 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;
@jarcode-foss
jarcode-foss / print.lua
Created September 10, 2019 07:53
overload print in awesome client
function print(text, timeout)
naughty.notify {
preset = naughty.config.presets.normal,
text = text,
border_width = 0,
timeout = timeout or 3,
position = "top_left"
}
end
/*
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.
#!/usr/bin/env python3
import os
import sys
import json
import stat
import logging
import libvirt
from io import StringIO
from pathlib import Path
@jarcode-foss
jarcode-foss / painter.c
Created August 1, 2018 04:05
Desktop window
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);