Skip to content

Instantly share code, notes, and snippets.

View asmwarrior's full-sized avatar

ollydbg asmwarrior

View GitHub Profile
@asmwarrior
asmwarrior / libsig.h
Created February 10, 2022 08:08 — forked from codebrainz/libsig.h
Trivial C++ signal/callback mechanism
/*
* libsig.h - Trivial signal/callback library.
*
* Copyright (c) 2015 Matthew Brush <mbrush@codebrainz.ca>
* You can use this code under the MIT license as described here:
* https://opensource.org/licenses/MIT
*
* To create a signal, declare member variables of type
* `libsig::signal<...>` in your class. The template parameter is the
* argument types that will be passed to the callback functions.
@asmwarrior
asmwarrior / lwarp-tips.md
Created February 16, 2022 14:58 — forked from DominikPeters/lwarp-tips.md
Some tips for using lwarp for Latex to HTML conversion

Replace natbib by biblatex to get citation links

\usepackage[backend=bibtex, style=authoryear-comp, natbib=true, sortcites=false]{biblatex}
\addbibresource{main.bib}

% optional if you want (Smith 1776) instead of (Smith, 1776)
\renewcommand*{\nameyeardelim}{\addspace}

\begin{document}
@asmwarrior
asmwarrior / phrases.ini
Created February 20, 2022 09:51 — forked from tualatrix/phrases.ini
搜狗拼音输入法--自定义短语配置文件 for Mac,放在 /Library/Input Methods/SogouInput.app/Contents/Resources/phrases.ini 下即可
; 搜狗拼音输入法--自定义短语配置文件
;
; 说明:
; 1、自定义短语支持多行、空格、指定位置。
; 2、每条自定义短语最多支持30000个汉字,总共支持100000行内容。
; 3、自定义短语的格式如下:
;
; 单行的格式:
; 字符串+英文逗号+数字(指定排序位置)=短语
;
@asmwarrior
asmwarrior / mingw-copy-deps.sh
Created March 3, 2022 13:15 — forked from h0tw1r3/mingw-copy-deps.sh
Recursively copy windows binary (dll/exe) dependencies from a sysroot (mingw toolchain) to the binaries directory.
#!/usr/bin/env bash
#
# Copyright: © 2015 Jeffrey Clark <https://github.com/h0tw1r3/>
# License: GPLv3 (http://www.gnu.org/licenses/gpl-3.0.html)
#
set -o errtrace
error() {
echo "ERROR in $0 : line $1 exit code $2"
exit $2
@asmwarrior
asmwarrior / ConvertUTF-8.py
Created July 20, 2022 10:22 — forked from smccutchen/ConvertUTF-8.py
Convert multiple files to UTF-8 encoding with Notepad++
# 2016-2017 Soverance Studios.
# Scott McCutchen
# This file will search all files and folders within a given directory, and use Notepad++ to convert their encoding to UTF-8 without Byte Order Marks
#
# This file must be run using the PythonScript plugin from within Notepad++, which is available through the Notepad++ Plugin Manager
#
# You must have Python 2.7 installed
#
# Additionally, this script can only exist and be run from within the Notepad++ user's working directory, the default of which is here:
@asmwarrior
asmwarrior / Recursive-descent-backtracking.js
Created January 11, 2023 08:53 — forked from DmitrySoshnikov/Recursive-descent-backtracking.js
Recursive descent parser with simple backtracking
/**
* = Recursive descent parser =
*
* MIT Style License
* By Dmitry Soshnikov <dmitry.soshnikov@gmail.com>
*
* In this short lecture we'll cover the basic (non-predictive, backtracking)
* recursive descent parsing algorithm.
*
* Recursive descent is an LL parser: scan from left to right, doing
@asmwarrior
asmwarrior / lexer.cpp
Created January 31, 2023 01:38 — forked from arrieta/lexer.cpp
Simple C++ Lexer
// A simple Lexer meant to demonstrate a few theoretical concepts. It can
// support several parser concepts and is very fast (though speed is not its
// design goal).
//
// J. Arrieta, Nabla Zero Labs
//
// This code is released under the MIT License.
//
// Copyright 2018 Nabla Zero Labs
//
@asmwarrior
asmwarrior / TkinterExcel.py
Created April 11, 2023 09:57 — forked from RamonWill/TkinterExcel.py
The code from my video on how to view an excel file or Pandas Dataframe inside Tkinter (with comments)
# Youtube Link: https://www.youtube.com/watch?v=PgLjwl6Br0k
import tkinter as tk
from tkinter import filedialog, messagebox, ttk
import pandas as pd
# initalise the tkinter GUI
root = tk.Tk()
@asmwarrior
asmwarrior / .gitconfig
Created May 15, 2023 07:46 — forked from shawndumas/.gitconfig
Using WinMerge as the git Diff/Merge Tool on Windows 64bit
[mergetool]
prompt = false
keepBackup = false
keepTemporaries = false
[merge]
tool = winmerge
[mergetool "winmerge"]
name = WinMerge
/* fix_fft.c - Fixed-point in-place Fast Fourier Transform */
/*
All data are fixed-point short integers, in which -32768
to +32768 represent -1.0 to +1.0 respectively. Integer
arithmetic is used for speed, instead of the more natural
floating-point.
For the forward FFT (time -> freq), fixed scaling is
performed to prevent arithmetic overflow, and to map a 0dB
sine/cosine wave (i.e. amplitude = 32767) to two -6dB freq