Skip to content

Instantly share code, notes, and snippets.

View xiongjia's full-sized avatar
🤿
Focusing

Xiong-Jia.Le xiongjia

🤿
Focusing
View GitHub Profile
@xiongjia
xiongjia / 0_main.cxx
Last active April 20, 2023 11:36
A simple sample of Boost DLL #boost #devsample
/**
* A simple sample of Boost DLL
*/
#include <iostream>
#include "boost/shared_ptr.hpp"
#include "boost/function.hpp"
#include "boost/dll/import.hpp"
#include "1_plugin.hxx"
@xiongjia
xiongjia / .gitconfig
Last active November 29, 2022 18:46 — forked from robmiller/.gitconfig
Some useful Git aliases that I use every day #conf #git
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@xiongjia
xiongjia / uia-sample.ps1
Last active November 29, 2022 18:44
A simple sample for access the MS UIAutomation in PowerShell. #devsample #win
#REQUIRES -Version 3.0
# This is a simple sample for access the MS UIAutomation in PowerShell.
# In this sample:
# 1. Load the MS UIA via System.Reflection.Assembly
# 2. Launch the AUT ( calc.exe )
# 3. Find the AutomationElement via the AUT Process Id
# 4. Find buttons via 'ClassName' and 'Name' property
# 5. Click the '1', '+', '1', '=' buttons.
# At last, we will get '2' in the result of calc App.
@xiongjia
xiongjia / 0_main.cxx
Last active September 11, 2022 01:39
A simple sample of Boost Log #devsample #boost
/**
* A simple sample of Boost Log
*/
#pragma warning(push)
#pragma warning(disable:4819)
# include <boost/shared_ptr.hpp>
# include <boost/date_time/posix_time/posix_time_types.hpp>
# include <boost/log/trivial.hpp>
# include <boost/log/core.hpp>
@xiongjia
xiongjia / (README).md
Last active March 14, 2022 17:34
A simple knex sample #db

A simple knex sample

knexjs ( http://knexjs.org/ ) is SQL query builder.
This gist is a simple knexjs sample.

Installation

  1. Clone this gist to a local folder
  2. Run npm run build in the local folder

Usage & Database Schema

  • node index.js --createSchema : Create the database schema. (The default SQL client is sqlite3. The schema is created by db_schema.js )
@xiongjia
xiongjia / building-freetype2.md
Last active March 23, 2021 15:21
Building freetype2 on Windows #devnotes

Purpose

Building the freetype Windows 32 DLL & LIB for the Windows OpenJDK Compiling.

Get the freetype source code

Updating the Freetype Visual Studio solution settings

The default Windows building VS solution is "/builds/windows/vc2010/freetype.sln" (I built it via Visual Studio 2015).

@xiongjia
xiongjia / .gitignore
Last active February 24, 2020 05:09
Database schema for leetcode db problems #db
*.sqlite
*.db
*.log
@xiongjia
xiongjia / CMakeLists.txt
Last active October 5, 2019 19:52
The example of Windows Job Objects #devsample #win
# CMake build script
cmake_minimum_required(VERSION 2.8)
# project name & version
project(JobObj)
# common settings (Boost libraries)
if (MSVC)
# Enable the static libraries on Windows
foreach (flag_var
@xiongjia
xiongjia / 0-read-ini.cpp
Last active April 18, 2019 06:46
Parse the UTF8 ".ini" file via the Boost property_tree #devsample #boost
/**
* Parse the UTF8 ".ini" file via the Boost property_tree
*/
#include <string>
#include <fstream>
#if defined(__APPLE__)
# include <codecvt>
#endif /* defined(__APPLE__) */
@xiongjia
xiongjia / npm.taobao.sh
Created January 15, 2018 14:42 — forked from 52cik/npm.taobao.sh
npm 淘宝镜像配置
npm set registry https://registry.npm.taobao.org # 注册模块镜像
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像
## 以下选择添加
npm set chromedriver_cdnurl http://cdn.npm.taobao.org/dist/chromedriver # chromedriver 二进制包镜像
npm set operadriver_cdnurl http://cdn.npm.taobao.org/dist/operadriver # operadriver 二进制包镜像
npm set phantomjs_cdnurl http://cdn.npm.taobao.org/dist/phantomjs # phantomjs 二进制包镜像
npm set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass # node-sass 二进制包镜像
npm set electron_mirror http://cdn.npm.taobao.org/dist/electron/ # electron 二进制包镜像