Skip to content

Instantly share code, notes, and snippets.

View lynxluna's full-sized avatar
🎯
Focusing

Didiet lynxluna

🎯
Focusing
View GitHub Profile
#!/bin/bash
# merge-sdk.sh
# Merges extracted SDK with existing crosstool-ng sysroot
set -e
# Configuration
CROSSTOOL_SYSROOT="/path/to/your/crosstool/sysroot" # Change this
EXTRACTED_SDK="./sysroot"
BACKUP_DIR="./sysroot_backup_$(date +%Y%m%d_%H%M%S)"
@lynxluna
lynxluna / oledb.c
Created October 16, 2024 04:33
OLEDB access
#define INITGUID
#include <windows.h>
#include <ole2.h>
#include <oledb.h>
#include <stdio.h>
#include <tchar.h>
// Include OLEDB headers
#include <msdasc.h>
#pragma comment(lib, "oledb.lib")
@lynxluna
lynxluna / simple_window.m
Last active October 10, 2024 10:40
Simple macOS Window
#import <Cocoa/Cocoa.h>
// Compile: clang -framework AppKit -o simple_window simple_window.m
// Run: ./simple_window
// AppDelegate interface declaration
// Conforms to NSApplicationDelegate for application lifecycle management
// and NSWindowDelegate for window-related events
@interface AppDelegate : NSObject <NSApplicationDelegate, NSWindowDelegate>
@property (strong, nonatomic) NSWindow *window;
@lynxluna
lynxluna / boop.c
Created June 10, 2024 16:12
Playing Sample Using Single Cycle Sound Blaster 16
#include <dos.h>
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <string.h>
#include <io.h>
#include <fcntl.h>
#define KB 1024
#define SZ_16K (16 * KB)
param(
[string]$BaseDir = "C:\BuildTools",
[string]$WindowsSDKVersion = "10.0.22621.0",
[string]$VCToolsVersion = "14.39.33519",
[string]$TargetArch = "x64"
)
# Set base directories using the BaseDir parameter
$WindowsSDKDir = "$BaseDir\Windows Kits\10"
$VCToolsInstallDir = "$BaseDir\VC\Tools\MSVC\$VCToolsVersion\"
@lynxluna
lynxluna / animal.go
Created April 10, 2023 13:57
Animal Testing
package animal
const (
AnimalDog = iota
AnimalCat
AnimalBear
)
type Animal interface {
Speak() string
@lynxluna
lynxluna / main.c
Created January 19, 2023 18:22
OpenFile GTK
#include <gtk/gtk.h>
#define UNUSED_PARAMETER(param) (void) (param)
// Application State Data
struct app_data_t {
GtkWidget *parent_window;
GtkWidget *text_edit_view;
};
@lynxluna
lynxluna / watcom_mbed.patch
Last active May 19, 2022 22:13
MbedTLS OpenWatcom Patchs
diff -Nbaur mbedtls-3.1.0/include/mbedtls/mbedtls_config.h binfetch/mbedtls-3.1.0/include/mbedtls/mbedtls_config.h
--- mbedtls-3.1.0/include/mbedtls/mbedtls_config.h 2021-12-15 20:48:01.000000000 +0700
+++ binfetch/mbedtls-3.1.0/include/mbedtls/mbedtls_config.h 2022-05-20 01:50:44.000000000 +0700
@@ -2440,7 +2440,7 @@
*
* This module provides networking routines.
*/
-#define MBEDTLS_NET_C
+//#define MBEDTLS_NET_C
@lynxluna
lynxluna / main.go
Created January 1, 2022 11:22
Go sign & verify, PHP verify
package main
import (
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
"crypto/x509"
"encoding/base64"
"encoding/pem"
@lynxluna
lynxluna / init.vim
Created December 21, 2021 08:23
NeoVim
if &compatible
set nocompatible
endif
" Add the dein installation directory into runtimepath
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim
if dein#load_state('~/.cache/dein')
call dein#begin('~/.cache/dein')
"call dein#add('godlygeek/tabular')