Skip to content

Instantly share code, notes, and snippets.

View Theldus's full-sized avatar
🙃

Davidson Francis Theldus

🙃
View GitHub Profile
@Theldus
Theldus / syntax.s
Created August 18, 2022 07:26 — forked from mishurov/syntax.s
AT&T assembly syntax and IA-32 instructions
# --------
# Hardware
# --------
# Opcode - operational code
# Assebly mnemonic - abbreviation for an operation
# Instruction Code Format (IA-32)
# - Optional instruction prefix
# - Operational code
@Theldus
Theldus / mingw-w64-x86_64.cmake
Created July 8, 2021 02:08 — forked from peterspackman/mingw-w64-x86_64.cmake
cmake toolchain file for mingw-w64 x86_64 builds on Ubuntu
# Sample toolchain file for building for Windows from an Ubuntu Linux system.
#
# Typical usage:
# *) install cross compiler: `sudo apt-get install mingw-w64`
# *) cd build
# *) cmake -DCMAKE_TOOLCHAIN_FILE=~/mingw-w64-x86_64.cmake ..
set(CMAKE_SYSTEM_NAME Windows)
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
@Theldus
Theldus / sendRawEth.c
Created April 23, 2018 23:37 — forked from austinmarton/sendRawEth.c
Send a raw Ethernet frame in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>
@Theldus
Theldus / replace.sh
Last active March 31, 2018 08:14 — forked from hlissner/replace.sh
Bulk search & replace with ag (the_silver_searcher)
# ag <https://github.com/ggreer/the_silver_searcher>
# usage: ag-replace.sh [search] [replace]
# caveats: will choke if either arguments contain a forward slash
# notes: will back up changed files to *.bak files
ag -0 -l $1 | xargs -0 sed -ri.bak -e "s/$1/$2/g"
@Theldus
Theldus / cue_to_flac.py
Created February 18, 2018 01:10 — forked from bancek/cue_to_mp3.py
CUE splitter using ffmpeg (to flac)
cue_file = 'file.cue'
d = open(cue_file).read().splitlines()
general = {}
tracks = []
current_file = None