Skip to content

Commit f39cae3

Browse files
committed
up
1 parent a0cbc3b commit f39cae3

File tree

4 files changed

+68
-16
lines changed

4 files changed

+68
-16
lines changed

.aliases

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
#!/bin/bash
22

3-
# change directory
3+
4+
# -------------------------------------------------------------------
5+
# Change Directory
6+
# -------------------------------------------------------------------
47
alias ..="cd .."
58
alias ...="cd ../.."
69
alias ....="cd ../../.."
710
alias .....="cd ../../../.."
811

9-
# hdd
12+
# -------------------------------------------------------------------
13+
# HDD
14+
# -------------------------------------------------------------------
1015
alias df='df -h'
1116
alias du='du -h'
1217

13-
## utilities
14-
18+
# -------------------------------------------------------------------
19+
# Utilities
20+
# -------------------------------------------------------------------
1521
# open with system default application
1622
alias o='open_command'
1723
alias o.='o .'
18-
1924
# Lock the screen (when going AFK)
2025
alias afk="i3lock -c 000000"
26+

.dockerfunc

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
##############################################################################
3+
# dockerfunc
4+
# -----------
5+
# Usefull bash docker functions
6+
#
7+
# :authors: Sébastien BARON, @cbastienbaron
8+
# :date: 18 March 2018
9+
# :version: 0.0.1
10+
##############################################################################
11+
12+
del_stopped(){
13+
local name=$1
14+
local state
15+
state=$(docker inspect --format "{{.State.Running}}" "$name" 2>/dev/null)
16+
17+
if [[ "$state" == "false" ]]; then
18+
docker rm "$name"
19+
fi
20+
}
21+

.functions

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
#!/bin/bash
22

3-
# File: .functions
4-
# Description:
5-
# contains all functions defined by the user. Separated from shell rc files
6-
# for portability between different machines.
7-
# Avoid syntax and commands not portable to other different setups,
8-
# check out http://hyperpolyglot.org/unix-shells for more information
9-
3+
##############################################################################
4+
# functions
5+
# -----------
6+
# Usefull bash functions
7+
#
8+
# :authors: Sébastien BARON, @cbastienbaron
9+
# :date: 18 March 2018
10+
# :version: 0.0.1
11+
##############################################################################
1012

1113
# run command in the background
1214
background() {
@@ -15,7 +17,7 @@ background() {
1517
}
1618

1719
# serve PWD as web server
18-
serve() {
20+
function serve() {
1921
# serve [port] [directory]
2022
local port=${1:-8000}
2123
local dir=$2

.gitconfig

+26-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,37 @@
1+
[alias]
2+
# View the current working tree status using the short format
3+
s = status -s
4+
5+
# View abbreviated SHA, description, and history graph of the latest 20 commits
6+
l = log --pretty=oneline -n 20 --graph --abbrev-commit
7+
8+
# Switch to a branch, creating it if necessary
9+
co = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
10+
11+
# Color graph log view
12+
graph = log --graph --color --pretty=format:"%C(yellow)%H%C(green)%d%C(reset)%n%x20%cd%n%x20%cn%x20(%ce)%n%x20%s%n"
13+
14+
# List contributors with number of commits
15+
contributors = shortlog --summary --numbered
16+
17+
# Show verbose output about tags, branches or remotes
18+
tags = tag -l
19+
branches = branch -a
20+
remotes = remote -v
21+
22+
alias=!git config -l | grep ^alias | cut -c 7- | sort
23+
124
[user]
225
name = cbastienbaron
326
427
signingkey = 3F1C80C6
28+
529
[core]
630
autocrlf = input
31+
editor = nano
32+
733
[commit]
834
gpgsign = false
935

10-
[alias]
11-
remotes = remote -v
12-
1336
[color]
1437
ui = true

0 commit comments

Comments
 (0)