Skip to content

Instantly share code, notes, and snippets.

@flyrain
flyrain / latex-gist.el
Last active October 12, 2015 14:58
wrap-markup-region
(defun wrap-item (start end)
"Insert a markup \begin{itemize}\end{itemize} around a region."
(interactive "r")
(save-excursion
(goto-char end) (insert "\\end{itemize}\n")
(goto-char start) (insert "\\begin{itemize}\n")
))
(global-set-key (kbd "C-q") 'wrap-markup-region)
@flyrain
flyrain / main.cpp
Last active August 2, 2023 06:17
Read and Write Process memory in Windows
#include "stdafx.h"
#include<windows.h>
#include<stdio.h>
#include <conio.h>
#include <iostream>
using namespace std;
BOOL SetPrivilege(
HANDLE hToken, // access token handle
LPCTSTR lpszPrivilege, // name of privilege to enable/disable