Skip to content

Instantly share code, notes, and snippets.

View asmwarrior's full-sized avatar

ollydbg asmwarrior

View GitHub Profile
@asmwarrior
asmwarrior / test.cpp
Created January 22, 2016 13:29
minimal sample code for wxListbook issue
#include <wx/wx.h>
#include <wx/listbook.h>
#include <wx/artprov.h>
class MyDialog1 : public wxDialog
{
public:
wxListbook* m_listbook1;
@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 / event_system.cpp
Created July 28, 2022 06:01
code I copy and modified from this link: c++ - ECS Event/Messaging implementation - Code Review Stack Exchange — https://codereview.stackexchange.com/questions/79211/ecs-event-messaging-implementation
#include <iostream>
#include <cstdlib>
#include <functional>
#include <vector>
struct BaseEvent
{
virtual ~BaseEvent() {}
protected:
static size_t getNextType();
@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 / wizard.script
Created March 30, 2023 11:08
wxWidgets for msys2
////////////////////////////////////////////////////////////////////////////////
//
// wxWidgets project wizard
//
////////////////////////////////////////////////////////////////////////////////
// globals
WizType <- wizProject;
WxPath <- _T("");
WantPCH <- false;