Skip to content

Instantly share code, notes, and snippets.

View asmwarrior's full-sized avatar

ollydbg asmwarrior

  • 17:24 (UTC +08:00)
View GitHub Profile
#include <iostream>
#include <vector>
#include <cstring>
#include <fstream>
#include <sstream>
#include <stdexcept>
#include <opencv2/opencv.hpp>
extern "C" {
#include <libavutil/imgutils.h>
#include <libavcodec/avcodec.h>
#include <opencv2/opencv.hpp>
using namespace cv;
int main() {
int width = 640;
int height = 480;
int fps = 30;
int num_frames = 100;
Scalar black(0, 0, 0);
@asmwarrior
asmwarrior / opengl-codeblocks.cpp
Created April 17, 2023 00:56
use opengl under codeblocks
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <iostream>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
const char* vertexShaderSource = R"glsl(
#version 330 core
@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 / wizard.script
Created March 30, 2023 11:08
wxWidgets for msys2
////////////////////////////////////////////////////////////////////////////////
//
// wxWidgets project wizard
//
////////////////////////////////////////////////////////////////////////////////
// globals
WizType <- wizProject;
WxPath <- _T("");
WantPCH <- false;
@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 / 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 / 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 / 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 / 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