Skip to content

Instantly share code, notes, and snippets.

View asmwarrior's full-sized avatar

ollydbg asmwarrior

  • 16:53 (UTC +08:00)
View GitHub Profile
@yinyin
yinyin / env-autotools.sh
Last active December 4, 2018 23:56
Set environment variables for autotools
#!/bin/bash
# source ~/bin/env-autotools.sh
OPT_BASE=/opt
which autoreconf
if [ "$?" != "0" ]; then
export PATH=${OPT_BASE}/autoconf-2.69/bin:$PATH
fi
@derofim
derofim / Readme.md
Created April 1, 2017 18:07
OpenCV 3.2.0 Features2D + Homography to find a known object

Description

Features2D + Homography to find a known object http://docs.opencv.org/3.2.0/d9/d97/tutorial_table_of_content_features2d.html ported to OpenCV 3.2.0

Setup

  1. git clone -b 3.2.0 --depth 1 --recursive https://github.com/opencv/opencv_contrib.git
  2. git clone -b 3.2.0 --depth 1 --recursive https://github.com/opencv/opencv.git
  3. Create bat script (Windows):
@echo off
REM git clone -b 3.2.0 --depth 1 --recursive https://github.com/opencv/opencv_contrib.git
REM OR Download https://github.com/opencv/opencv_contrib/archive/3.2.0.zip
@bharadwaj-raju
bharadwaj-raju / README.md
Last active July 28, 2024 05:21
simple python fileserver with authentication

fileserver.py

Credit to bones7456.

Instructions

Change values in settings.py, place it in the same directory as fileserver.py then run python2 fileserver.py

@bluethon
bluethon / git_proxy_socks5.sh
Created January 18, 2017 08:25
设置git使用socks5代理
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
@smccutchen
smccutchen / ConvertUTF-8.py
Created January 4, 2017 04:59
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:
Things in C/C++ that are hard to parse
======================================
Type names
----------
C is "mostly" LL(1) and generally relatively straightforward to parse. The primary
unncessary complication is that parsing C requires keeping a symbol table during
parsing that knows whether a given identifier in the current scope refers to a type
name or not. Take this example snippet:

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@mingwandroid
mingwandroid / CMakeLists.txt
Last active April 30, 2022 00:55
WxWidgets CMake MSYS2
# From https://wiki.wxwidgets.org/CMake
PROJECT(Test)
SET(wxWidgets_USE_LIBS)
FIND_PACKAGE(wxWidgets)
IF(wxWidgets_FOUND)
INCLUDE("${wxWidgets_USE_FILE}")
ADD_EXECUTABLE(MyTest WIN32 main.cpp)
# and for each of your dependant executable/library targets:
TARGET_LINK_LIBRARIES(MyTest ${wxWidgets_LIBRARIES})
ELSE(wxWidgets_FOUND)
@codebrainz
codebrainz / libsig.h
Last active February 10, 2022 08:08
Trivial C++ signal/callback mechanism
/*
* libsig.h - Trivial signal/callback library.
*
* Copyright (c) 2015 Matthew Brush <[email protected]>
* 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.
@elieux
elieux / msys2-here-uninstall.reg
Created November 23, 2015 08:32
MSYS2 here context menu items
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MSYS here]
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MINGW64 here]
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MINGW32 here]