Skip to content

Instantly share code, notes, and snippets.

@pwm1234
pwm1234 / get_module_path
Last active May 9, 2024 14:51
path to dll containing a function
std::string get_module_path(void* address)
{
char path[FILENAME_MAX];
HMODULE hm = NULL;
if (!GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
(LPCSTR)address,
&hm))
{
@pwm1234
pwm1234 / todo.md
Last active August 29, 2015 14:15 — forked from labnol/todo.md
A github todo list in markdown.

Task list. Original gist came from Amit Agarwal

  • Pick the flowers
  • Call John 9303032332
  • Cancel cable subscription
  • Book the flight tickets

If you have write permission to the content, you should be able to click and change the markdown.

@pwm1234
pwm1234 / .emacs
Last active August 29, 2015 14:15
emacs spellcheck (especially on windows) #emacs
; configure the f8 function key for spell checking
(global-set-key [f8] 'ispell-word)
(global-set-key [(shift f8)] 'ispell-buffer)
; enable flyspell mode for text-mode
(add-hook 'text-mode-hook
(lambda ()
(flyspell-mode t)
(auto-fill-mode)
))
@pwm1234
pwm1234 / nikola_bootstrap_theme
Last active August 29, 2015 14:15
nikola bootswatch theme #nikola #theme
# install the bootstrap3-jinja theme
nikola install_theme bootstrap3-jinja
# use the readable swatch
nikola bootswatch_theme -s readable
@pwm1234
pwm1234 / git_config_global_ignore
Last active August 29, 2015 14:15
configuring a global gitignore
$ git config --global core.excludesfile ~/.gitignore
@pwm1234
pwm1234 / findlinks.py
Created April 3, 2014 14:00
find windows links (aka junctions)