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 / launcher.vbs
Last active September 14, 2017 07:37
This .VBS is created for launch a console application without Window #devsample #win
' This .VBS is created for launch a console application without Window
' Executing Options
Const HIDDEN_WINDOW = 0
Const NORMAL_WINDOW = 1
Const MINIMIZED_WINDOW = 2
Const MAXIMIZE_WINDOW = 3
' Executing arguments.
@xiongjia
xiongjia / dictionary.py
Created March 1, 2015 14:51
Online Dictionary API Tests
#!/usr/bin/env python
import os, sys, logging, getopt, ConfigParser, urllib2
class Log(object):
_LEVELS = {
"error": logging.ERROR,
"debug": logging.DEBUG,
"info": logging.INFO
}
@xiongjia
xiongjia / pixanim.rb
Last active September 14, 2017 07:39 — forked from ToksT/pixanim.rb
Pixiv download tools #devtools
require 'zip' # install with "gem install rubyzip"
require 'mechanize'
require 'json'
# usage: ruby pixanim.rb ID FORMAT, where ID is the pixiv id number and FORMAT is gif, webm, or apng
# test posts:
# http://www.pixiv.net/member_illust.php?mode=medium&illust_id=44305721
# http://www.pixiv.net/member_illust.php?mode=medium&illust_id=44303110
# http://www.pixiv.net/member_illust.php?mode=medium&illust_id=44353714
# http://www.pixiv.net/member_illust.php?mode=medium&illust_id=44349996
@xiongjia
xiongjia / CMakeLists.txt
Last active September 14, 2017 07:39
OpenGL Tests (GL + GLEW + GLUT + Boost) #devsample #boost #gl
# CMake build script
cmake_minimum_required(VERSION 2.8)
# project name & version
project(GLTest)
# GLEW, GLUT & boost
find_package(GLEW REQUIRED)
find_package(GLUT REQUIRED)
find_package(Boost REQUIRED)
@xiongjia
xiongjia / (README).md
Last active September 14, 2017 07:39
A simple liquibase sample #db

A simple liquibase sample

liquibase (http://www.liquibase.org/ ) is a database Refactor tool. This gist is a simple liquibase sample.

JDBC Driver

  1. Download your Database JDBC Driver. (e.g. SQLite3 JDBC http://www.liquibase.org/sqlite.html )
  2. Add the driver name and .jar file to liquibase command line. (e.g. SQLite3: liquibase --classpath=sqlitejdbc-v<version>.jar --driver=org.sqlite.JDBC )

Database Schema and change log

@xiongjia
xiongjia / (README).md
Last active September 14, 2017 07:40
A simple Bookshelfjs sample #db

A simple Bookshelfjs sample

Bookshelfjs ( http://bookshelfjs.org/ ) is a javascript ORM for Node.js This gist is a simple bookshelfjs sample.

Installation

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

Configuration

  • This sample read the database config from config.js.
@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 / 0_main.cxx
Last active September 14, 2017 07:40
A simple sample of Boost Pool #devsample #boost
/**
* A simple sample of Boost Pool
*/
#include <iostream>
#include <vector>
#include <boost/pool/pool.hpp>
#include <boost/pool/object_pool.hpp>
#include <boost/pool/singleton_pool.hpp>
#include <boost/pool/pool_alloc.hpp>
@xiongjia
xiongjia / 0_main.cxx
Last active September 14, 2017 07:41
A simple sample of Boost Serialization #devsample #boost
/**
* A simple sample of Boost Serialization
*/
#include <fstream>
#include <string>
#include <vector>
#pragma warning(push)
#pragma warning(disable:4308)
@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>