Skip to content

Instantly share code, notes, and snippets.

View heejune's full-sized avatar

Heejune heejune

View GitHub Profile
@heejune
heejune / setup-orgmode.el
Created March 5, 2016 04:08
orgmode XeLaTex override example
(eval-after-load 'org
(lambda()
(require 'ob-C)
(require 'org-bullets)
(require 'ox-taskjuggler)
(require 'ox-latex)
;; …
(setq org-latex-to-pdf-process
@heejune
heejune / ocr_bot.py
Created January 26, 2016 01:08
telegram bot example uses the tesseract to process OCR request
import sys
import asyncio
import random
import telepot
from telepot.delegate import per_chat_id
from telepot.async.delegate import create_open
import os
import traceback
@heejune
heejune / manage_version.py
Created December 7, 2015 15:19
Specify the version at .rc resource file
# source taken from
# http://stackoverflow.com/questions/4003725/modifying-rc-file-with-python-regexp-involved
# target_version = "2,3,4,5"
def set_rc_version(rcfile, target_version):
with open(rcfile, "r+") as f:
rc_content = f.read()
# first part
@heejune
heejune / build.py
Created December 7, 2015 15:14
Launch a msbuild=
# Sample code snippet..
def start(self, version):
msbuild = os.getenv('MSBUILD_PATH', r"C:\Program Files\MSBuild\12.0\Bin\MSBuild.exe")
project_output_dir = os.getenv('PROJECT_OUTPUT_DIR', r'c:\Build_distribute\')
if not os.path.exists(msbuild):
raise Exception('not found ' + msbuild)
projects = [r"..\yoursolution.sln", r"..\yourproject\yourproject.vcxproj"]
@heejune
heejune / output.log
Created December 7, 2015 00:40
LNK2019 error message while linking QT with static lib
2>xxxwidget.obj : error LNK2019: unresolved external symbol "void __cdecl yyy::zzzstring(...)" (?zzzstring@xxx@@YAXPAU_GUID@@AAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@Z) referenced in function __catch$?nnn@mmm@@...... :
fatal error LNK1120: 1 unresolved externals
@heejune
heejune / gist:05e1dccc33943d193352
Created May 24, 2015 13:25
cpprestsdk json test
#include <cpprest\json.h>
#include <string>
int _tmain(int argc, _TCHAR* argv[])
{
web::json::value root;
std::wstring filepath = L"config.json";
std::ifstream ifs;
@heejune
heejune / gist:1e75b323e596eaafa21f
Created May 24, 2015 13:22
Mixing CRT link type will cause debug assert when it freed
if (pHead->pBlockHeaderPrev)
{
pHead->pBlockHeaderPrev->pBlockHeaderNext = pHead->pBlockHeaderNext;
}
else
{
_ASSERTE(_pFirstBlock == pHead);
_pFirstBlock = pHead->pBlockHeaderNext;
}