Skip to content

Instantly share code, notes, and snippets.

View xiangzhuyuan's full-sized avatar
🤗

Mathew P. Jones xiangzhuyuan

🤗
View GitHub Profile
@xiangzhuyuan
xiangzhuyuan / 0_reuse_code.js
Last active August 29, 2015 14:20
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

#git subtree 的用法

假如有一个iOS的项目,我用到了很多外部的库,如AFNetworking,我怎么把它集成进来呢?

##通过submodule的方法

把这个项目追加到自己是项目中:

git submodule add git@github.com:AFNetworking/AFNetworking.git Vendor/AFNetworking
template<typename T>
class Singleton
{
public:
static T &instance()
{
if (!instance)
instance_ = new T;
return *instance_;
}