Skip to content

Instantly share code, notes, and snippets.

@technoscavenger
technoscavenger / build.zig
Created January 27, 2026 20:02
Build.zig for Hello Window
const std = @import("std");
// Although this function looks imperative, it does not perform the build
// directly and instead it mutates the build graph (`b`) that will be then
// executed by an external runner. The functions in `std.Build` implement a DSL
// for defining build steps and express dependencies between them, allowing the
// build runner to parallelize the build automatically (and the cache system to
// know when a step doesn't need to be re-run).
pub fn build(b: *std.Build) void {
// Standard target options allow the person running `zig build` to choose
@technoscavenger
technoscavenger / main.zig
Last active January 27, 2026 20:00
Hello Window using Zig lang
pub const UNICODE = true;
const win32 = @import("win32").everything;
const L = win32.L;
const HWND = win32.HWND;
pub export fn wWinMain(
hInstance: win32.HINSTANCE,
_: ?win32.HINSTANCE,
pCmdLine: [*:0]u16,
nCmdShow: u32,
@technoscavenger
technoscavenger / qt-console.cpp
Created September 22, 2025 01:55
Qt Console app
#include <QCoreApplication>
#include <QTextStream>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QTextStream(stdout) << "Hello, world\n";
return a.exec();
}
@technoscavenger
technoscavenger / highlight-sample.html
Created September 10, 2025 06:18
highlight sample code
<pre><code class="language-bash">netsh advfirewall firewall add rule name="RPC Endpoint Mapper" dir=in action=allow protocol=TCP localport=135
</code></pre>
@technoscavenger
technoscavenger / highlight-blogger.html
Last active September 10, 2025 06:15
Highlight.js Blogger modification
<link href='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/default.min.css' rel='stylesheet'/>
<script src='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js'/>
<script type='text/javascript'>
hljs.configure({cssSelector: &quot;code&quot;});
hljs.highlightAll();
</script>
<script type='text/javascript'>
//<![CDATA[
@technoscavenger
technoscavenger / _etc_netplan_01-netcfg.yaml
Created May 8, 2025 03:07
netplan yaml for configuring bridge and tap0
network:
version: 2
renderer: networkd
ethernets:
ens33:
dhcp4: no
dhcp6: no
tap0:
optional: true
bridges:
@technoscavenger
technoscavenger / tap0.service
Created May 8, 2025 03:00
systemd unit for creating tap0
[Unit]
Description=Create TAP interface tap0
Before=network-pre.target
Wants=network-pre.target
DefaultDependencies=no
[Service]
Type=oneshot
ExecStart=/sbin/ip tuntap add dev tap0 mode tap user u1
ExecStartPost=/sbin/ip link set tap0 up
@technoscavenger
technoscavenger / .config
Created April 30, 2025 01:10
.config for u-boot
#
# Automatically generated file; DO NOT EDIT.
# U-Boot 2025.04 Configuration
#
#
# Compiler: arm-linux-gnueabihf-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
#
CONFIG_CREATE_ARCH_SYMLINK=y
CONFIG_HAVE_SETJMP=y
# local/snippets/post_start.custom
# Commands executed from post_startup.sh. Executed at the end of system startup whether slm is in use
# or not
#
# To allow resource managers to be run properly with and without security policies, command lines
# should be written in one of the following forms:
#
# START(resmgr_t) resmgr DROPROOT(resmgr_uid)
# STARTU(resmgr_t, resmgr_uid) resmgr
# Where resmgr_t is the security type name (arbitrary but usually the name of the resmgr with _t appended),
# local/snippets/ifs_files.custom
# Placeholder for local list of files to add to ifs
[+script] .script = {
procmgr_symlink /system/xbin/login /bin/login
}