Skip to content

Instantly share code, notes, and snippets.

View julianguarinautoformax's full-sized avatar

Julian Andres Guarin Reyes julianguarinautoformax

View GitHub Profile
@julianguarinautoformax
julianguarinautoformax / git_files_under_version_control.sh
Created March 31, 2017 12:02
Git: Check files under git version control (the actual ones)
#This one is for the ones actually being tracked by git.
git ls-tree -r master --name-only
#If you want a list of files that ever existed (i.e. including deleted files):
git log --pretty=format: --name-only --diff-filter=A | sort - | sed '/^$/d'
@julianguarinautoformax
julianguarinautoformax / qdirsample.cpp
Last active February 25, 2017 22:27
QDir & QFileInfo information
/* QFileInfo:
* http://doc.qt.io/qt-5/qfileinfo.html
* QDir:
* http://doc.qt.io/qt-5/qdir.html
*/
#include <QCoreApplication>
#include <QDebug>
#include <QDir>
#include <QFile>
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, Monospace;
}
@julianguarinautoformax
julianguarinautoformax / gist:c15bd28fcf8a3626cb806a59873c3c67
Last active May 24, 2017 14:35
Add branch name to your command line in bash terminal.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "