Skip to content

Instantly share code, notes, and snippets.

View p-jackson's full-sized avatar

Philip Jackson p-jackson

View GitHub Profile
@p-jackson
p-jackson / reading-settings-into-map.cc
Last active March 9, 2016 21:35
How I might go about reading from a settings file
#include <string>
#include <unordered_map>
using namespace std;
// I've left the types explicit for clarity, but in real code
// I'd probably use `auto`
// The settings object is a hash table of keys and values. Everythings strings,
// no fighting the type system, no 3rd party libraries, everything is C++ 101.
const unordered_map<string, string> userSettings = parseSettings("path/to/settings.ini");
@p-jackson
p-jackson / gist:8079745
Created December 22, 2013 08:24
Closing off a feature branch
git checkout <feature-branch>
git pull
git checkout <release-branch>
git pull
git merge --no-ff <feature-branch>
git push
git tag -a branch-<feature-branch> -m "Merge <feature-branch> into <release-branch>"
git push origin branch-<feature-branch>
git branch -d <feature-branch>
git push origin :<feature-branch>