Skip to content

Instantly share code, notes, and snippets.

View WenxiJin's full-sized avatar
🎯
Focusing

Wenxi Jin WenxiJin

🎯
Focusing
  • Sophion Bioscience A/S
  • Denmark
View GitHub Profile
@WenxiJin
WenxiJin / builder_pattern.cpp
Created November 24, 2020 14:46 — forked from niosus/builder_pattern.cpp
An example of builder pattern in c++
#include <stdio.h>
#include <memory>
class BBuilder;
class A {
public:
A() {}
virtual ~A() { fprintf(stderr, "A done.\n"); }
int getA() const { return _a; }
@WenxiJin
WenxiJin / example-subtree-usage.md
Created July 21, 2017 20:28 — forked from kvnsmth/example-subtree-usage.md
A real world usage for git subtrees.

Let's say you have an iOS project, and you want to use some external library, like AFNetworking. How do you integrate it?

With submodules

Add the project to your repo:

git submodule add git@github.com:AFNetworking/AFNetworking.git Vendor/AFNetworking

or something to that effect.

@WenxiJin
WenxiJin / cnc.c
Created March 16, 2017 20:41 — forked from scvalex/cnc.c
Mastermind solver in C
#include <stdio.h>
#include <string.h>
int rulled_out[10000 / sizeof(int) + 1];
int num_left;
// Try guess GUESS and mark the entries in RULLED_OUT that match the
// numbers that cannot be the secret (i.e. numbers that compared to
// GUESS are not COMP).
void update_rulled_out(int guess, int comp);
@WenxiJin
WenxiJin / gitconfig.ini
Last active September 1, 2017 09:14 — forked from tdd/gitconfig.ini
Nice, useful global Git configuration
# Put this in your ~/.gitconfig or ~/.config/git/config
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
[user]
name = Wenxi Jin
email = jwenxi@gmail.com
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
st = status