Skip to content

Instantly share code, notes, and snippets.

@hoozh
hoozh / 0_reuse_code.js
Created January 4, 2017 02:31
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@hoozh
hoozh / new_gist_file_0
Created January 4, 2017 02:33
nsis install vcredist
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; install vcredist
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SetOutPath "$varTempFolder\${PRODUCT_NAME_EN}Setup\3rdparty"
SetOverWrite on
StrCpy $varVCRedistKey "c1c4f01781cc94c4c8fb1542c0981a2a"
Call CheckVCRedist
Pop $R0
${If} $R0 == "-1"
@hoozh
hoozh / ss.bat
Created February 4, 2017 07:55
bat svn commit
@echo off
FOR /L %%* IN (1,1,400) DO (
ECHO 1 >> 1.txt
rem svn commit -m "create dummy commit" ./1.txt
tortoiseproc.exe /command:commit /path:"E:\Proj\scopeimage\1.txt" /logmsg:"create dummy commit" /closeonend:1
)
PAUSE
@hoozh
hoozh / RunBackup.bat
Created April 25, 2017 02:01
7z 备份文件
@echo off
@SET EXEPATH="..\7-Zip\7z.exe"
@SET PROJECTPATH="\\192.168.1.8\文件夹\文件夹1"
%EXEPATH% a -tzip "文件夹1_%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%.zip" %PROJECTPATH%
@hoozh
hoozh / cvGoodFeaturesToTrackTest.c
Created September 7, 2017 08:31
OpenCV cvGoodFeaturesToTrack
#include <opencv2/opencv.hpp>
int _tmain(int argc, _TCHAR* argv[])
{
// Load a color image, and convert it into grayscale
char filename[260];
for (int i = 1; i < 14; i++) {
sprintf(filename, "./1/%d.png", i);
IplImage* img = cvLoadImage(filename, CV_LOAD_IMAGE_COLOR);
/************************************************************************/
/* check harddisk's free space and used space */
/************************************************************************/
/*
void checkDisk()
{
char systemInfo[256];
memset(systemInfo,0,256);
_ULARGE_INTEGER lpFreeBytesAvailableToCaller, lpTotalNumberOfBytes, lpTotalNumberOfFreeBytes;
DWORD serialNumber, maxComponentLength, fsFlags;
@hoozh
hoozh / approxPolyDP
Last active September 30, 2018 09:24
find circles
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
using namespace cv;
using namespace std;
#define _ShowImage 1
////////////////////////////////////////////////////////
/**
* @name getAllImgsFilePath
* @brief 获取指定路径下的所有文件全路径(还是这个方便啊.)