Skip to content

Instantly share code, notes, and snippets.

View VioletGiraffe's full-sized avatar

Violet Giraffe VioletGiraffe

View GitHub Profile
@mmozeiko
mmozeiko / debugger_example.c
Last active November 12, 2025 11:54
example for debug api & call stack unwinding & symbol lookup
#include <windows.h>
#include <dbghelp.h>
#include <stdio.h>
#include <assert.h>
#pragma comment (lib, "dbghelp")
int main()
{
STARTUPINFOW si = { .cb = sizeof(si) };
@mmozeiko
mmozeiko / callstack_dump.c
Last active October 4, 2025 20:33
dumps callstack of all threads in a single process
#include <windows.h>
#include <dbghelp.h>
#include <tlhelp32.h>
#include <stdlib.h>
#include <stdio.h>
#pragma comment (lib, "dbghelp")
#pragma comment (lib, "advapi32")
int main(int argc, char* argv[])
@seffs
seffs / raspbian-bookworm-minimal-kiosk.md
Last active December 2, 2025 01:10
Raspbian Bookworm - Ultra Minimal Kiosk Setup

This was tested on a FRESH Raspbian Bookworm Lite installation. Proceed with caution.

EDIT 23/12/2023: Removed dead download link and added own release

EDIT 09/06/2024: Force wayland after install

EDIT 06/07/2024: Add Troubleshooting section

EDIT 11/09/2024: Rearrange config file


@adduc
adduc / install.sh
Last active August 24, 2021 09:23
My installation of mercurial, tortoisehg, and hg-git on Ubuntu 20.04 and newer
#!/bin/bash
TARGET_DIR=/opt/repos/third-parties
HG_GIT_VERSION=${1:-default}
HG_RELEASE_VERSION=${2:-5.5.2}
HG_REPO_VERSION=${3:-stable}
TORTOISEHG_VERSION=${4:-stable}
update() {
# Update packages
include(CMakeForceCompiler)
# this one is important
set(CMAKE_SYSTEM_NAME Generic)
# specify the cross compiler
SET(CMAKE_C_COMPILER "D:/Downloads/djgpp/bin/i586-pc-msdosdjgpp-gcc.exe")
SET(CMAKE_CXX_COMPILER "D:/Downloads/djgpp/bin/i586-pc-msdosdjgpp-g++.exe")
# where is the target environment
@aliostad
aliostad / stockfish-interface.txt
Created August 17, 2019 10:41
stockfish - Description of the universal chess interface (UCI)
COPIED FROM https://build.opensuse.org/package/view_file/games/stockfish/stockfish-interface.txt?expand=1
Description of the universal chess interface (UCI) April 2006
=================================================================
* The specification is independent of the operating system. For Windows,
the engine is a normal exe file, either a console or "real" windows application.
* all communication is done via standard input and output with text commands,
@binhqd
binhqd / remove-systemctl-service.sh
Created May 24, 2018 02:12
Remove systemctl service
sudo systemctl stop [servicename]
sudo systemctl disable [servicename]
#rm /etc/systemd/system/[servicename]
#rm /etc/systemd/system/[servicename] symlinks that might be related
sudo systemctl daemon-reload
sudo systemctl reset-failed
@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active December 3, 2025 17:13
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

'use strict';
const puppeteer = require('puppeteer');
(async () => {
/* PRECONDITION:
0. download ublock, I used https://github.com/gorhill/uBlock/releases/download/1.14.19b5/uBlock0.chromium.zip
1. run $PATH_TO_CHROME --user-data-dir=/some/empty/directory --load-extension=/location/of/ublock
2. enable block lists you want to use
*/
@joshschmelzle
joshschmelzle / remove-gamebar-powershell-win10.md
Last active December 4, 2025 00:46
How to Remove the Xbox Game Bar with Powershell on Windows 10. Scroll to the end of the gist for Windows 11.

You've probably stumbled upon this researching how to remove the Xbox Game Bar. This gist includes a few different methods you can try. Please note that some of these first options are probably not be available unless you are running an older version of Windows 10.

EDIT: make sure to check out the comment below from @nmhung1985 which seems to be working for most folks.

Uninstalling/Removing the Game Bar (old Windows 10 build GUI options)

(this is no longer an option on any recent Windows 10 build)

  1. Press Windows Key or click on the Start menu.
  2. Start typing Xbox or Game Bar, until you get the Xbox Game Bar app to appear in the results.