Skip to content

Instantly share code, notes, and snippets.

View asmwarrior's full-sized avatar

ollydbg asmwarrior

View GitHub Profile
@LegalizeAdulthood
LegalizeAdulthood / PortingFromMFCToWxWidgets.md
Last active November 12, 2023 02:34
Porting from MFC to wxWidgets
@VonC
VonC / git-mergetool-winmerge.md
Created May 15, 2023 12:14
How can WinMerge give me notification if there are still conflicts when I close it?

Yes, it's possible to configure WinMerge in a way that it will notify you if there are remaining conflicts when you close it, but it's not a built-in feature of WinMerge itself. The strategy here is to add some script in Git configuration that checks whether the merge made by WinMerge is indeed successful.

Here is a simple approach to achieve this:

  1. Use a custom script as your mergetool that calls WinMerge and then checks for remaining conflict markers (<<<<<<<, =======, >>>>>>>) in the file.

Create a file named winmerge-with-conflict-check.sh with the following content:

#!/bin/sh
@aamirglb
aamirglb / treeview.cpp
Last active July 2, 2023 14:03
A sample treeview using wxDataViewCtrl
#include "wx/wx.h"
#include "wx/dataview.h"
/////////
// Implement a simple model with 2 columns
// FileName FileSize
/////////
class DataModelNode;
WX_DEFINE_ARRAY_PTR(DataModelNode *, DataModelNodePtrArray);
@DominikPeters
DominikPeters / lwarp-tips.md
Last active February 16, 2022 14:58
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}
@Alexufo
Alexufo / simple-https-python-server.py
Last active April 24, 2024 18:44
Simple Python https server example py 3.10+ ( multithread, wasm, gzip )
import http.server
import http.cookiejar
import io
import socket
from http import HTTPStatus
import ssl
import os
import zlib
server_address = ('0.0.0.0', 4443)
@Juul
Juul / openwrt_enable_ssh_on_wan.md
Last active June 3, 2023 08:17
OpenWRT enable SSH on WAN port

To /etc/config/firewall add:

config rule                                     
        option name             Allow-SSH-WAN   
        option src              wan             
        option proto            tcp             
        option dest_port        22              
 option target ACCEPT 
@vdaghan
vdaghan / LogWindow.h
Last active February 7, 2022 14:35
wxTextCtrl as a spdlog sink.
#ifndef LOG_WINDOW_H
#define LOG_WINDOW_H
// Say you have a MyFrame class derived from wxFrame and you want to add a wxWindow to that and use it as a spdlog sink.
// Declaration of your MyFrame class should be like this:
// #include "LogWindow.h"
// class MyFrame: public wxFrame {
// public:
// MyFrame();
// private:
@pida42
pida42 / ImapSync
Created September 12, 2020 07:19
#! /bin/sh
# imapcopy -- Sync IMAP accounts (from server account A to server account B)
# Copyright (C) 2016 Frantisek Preissler, <github@ntisek.cz>
# Released under the terms of The MIT License
#if [ $# != 4 ]
if [ $# != 1 ]
then
# echo Usage: imapcopy [SOURCE-USER] [SOURCE-PASS] [TARGET-USER] [TARGET-PASS]
@ChrizH
ChrizH / openwrt_lede_dyndns-client_config.md
Last active April 9, 2024 01:33
Free Dynamic DNS service provider configuration on OpenWRT/Lede Access Point. no-ip.com.

no-ip.com configuration on OpenWRT Access Point

In case that your home network gets a dynamic (public) IP address from the internet service provider (ISP) and you want to get access to your network services (NAS, IP Cam, any webserver etc.) over the internet, then a DDNS service is necessary.

Typical modems support DDNS service configuration out of the box (e.g. Fritzbox), but if that is not possible then any OpenWRT device on your network can help out.

Content

@RamonWill
RamonWill / TkinterExcel.py
Last active April 4, 2024 13:49
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()