Skip to content

Instantly share code, notes, and snippets.

View uncerso's full-sized avatar

Anton Kleshchin uncerso

  • Saint Petersburg, Russia
View GitHub Profile
@gium
gium / gist:1069605
Created July 7, 2011 14:19
C++ traits to know if a type has a method.
#include <iostream>
#include <vector>
#include <list>
#include <set>
template <typename T>
struct HasPushBack {
typedef char yes[1];
typedef char no[2];
@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.