Skip to content

Instantly share code, notes, and snippets.

View WenxiJin's full-sized avatar
🎯
Focusing

HvidPanda WenxiJin

🎯
Focusing
  • Sophion Bioscience A/S
  • Denmark
View GitHub Profile
@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 / 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 [email protected]:AFNetworking/AFNetworking.git Vendor/AFNetworking

or something to that effect.

@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 / config
Last active September 30, 2024 08:15 — forked from pksunkara/config
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = XXX
email = [email protected]
username = XXX
[init]
defaultBranch = master
[core]
editor = emacs
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
[sendemail]