Skip to content

Instantly share code, notes, and snippets.

View tonka3000's full-sized avatar
🤖

Michael tonka3000

🤖
View GitHub Profile
@tonka3000
tonka3000 / rsync_dir.sh
Created September 23, 2018 14:09
rsync directory over ssh
# ~/test is just an example directory on the remote computer
rsync -avz -e ssh . myremoteuser@<host-address>:~/test
@tonka3000
tonka3000 / conanfile.py
Created May 24, 2018 23:05
conan: detect Visual Studio 2017 toolset and change it
#
# This is a draft how you can detect vs 2017 toolset and set it for vcvars
#
class Version:
def __init__(self, version_text):
self.version = version_text
self.version_split = [int(x) for x in self.version.split(".")]
@property
def major(self):
@tonka3000
tonka3000 / git_rebase_onto_branch.sh
Created June 2, 2017 09:14
Rebase feature branch onto a master/develop branch
echo "checkout the feature branch"
git checkout -b myfeature-branch
echo "rebase on top of the master branch"
git rebase master
@tonka3000
tonka3000 / CMakeLists.txt
Created March 11, 2017 10:10
simple cmake project
cmake_minimum_required (VERSION 2.8.11)
project (MySolutionName) # MySolutionName could be anything, it's not really important
add_library (HelloWorldLibrary hello.cpp) # HelloWorldLibrary is the name of our dll-project
add_executable (HelloWorldApp main.cpp) # HelloWorldApp is the name of our exe project
target_link_libraries (helloDemo PUBLIC Hello) # now we have to link our executable (HelloWorldApp) with our libraray (HelloWorldLibrary)
@tonka3000
tonka3000 / Git checkout remote branch
Created August 5, 2016 08:27 — forked from markSci5/Git checkout remote branch
Git checkout remote branch
//To fetch a branch, you simply need to:
git fetch origin
//This will fetch all of the remote branches for you. With the remote branches
//in hand, you now need to check out the branch you are interested in, giving
//you a local working copy:
git checkout -b test origin/test
echo "delete all untracked files/directories"
echo "dry run => show all files which will be deleted"
git clean -X -n
echo "delete files"
git clean -f
echo "delete files and directories (also ignored files)"
git clean -x -d -f
echo "reset the author from every commit (starting with your SHA1-hash) on current branch to the author from HEAD"
git rebase -i <SHA1-hash> -x "git commit --amend --reset-author -CHEAD" !
@tonka3000
tonka3000 / git_alias.sh
Last active June 20, 2016 10:48
git lol and alol
git config --global alias.alol 'log --oneline --graph --decorate --all'
git config --global alias.lol 'log --oneline --graph --decorate'