@sebastienrousseau/dotfiles 0.2.440 → 0.2.452
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COPYRIGHT +5 -0
- package/LICENSE +1260 -2
- package/Makefile +79 -0
- package/README.md +328 -71
- package/bin/dotfiles.sh +150 -0
- package/index.js +24 -0
- package/package.json +99 -25
- package/pnpm-lock.yaml +178 -0
- package/pnpm-workspace.yaml +2 -0
- package/shell/README.md +3 -0
- package/shell/aliases/README.md +327 -0
- package/{Icon/r → shell/aliases/default/README.md} +0 -0
- package/shell/aliases/default/default.aliases.sh +199 -0
- package/shell/aliases/gcloud/README.md +117 -0
- package/shell/aliases/gcloud/gcloud.aliases.sh +121 -0
- package/shell/aliases/git/README.md +279 -0
- package/shell/aliases/git/git.aliases.wip +586 -0
- package/shell/aliases/heroku/README.md +457 -0
- package/shell/aliases/heroku/heroku.aliases.sh +1031 -0
- package/shell/aliases/jekyll/README.md +32 -0
- package/shell/aliases/jekyll/jekyll.aliases.sh +50 -0
- package/shell/aliases/pnpm/README.md +3 -0
- package/shell/aliases/pnpm/pnpm.aliases.sh +42 -0
- package/shell/aliases/subversion/README.md +54 -0
- package/shell/aliases/subversion/subversion.aliases.sh +123 -0
- package/shell/aliases/tmux/README.md +0 -0
- package/shell/aliases/tmux/tmux.aliases.sh +14 -0
- package/shell/aliases.sh +12 -0
- package/shell/configurations/README.md +3 -0
- package/shell/configurations/bash/bashrc +36 -0
- package/shell/configurations/curl/cacert.pem +3460 -0
- package/shell/configurations/curl/curlrc +55 -0
- package/shell/configurations/default/color.sh +17 -0
- package/shell/configurations/default/editor.sh +16 -0
- package/shell/configurations/default/prompt.sh +37 -0
- package/shell/configurations/inputrc/inputrc +22 -0
- package/shell/configurations/jshint/jshintrc +37 -0
- package/shell/configurations/profile/profile +36 -0
- package/shell/configurations/tmux/tmux +95 -0
- package/shell/configurations/vim/vimrc +73 -0
- package/{.wgetrc → shell/configurations/wget/wgetrc} +4 -0
- package/shell/configurations/zsh/zshrc +40 -0
- package/shell/configurations.sh +10 -0
- package/shell/exit.sh +9 -0
- package/shell/functions/README.md +3 -0
- package/shell/functions/cdls.sh +19 -0
- package/shell/functions/changediskpwd.sh +19 -0
- package/shell/functions/code.sh +18 -0
- package/shell/functions/countdown.sh +33 -0
- package/shell/functions/curlheader.sh +20 -0
- package/shell/functions/curltime.sh +31 -0
- package/shell/functions/encode64.sh +25 -0
- package/shell/functions/environment.sh +37 -0
- package/shell/functions/extract.sh +32 -0
- package/shell/functions/filehead.sh +4 -0
- package/{zsh/zsh/functions/genpwd.zsh → shell/functions/genpwd.sh} +8 -3
- package/shell/functions/goto.sh +14 -0
- package/shell/functions/headers.sh +4 -0
- package/{zsh/zsh/functions/hidehiddenfiles.zsh → shell/functions/hidehiddenfiles.sh} +7 -2
- package/shell/functions/history-all.sh +7 -0
- package/shell/functions/hostinfo.sh +25 -0
- package/{zsh/zsh/functions/hstats.zsh → shell/functions/hstats.sh} +6 -1
- package/shell/functions/httpdebug.sh +7 -0
- package/shell/functions/keygen.sh +23 -0
- package/shell/functions/last.sh +9 -0
- package/shell/functions/logout.sh +10 -0
- package/shell/functions/lowercase.sh +28 -0
- package/shell/functions/macos.sh +47 -0
- package/shell/functions/matrix.sh +9 -0
- package/shell/functions/mcd.sh +18 -0
- package/shell/functions/mount_read_only.sh +9 -0
- package/shell/functions/myproc.sh +7 -0
- package/shell/functions/prependpath.sh +19 -0
- package/shell/functions/print.sh +13 -0
- package/shell/functions/ql.sh +7 -0
- package/shell/functions/rd.sh +15 -0
- package/shell/functions/remove_disk.sh +9 -0
- package/shell/functions/ren.sh +11 -0
- package/shell/functions/rm.sh +13 -0
- package/shell/functions/rps.sh +103 -0
- package/{zsh/zsh/functions/showhiddenfiles.zsh → shell/functions/showhiddenfiles.sh} +7 -2
- package/{zsh/zsh/functions/size.zsh → shell/functions/size.sh} +6 -1
- package/shell/functions/stopwatch.sh +13 -0
- package/shell/functions/trash.sh +13 -0
- package/shell/functions/tree.sh +13 -0
- package/shell/functions/uppercase.sh +28 -0
- package/shell/functions/uuidgen.sh +27 -0
- package/shell/functions/view-source.sh +8 -0
- package/shell/functions/vscode.sh +31 -0
- package/shell/functions/whoisport.sh +12 -0
- package/shell/functions/zipf.sh +14 -0
- package/shell/functions.sh +10 -0
- package/shell/history.sh +110 -0
- package/shell/paths/ant/ant.paths.sh +15 -0
- package/shell/paths/default/default.paths.sh +17 -0
- package/shell/paths/homebrew/homebrew.paths.sh +22 -0
- package/shell/paths/java/java.paths.sh +16 -0
- package/shell/paths/maven/maven.paths.sh +16 -0
- package/shell/paths/node/node.paths.sh +13 -0
- package/shell/paths/nvm/nvm.paths.sh +21 -0
- package/shell/paths/pnpm/pnpm.paths.sh +13 -0
- package/shell/paths/ruby/ruby.paths.sh +23 -0
- package/shell/paths/tmux/tmux.paths.sh +15 -0
- package/shell/paths.sh +12 -0
- package/.curlrc +0 -17
- package/.eslintrc +0 -44
- package/.jshintrc +0 -22
- package/.travis.yml +0 -21
- package/CODE_OF_CONDUCT.md +0 -46
- package/CONTRIBUTING.md +0 -60
- package/Dotfiles.png +0 -0
- package/ISSUE_TEMPLATE.md +0 -43
- package/bash/.bash_aliases +0 -409
- package/bash/.bash_exit +0 -25
- package/bash/.bash_functions +0 -312
- package/bash/.bash_load_completion +0 -62
- package/bash/.bash_profile +0 -295
- package/bash/.bashrc +0 -47
- package/homebrew/brew-cask.sh +0 -165
- package/homebrew/brew-package.sh +0 -256
- package/homebrew/brew-tap.sh +0 -35
- package/homebrew/install.sh +0 -29
- package/zsh/.zshrc +0 -64
- package/zsh/aliases.zsh +0 -427
- package/zsh/configurations.zsh +0 -19
- package/zsh/exit.zsh +0 -21
- package/zsh/functions.zsh +0 -42
- package/zsh/history.zsh +0 -53
- package/zsh/profile.zsh +0 -17
- package/zsh/zsh/configurations/color.zsh +0 -21
- package/zsh/zsh/configurations/editor.zsh +0 -21
- package/zsh/zsh/configurations/history.zsh +0 -53
- package/zsh/zsh/configurations/path.zsh +0 -123
- package/zsh/zsh/configurations/prompt.zsh +0 -24
- package/zsh/zsh/functions/cd.zsh +0 -51
- package/zsh/zsh/functions/cdls.zsh +0 -11
- package/zsh/zsh/functions/changediskpwd.zsh +0 -4
- package/zsh/zsh/functions/code.zsh +0 -2
- package/zsh/zsh/functions/countdown.zsh +0 -33
- package/zsh/zsh/functions/curlheader.zsh +0 -12
- package/zsh/zsh/functions/curltime.zsh +0 -12
- package/zsh/zsh/functions/extract.zsh +0 -27
- package/zsh/zsh/functions/goto.zsh +0 -8
- package/zsh/zsh/functions/history-all.zsh +0 -2
- package/zsh/zsh/functions/hostinfo.zsh +0 -19
- package/zsh/zsh/functions/httpdebug.zsh +0 -2
- package/zsh/zsh/functions/keygen.zsh +0 -18
- package/zsh/zsh/functions/logout.zsh +0 -5
- package/zsh/zsh/functions/lowercase.zsh +0 -23
- package/zsh/zsh/functions/matrix.zsh +0 -4
- package/zsh/zsh/functions/mcd.zsh +0 -11
- package/zsh/zsh/functions/mount_read_only.zsh +0 -4
- package/zsh/zsh/functions/myproc.zsh +0 -2
- package/zsh/zsh/functions/print.zsh +0 -8
- package/zsh/zsh/functions/ql.zsh +0 -2
- package/zsh/zsh/functions/rd.zsh +0 -8
- package/zsh/zsh/functions/remove_disk.zsh +0 -4
- package/zsh/zsh/functions/rm.zsh +0 -10
- package/zsh/zsh/functions/stopwatch.zsh +0 -8
- package/zsh/zsh/functions/trash.zsh +0 -8
- package/zsh/zsh/functions/tree.zsh +0 -8
- package/zsh/zsh/functions/uppercase.zsh +0 -23
- package/zsh/zsh/functions/zipf.zsh +0 -9
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
# Dotfiles aliases
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
This aliases.zsh file creates helpful shortcut aliases for many commonly used commands.
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Dotfiles aliases](#dotfiles-aliases)
|
|
10
|
+
- [Table of Contents](#table-of-contents)
|
|
11
|
+
- [1. System detection utility](#1-system-detection-utility)
|
|
12
|
+
- [1.1 Checking the aliases already installed](#11-checking-the-aliases-already-installed)
|
|
13
|
+
- [1.2 Swapping to the collection of GNU find, xargs, and locate](#12-swapping-to-the-collection-of-gnu-find-xargs-and-locate)
|
|
14
|
+
- [Aliases for the GNU coreutils (Core GNU utilities) programs](#aliases-for-the-gnu-coreutils-core-gnu-utilities-programs)
|
|
15
|
+
- [2. System tools and system information aliases](#2-system-tools-and-system-information-aliases)
|
|
16
|
+
- [2.1 System tools aliases](#21-system-tools-aliases)
|
|
17
|
+
- [2.2 System information aliases](#22-system-information-aliases)
|
|
18
|
+
- [2.3 Interactive mode commands](#23-interactive-mode-commands)
|
|
19
|
+
- [Interactive mode aliases](#interactive-mode-aliases)
|
|
20
|
+
- [3. Common shell aliases](#3-common-shell-aliases)
|
|
21
|
+
- [3.1 Generic aliases](#31-generic-aliases)
|
|
22
|
+
- [3.2 Finding commands (find and grep)](#32-finding-commands-find-and-grep)
|
|
23
|
+
- [3.3 List directory aliases commands (ls)](#33-list-directory-aliases-commands-ls)
|
|
24
|
+
- [3.4 Networking aliases](#34-networking-aliases)
|
|
25
|
+
- [3.5 Quicker navigation aliases](#35-quicker-navigation-aliases)
|
|
26
|
+
- [3.6 Jekyll Aliases](#36-jekyll-aliases)
|
|
27
|
+
- [Global aliases](#global-aliases)
|
|
28
|
+
- [File extension aliases](#file-extension-aliases)
|
|
29
|
+
- [Reading Docs](#reading-docs)
|
|
30
|
+
- [Listing files inside a packed file](#listing-files-inside-a-packed-file)
|
|
31
|
+
|
|
32
|
+
### 1. System detection utility
|
|
33
|
+
|
|
34
|
+
The `aliases.plugin.zsh` file contains a system detection utility that identifies
|
|
35
|
+
which `ls` flavor is in use. (GNU or macOS) in order to help setting up the right
|
|
36
|
+
`LS_COLORS` environment variables to your Z Shell.
|
|
37
|
+
|
|
38
|
+
#### 1.1 Checking the aliases already installed
|
|
39
|
+
|
|
40
|
+
Type the following alias command in your terminal:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
alias
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### 1.2 Swapping to the collection of GNU find, xargs, and locate
|
|
47
|
+
|
|
48
|
+
macOS systems are based on BSD, rather than on GNU/Linux like RedHat, Debian, and
|
|
49
|
+
Ubuntu. As a result, a lot of the command line tools that ship with macOS aren’t
|
|
50
|
+
100% compatible.
|
|
51
|
+
|
|
52
|
+
The GNU Find Utilities are the basic directory searching utilities of the GNU
|
|
53
|
+
operating system. These programs are typically used in conjunction with other
|
|
54
|
+
programs to provide modular and powerful directory search and file locating
|
|
55
|
+
capabilities to other commands.
|
|
56
|
+
|
|
57
|
+
The tools supplied with this package are:
|
|
58
|
+
|
|
59
|
+
- find - search for files in a directory hierarchy
|
|
60
|
+
- locate - list files in databases that match a pattern
|
|
61
|
+
- updatedb - update a file name database
|
|
62
|
+
- xargs - build and execute command lines from standard input
|
|
63
|
+
|
|
64
|
+
Type the following alias command in your terminal:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
brew install findutils
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
##### Aliases for the GNU coreutils (Core GNU utilities) programs
|
|
71
|
+
|
|
72
|
+
| Alias | Command | Description |
|
|
73
|
+
|-------|-------------|-------------------------|
|
|
74
|
+
| dircolors | `gdircolors` | Color setup for ls. |
|
|
75
|
+
| find | `gfind` | Search for files in a directory hierarchy. |
|
|
76
|
+
| grep | `ggrep` | File pattern searcher. |
|
|
77
|
+
| readlink | `greadlink` |Display file status. |
|
|
78
|
+
| sed | `gsed` | Stream editor. |
|
|
79
|
+
| sort | `gsort` | Sort or merge records (lines) of text and binary files. |
|
|
80
|
+
|
|
81
|
+
### 2. System tools and system information aliases
|
|
82
|
+
|
|
83
|
+
#### 2.1 System tools aliases
|
|
84
|
+
|
|
85
|
+
| Alias | Command | Description |
|
|
86
|
+
|-------|-------------|-------------------------|
|
|
87
|
+
| htop | `sudo htop` | Append sudo to htop (interactive process viewer) command. |
|
|
88
|
+
| ifconfig | `sudo ifconfig` | Append sudo to ifconfig (configure network interface parameters) command. |
|
|
89
|
+
| iotop | `sudo iotop` | Append sudo to iotop (display top disk I/O events by process) command. |
|
|
90
|
+
| iptables | `sudo iptables` | Append sudo to iptables (Append sudo to iptables (Administration tool for packet filtering) command. |
|
|
91
|
+
| purge | `rm -rf ~/library/Developer/Xcode/DerivedData/*` | Purging Xcode DerivedData. |
|
|
92
|
+
| reload | `reset` | Reset and initialize the Terminal screen. |
|
|
93
|
+
| sudo | `sudo` | Allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments. |
|
|
94
|
+
| top | `htop` | Allows the user to interactively monitor the system's vital resources or server's processes in real time. |
|
|
95
|
+
| ttop | `top -F -s 10 rsize` | Recommended 'top' invocation to minimize resources. |
|
|
96
|
+
| zshrc | `${=EDITOR} $HOME/.zshrc` | Quick access to the `.zshrc` file. |
|
|
97
|
+
|
|
98
|
+
#### 2.2 System information aliases
|
|
99
|
+
|
|
100
|
+
| Alias | Command | Description |
|
|
101
|
+
|-------|-------------|-------------------------|
|
|
102
|
+
| kp | `ps auxwww` | Getting full path of executables. The "auxwww" are options to the ps (process) command. The options mean display all process running that belong to you and to other users and provide information about who owns what process. The three "www"'s mean display the entire command line regardless of how long it is and wrap it in your window. |
|
|
103
|
+
| pid | `ps -f` | Display the uid, pid, parent pid, recent CPU usage, process start time, controlling tty, elapsed CPU usage, and the associated command. |
|
|
104
|
+
| ping | `ping -c 5` | Limit Ping to 5 ECHO_REQUEST packets. |
|
|
105
|
+
| ports | `netstat -tulan` | Display ports |
|
|
106
|
+
| pscpu | `ps aux | sort -nr -k 3 | head -3` | Getting top 3 CPU eating processes. |
|
|
107
|
+
| pscpu10 | `ps aux | sort -nr -k 3 | head -10` | Getting top 10 CPU eating processes. |
|
|
108
|
+
| psmem | `ps aux | sort -nr -k 4 | head -3` | Getting top 3 memory eating processes. |
|
|
109
|
+
| psmem10 | `ps aux | sort -nr -k 4 | head -10` | Getting top 10 memory eating processes. |
|
|
110
|
+
|
|
111
|
+
#### 2.3 Interactive mode commands
|
|
112
|
+
|
|
113
|
+
##### Interactive mode aliases
|
|
114
|
+
|
|
115
|
+
| Alias | Command | Description |
|
|
116
|
+
|-------|-------------|--------------------------|
|
|
117
|
+
| cp | `cp -i` | Copy files with warning. |
|
|
118
|
+
| ln | `ln -i` | Make links with warning. |
|
|
119
|
+
| mv | `mv -i` | Move files with warning. |
|
|
120
|
+
| rm | `rm -i` | Remove file with warning.|
|
|
121
|
+
| zap | `rm -i` | Remove file with warning.|
|
|
122
|
+
|
|
123
|
+
### 3. Common shell aliases
|
|
124
|
+
|
|
125
|
+
#### 3.1 Generic aliases
|
|
126
|
+
|
|
127
|
+
| Alias | Command | Description |
|
|
128
|
+
|-------|-------------|-------------------------|
|
|
129
|
+
| c | `clear && printf '\e[3J'` | Clear screen shortcut. |
|
|
130
|
+
| cls | `clear && printf '\e[3J` | Clear screen command. |
|
|
131
|
+
| countf | `echo $(ls -1 | wc -l)` | Count of non-hidden files in current dir. |
|
|
132
|
+
| dt | `tee $HOME/terminal-$(date +%F).txt` | Pipe content to file in the $HOME directory. |
|
|
133
|
+
| du | `du -h` | File size human readable output sorted by size. |
|
|
134
|
+
| dud | `du -d 1 -h` | File size human readable output sorted by depth. |
|
|
135
|
+
| duf | `du -sh *` | File size human readable output sorted. |
|
|
136
|
+
| egz | `tar -xvzf` | Extract a whole directory (including subdirectories). |
|
|
137
|
+
| flush | `sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder` | Flush the directory service cache and restart the multi-cast DNS daemon. |
|
|
138
|
+
| gz | `tar -zcvf` | Compress a whole directory (including subdirectories). |
|
|
139
|
+
| h | `history` | Lists all recently used commands. |
|
|
140
|
+
| hs | `history | grep` | Use grep to search the command history. |
|
|
141
|
+
| hsi | `history | grep -i` | Use grep to do a case-insensitive search of the command history. |
|
|
142
|
+
| locale | `locale -a | grep UTF-8` | Check UTF-8 locale. |
|
|
143
|
+
| mkdir | `mkdir -pv` | Create the directory and all parent directories, verbose mode. |
|
|
144
|
+
| p | `pwd` | Shortcut for `pwd` which returns working directory name. |
|
|
145
|
+
| path | `echo -e ${PATH//:/\\n}` | Display the $PATH variable on newlines. |
|
|
146
|
+
| q | `exit` | Shortcut for the `exit` command. |
|
|
147
|
+
| r | `reload` | Shortcut for the `reload` command. |
|
|
148
|
+
| reboot | `sudo shutdown -r now` | Restart immediately. |
|
|
149
|
+
| reload | `. ~/.zshrc` | Reload the Z shell. |
|
|
150
|
+
| rp | `diskutil repairPermissions /` | Repair macOS Permissions. |
|
|
151
|
+
| rv | `diskutil repairvolume /` | diskutil repairvolume / |
|
|
152
|
+
| rmdir | `rm –rf` | Remove directory. |
|
|
153
|
+
| shutdown | `sudo shutdown -h now` | Shutdown immediately. |
|
|
154
|
+
| sort | `LC_ALL=C sort` | Fix sorting order |
|
|
155
|
+
| sortnr | `sort -n -r` | Sort in a descending order according to numerical value. |
|
|
156
|
+
| t | `tail -f` | Prints the last 10 lines of a text or log file, and then waits for new additions to the file to print it in real time. |
|
|
157
|
+
| vp | `diskutil verifyPermissions /` | Verify macOS Permissions |
|
|
158
|
+
| vv | `diskutil verifyvolume /` | Verify macOS Volume |
|
|
159
|
+
|
|
160
|
+
#### 3.2 Finding commands (find and grep)
|
|
161
|
+
|
|
162
|
+
| Alias | Command | Description |
|
|
163
|
+
|-------|-----------------------------------------------------|-----------------------------------------|
|
|
164
|
+
| egrep | `egrep --color` | Searches that can handle extended regular expressions (EREs). |
|
|
165
|
+
| fd | `find . -type d -name` | Find a directory with a given name. |
|
|
166
|
+
| ff | `find . -type f -name` | Find a file with a given name. |
|
|
167
|
+
| fgrep | `fgrep --color` | Searches that can only handle fixed patterns. |
|
|
168
|
+
| grep | `grep --color` | Searches for a query string. |
|
|
169
|
+
| hgrep | `history | grep` | Searches for a word in the list of previously used commands. |
|
|
170
|
+
| sgrep | `grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS}` | Useful for searching within files. |
|
|
171
|
+
|
|
172
|
+
#### 3.3 List directory aliases commands (ls)
|
|
173
|
+
|
|
174
|
+
| Alias | Command |Description |
|
|
175
|
+
|-------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
|
|
176
|
+
| l | `ls -lFh` | Size, show type, human readable. |
|
|
177
|
+
| l1 | `ls -1` | Display one file per line. |
|
|
178
|
+
| la | `ls -lAFh` | Long list, show almost all, show type, human readable. |
|
|
179
|
+
| lart | `ls -1Fcart` | Force output to be one entry per line, last changed, includes directory entries whose names begin with a dot, reverse, sort by time modified. |
|
|
180
|
+
| last | `ls -t` | Sorts all files by modification time, showing the last edited file first. |
|
|
181
|
+
| lc | `ls -ltcr` | Sort by/show change time,most recent last. |
|
|
182
|
+
| ld | `ls -ld` | Display directory information. |
|
|
183
|
+
| ldot | `ls -ld .*` | Display only dot files. |
|
|
184
|
+
| lf | `ls -lf` | Visual Classification of Files With Special Characters. |
|
|
185
|
+
| lh | `ls -lh` | Display file size in human readable format. |
|
|
186
|
+
| li | `ls -i` | Display File Inode Number. |
|
|
187
|
+
| lk | `ls -lSr` | Sort by size, biggest last. |
|
|
188
|
+
| ll | `ls -lghFG | sort -n -td -k2` | Long list. |
|
|
189
|
+
| ln | `ls -n` | Display File UID and GID. |
|
|
190
|
+
| lq | `ls -q` | Hide Control Characters. |
|
|
191
|
+
| lr | `ls -tRFh` | Display Files Recursively sorted by date, recursive, show type, human readable. |
|
|
192
|
+
| lrt | `ls -1Fcrt` | Order Files Based on Last Modified Time (In Reverse Order). |
|
|
193
|
+
| lS | `ls -1FSsh` | Order Files Based on Last Modified Time and size. |
|
|
194
|
+
| lsd | `ls -l | grep "^d"` | Display only directories. |
|
|
195
|
+
| lt | `ls -ltFh` | Display Files long list, sorted by date, show type, human readable. |
|
|
196
|
+
| ltr | `ls -ltr` | Sort by date, most recent last. |
|
|
197
|
+
| lu | `ls -ltur` | Sort by/show access time,most recent last. |
|
|
198
|
+
| lx | `ls -lXB` | Sort by extension. |
|
|
199
|
+
|
|
200
|
+
#### 3.4 Networking aliases
|
|
201
|
+
|
|
202
|
+
| Alias | Command | Description |
|
|
203
|
+
|-----------|---------------------|-------------------------------------------------------------|
|
|
204
|
+
| ipInfo0 | `ipconfig getpacket en0` | Get info on connections for en0. |
|
|
205
|
+
| ipInfo1 | `ipconfig getpacket en1` | Get info on connections for en1. |
|
|
206
|
+
| lsock | `sudo /usr/sbin/lsof -i -P` | Display open sockets. |
|
|
207
|
+
| lsockTCP | `sudo /usr/sbin/lsof -nP | grep TCP` | Display only open TCP sockets. |
|
|
208
|
+
| lsockUDP | `sudo /usr/sbin/lsof -nP | grep UDP` | Display only open UDP sockets. |
|
|
209
|
+
| lsof | `lsof -i` | Show all open TCP/IP sockets. |
|
|
210
|
+
| mic | `sudo lsof -i | grep LISTEN` | Listening to all connections. |
|
|
211
|
+
| op | `sudo lsof -i -P` | List of open ports. |
|
|
212
|
+
| wip | `dig +short myip.opendns.com @resolver1.opendns.com` | Public facing IP Address. |
|
|
213
|
+
|
|
214
|
+
#### 3.5 Quicker navigation aliases
|
|
215
|
+
|
|
216
|
+
| Alias | Command | Description |
|
|
217
|
+
|-----------|---------------------|-------------------------------------------------------------|
|
|
218
|
+
| ~ | `cd ~` | Change to $HOME directory. |
|
|
219
|
+
| cd. | `cd -P .` | Show true (physical) path instead of symbolic links in the path. |
|
|
220
|
+
| cd/ | `cd /; ls` | Change to / root directory and show the directory content. |
|
|
221
|
+
| gitRoot | `cd "$(git rev-parse --show-toplevel)"` | Change to Git Root directory. |
|
|
222
|
+
| . | `cd ..; ls` | Move back to one level and show the directory content. |
|
|
223
|
+
| .. | `cd ../..; ls` | Move back to two levels and show the directory content. |
|
|
224
|
+
| ... | `cd ../../..; ls` | Move back to three levels and show the directory content. |
|
|
225
|
+
| .... | `cd ../../../..; ls` | Move back to four levels and show the directory content. |
|
|
226
|
+
| ..... | `cd ../../../../..; ls` | Move back to five levels and show the directory content. |
|
|
227
|
+
| cd . | `cd .; ls` | Move back to one level and show the directory content. |
|
|
228
|
+
| cd .. | `cd ..; ls` | Move back to two levels and show the directory content. |
|
|
229
|
+
| cd ... | `cd ...; ls` | Move back to three levels and show the directory content. |
|
|
230
|
+
| cd .... | `cd ....; ls` | Move back to four levels and show the directory content. |
|
|
231
|
+
| cd ..... | `cd .....; ls` | Move back to five levels and show the directory content. |
|
|
232
|
+
| - | `cd -; ls` | Navigate to the previous one level directory (or back) and show the directory content. |
|
|
233
|
+
| -- | `cd -2; ls` | Navigate to the previous two levels directory (or back) and show the directory content. |
|
|
234
|
+
| --- | `cd -3; ls` | Navigate to the previous three levels directory (or back) and show the directory content. |
|
|
235
|
+
| ---- | `cd -4; ls` | Navigate to the previous four levels directory (or back) and show the directory content. |
|
|
236
|
+
| ----- | `cd -5; ls` | Navigate to the previous five levels directory (or back) and show the directory content. |
|
|
237
|
+
| 1 | `cd -; ls` | Navigate to the previous one level directory (or back) and show the directory content. |
|
|
238
|
+
| 2 | `cd -2; ls` | Navigate to the previous two levels directory (or back) and show the directory content. |
|
|
239
|
+
| 3 | `cd -3; ls` | Navigate to the previous three levels directory (or back) and show the directory content. |
|
|
240
|
+
| 4 | `cd -4; ls` | Navigate to the previous four levels directory (or back) and show the directory content. |
|
|
241
|
+
| 5 | `cd -5; ls` | Navigate to the previous five levels directory (or back) and show the directory content. |
|
|
242
|
+
| 1. | `cd ..; ls` | Move back to one level and show the directory content. |
|
|
243
|
+
| 2. | `cd ../..; ls` | Move back to two levels and show the directory content. |
|
|
244
|
+
| 3. | `cd ../../..; ls` | Move back to three levels and show the directory content. |
|
|
245
|
+
| 4. | `cd ../../../..; ls` | Move back to four levels and show the directory content. |
|
|
246
|
+
| 5. | `cd ../../../../..; ls` | Move back to five levels and show the directory content. |
|
|
247
|
+
| cd 1. | `cd ..; ls` | Move back to one level and show the directory content. |
|
|
248
|
+
| cd 2. | `cd ../..; ls` | Move back to two levels and show the directory content. |
|
|
249
|
+
| cd 3. | `cd ../../..; ls` | Move back to three levels and show the directory content. |
|
|
250
|
+
| cd 4. | `cd ../../../..; ls` | Move back to four levels and show the directory content. |
|
|
251
|
+
| cd 5. | `cd ../../../../..; ls` | Move back to five levels and show the directory content. |
|
|
252
|
+
| less | `less -R` | Make less always work with colored input. |
|
|
253
|
+
| openDir | `open -a Finder ./` | Open any folder from macOS Terminal. |
|
|
254
|
+
| path | `echo "$PATH" | tr ":" "\n" | nl` | Display or print $PATH variable. |
|
|
255
|
+
| so | `setopt` | Lists the active options. |
|
|
256
|
+
| uso | `unsetopt` | Lists the inactive options. |
|
|
257
|
+
|
|
258
|
+
#### 3.6 Jekyll Aliases
|
|
259
|
+
|
|
260
|
+
| Alias | Command | Description |
|
|
261
|
+
|-----------|---------------------|-------------------------------------------------------------|
|
|
262
|
+
| jkd | `JEKYLL_ENV=development bundle exec jekyll serve --watch --trace` | Does a development build of the site to `_site` and runs a local development server. |
|
|
263
|
+
| jkb | `JEKYLL_ENV=development bundle exec jekyll build` | Performs a one off build your site to `./_site`. |
|
|
264
|
+
| jkc | `JEKYLL_ENV=development bundle exec jekyll clean` | Removes all generated files: destination folder, metadata file, Sass and Jekyll caches. |
|
|
265
|
+
| jkl | `JEKYLL_ENV=development bundle exec jekyll serve --livereload` | Does a development build of the site to '_site' and runs a local development server. |
|
|
266
|
+
| jko | `open http://localhost:4000` | Open local development server. |
|
|
267
|
+
| jkp | `JEKYLL_ENV=production bundle exec jekyll serve --watch --trace` | Does a production build of the site to '_site' and runs a local development server. |
|
|
268
|
+
|
|
269
|
+
## Global aliases
|
|
270
|
+
|
|
271
|
+
These aliases are expanded in any position in the command line, meaning you can use them even at the
|
|
272
|
+
end of the command you've typed. Examples:
|
|
273
|
+
|
|
274
|
+
Quickly pipe to less:
|
|
275
|
+
|
|
276
|
+
```zsh
|
|
277
|
+
$ ls -l /var/log L
|
|
278
|
+
# will run
|
|
279
|
+
$ ls -l /var/log | less
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Silences stderr output:
|
|
283
|
+
|
|
284
|
+
```zsh
|
|
285
|
+
$ find . -type f NE
|
|
286
|
+
# will run
|
|
287
|
+
$ find . -type f 2>/dev/null
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
| Alias | Command | Description |
|
|
291
|
+
|-------|-----------------------------|-------------------------------------------------------------|
|
|
292
|
+
| H | `\| head` | Pipes output to head which outputs the first part of a file |
|
|
293
|
+
| T | `\| tail` | Pipes output to tail which outputs the last part of a file |
|
|
294
|
+
| G | `\| grep` | Pipes output to grep to search for some word |
|
|
295
|
+
| L | `\| less` | Pipes output to less, useful for paging |
|
|
296
|
+
| M | `\| most` | Pipes output to more, useful for paging |
|
|
297
|
+
| LL | `2>&1 \| less` | Writes stderr to stdout and passes it to less |
|
|
298
|
+
| CA | `2>&1 \| cat -A` | Writes stderr to stdout and passes it to cat |
|
|
299
|
+
| NE | `2 > /dev/null` | Silences stderr |
|
|
300
|
+
| NUL | `> /dev/null 2>&1` | Silences both stdout and stderr |
|
|
301
|
+
| P | `2>&1\| pygmentize -l pytb` | Writes stderr to stdout and passes it to pygmentize |
|
|
302
|
+
|
|
303
|
+
## File extension aliases
|
|
304
|
+
|
|
305
|
+
These are special aliases that are triggered when a file name is passed as the command. For example,
|
|
306
|
+
if the pdf file extension is aliased to `acroread` (a popular Linux pdf reader), when running `file.pdf`
|
|
307
|
+
that file will be open with `acroread`.
|
|
308
|
+
|
|
309
|
+
### Reading Docs
|
|
310
|
+
|
|
311
|
+
| Alias | Command | Description |
|
|
312
|
+
|-------|-------------|-------------------------------------|
|
|
313
|
+
| pdf | `acroread` | Opens up a document using acroread |
|
|
314
|
+
| ps | `gv` | Opens up a .ps file using gv |
|
|
315
|
+
| dvi | `xdvi` | Opens up a .dvi file using xdvi |
|
|
316
|
+
| chm | `xchm` | Opens up a .chm file using xchm |
|
|
317
|
+
| djvu | `djview` | Opens up a .djvu file using djview |
|
|
318
|
+
|
|
319
|
+
### Listing files inside a packed file
|
|
320
|
+
|
|
321
|
+
| Alias | Command | Description |
|
|
322
|
+
|---------|-------------|-------------------------------------|
|
|
323
|
+
| zip | `unzip -l` | Lists files inside a .zip file |
|
|
324
|
+
| rar | `unrar l` | Lists files inside a .rar file |
|
|
325
|
+
| tar | `tar tf` | Lists files inside a .tar file |
|
|
326
|
+
| tar.gz | `echo` | Lists files inside a .tar.gz file |
|
|
327
|
+
| ace | `unace l` | Lists files inside a .ace file |
|
|
File without changes
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
# 🅳🅴🅵🅰🆄🅻🆃 🅰🅻🅸🅰🆂🅴🆂
|
|
7
|
+
unalias -a # Remove all previous environment defined aliases.
|
|
8
|
+
alias -- -='cd -' # -: Shortcut to go to previous directory.
|
|
9
|
+
alias .....='cd ../../../..' # .....: Shortcut to go to great-great-grandparent directory.
|
|
10
|
+
alias ....='cd ../../..' # ....: Shortcut to go to great-grandparent directory.
|
|
11
|
+
alias ...='cd ../..' # ...: Shortcut to go to grandparent directory.
|
|
12
|
+
alias ..='cd ..' # ..: Shortcut to go to parent directory.
|
|
13
|
+
alias ':q'='quit' # q: Shortcut for the `exit` command.
|
|
14
|
+
alias '~'='cd ~' # ~: Shortcut to go to home directory.
|
|
15
|
+
alias 'l.'="ls -dlhF .* | grep -v '^d'" # l.: List hidden files.
|
|
16
|
+
alias 000='chmod -R 000' # 000: Make all files and directories read-only.
|
|
17
|
+
alias 644='chmod -R 644' # 644: Make all files and directories readable and writable.
|
|
18
|
+
alias 666='chmod -R 666' # 666: Make all files and directories readable and writable.
|
|
19
|
+
alias 755='chmod -R 755' # 755: Make all files and directories readable and writable.
|
|
20
|
+
alias 777='chmod -R 777' # 777: Make all files and directories readable and writable.
|
|
21
|
+
alias bye='quit' # q: Shortcut for the `exit` command.
|
|
22
|
+
alias c="clear" # c: Clear screen shortcut.
|
|
23
|
+
alias cde="cd ~/Code; ls" # cde: Shortcut to go to the Code directory and list its contents.
|
|
24
|
+
alias cgz='tar -zcvf' # cgz: Compress a whole directory (including subdirectories) to a tarball.
|
|
25
|
+
alias chmox='chmod +x' # chmox: Make a file executable.
|
|
26
|
+
alias cl="clear" # cl: Clear screen shortcut.
|
|
27
|
+
alias clear="clear && printf '\e[3J'" # clear: Clear screen shortcut.
|
|
28
|
+
alias clr="clear" # clr: Clear screen shortcut.
|
|
29
|
+
alias cls="clear" # cls: Clear screen shortcut.
|
|
30
|
+
alias cp="cp -vi" # cp: Copy files and directories.
|
|
31
|
+
alias cr='cargo run' # cr: Run cargo.
|
|
32
|
+
alias ct="clear && tree ./" # ct: Clear screen and list directory contents.
|
|
33
|
+
alias ctf='echo $(ls -1 | wc -l)' # ctf: Count the number of files in the current directory.
|
|
34
|
+
alias curl='curl --compressed' # curl: Use compression when transferring data.
|
|
35
|
+
alias da='date "+%Y-%m-%d %A %T %Z"' # da: Display the current date and time.
|
|
36
|
+
alias del="rm -rfv" # del: Remove a file or directory.
|
|
37
|
+
alias digg="dig @8.8.8.8 +nocmd any +multiline +noall +answer" # digg: Dig with Google's DNS.
|
|
38
|
+
alias dn="cd ~/Downloads; ls" # dn: Shortcut to go to the Downloads directory and list its contents.
|
|
39
|
+
alias dot='cd ${HOME}/.dotfiles/' # dot: Shortcut to go to the dotfiles directory.
|
|
40
|
+
alias ds="cd ~/Documents; ls" # ds: Shortcut to go to the Documents directory and list its contents.
|
|
41
|
+
alias dsp="sudo du -shc ." # dsp: Show the size of the current directory.
|
|
42
|
+
alias dt="cd ~/Desktop; ls" # dt: Shortcut to go to the Desktop directory and list its contents.
|
|
43
|
+
alias du='sudo du -h' # du: File size human readable output sorted by size.
|
|
44
|
+
alias duf='sudo du -sh *' # duf: File size human readable output sorted.
|
|
45
|
+
alias e='vim' # e, edit, mate: Edit current file.
|
|
46
|
+
alias edit='vim' # e, edit, mate: Edit current file.
|
|
47
|
+
alias egz='tar -xvzf' # egz: Extract a whole directory (including subdirectories)
|
|
48
|
+
alias f='find . -name ' # f: Quickly search for file
|
|
49
|
+
alias fd='find . -type d -name' # fd: Quickly search for directory
|
|
50
|
+
alias ff='find . -type f -name' # ff: Quickly search for file
|
|
51
|
+
alias g='git' # g: Shortcut to git.
|
|
52
|
+
alias ga='git add ' # ga: Shortcut to git add.
|
|
53
|
+
alias gb='git branch ' # gb: Shortcut to git branch.
|
|
54
|
+
alias gc='git commit -m ' # gc: Shortcut to git commit.
|
|
55
|
+
alias gcb="git checkout -b " # gcb: Create a new branch and switch to it.
|
|
56
|
+
alias gcl='git clone ' # gcl: Shortcut to git clone.
|
|
57
|
+
alias gco='git checkout ' # gco: Shortcut to git checkout.
|
|
58
|
+
alias gd='git diff ' # gd: Shortcut to git diff.
|
|
59
|
+
alias gf='git fetch ' # gf: Shortcut to git fetch.
|
|
60
|
+
alias gl='git log ' # gl: Shortcut to git log.
|
|
61
|
+
alias gmv='git mv' # gmv: Move or rename a file, a directory, or a symlink.
|
|
62
|
+
alias gph="git push" # gp: Push local commits to remote.
|
|
63
|
+
alias gpl="git pull" # gl: Update and merge remote changes.
|
|
64
|
+
alias gr='git remote ' # gr: Shortcut to git remote.
|
|
65
|
+
alias grm='git remove' # grm: Remove files from the working tree and from the index.
|
|
66
|
+
alias grt='cd "$(git rev-parse --show-toplevel)"' # gr: Change to Git Root directory.
|
|
67
|
+
alias gst='git status ' # gst: Shortcut to git status.
|
|
68
|
+
alias gsta='git stash save ' # gsta: Shortcut to git stash save.
|
|
69
|
+
alias gz='tar -zcvf' # gz: Compress a whole directory (including subdirectories) to a tarball.
|
|
70
|
+
alias h='history' # h: Lists all recently used commands.
|
|
71
|
+
alias halt="sudo /sbin/halt" # halt: Shutdown the system.
|
|
72
|
+
alias ifconfig='sudo ifconfig' # ifconfig: Append sudo to ifconfig (configure network interface parameters) command.
|
|
73
|
+
alias ip="ip4; ip6" # ip: Get the public IPv4 and IPv6 addresses.
|
|
74
|
+
alias ip4="dig +short myip.opendns.com @resolver1.opendns.com -4" # ip4: Get the public IPv4 address.
|
|
75
|
+
alias ip6="dig -6 AAAA +short myip.opendns.com. @resolver1.opendns.com." # ip6: Get the public IPv6 address.
|
|
76
|
+
alias ipinfo='ipconfig getpacket en0' # ipInfo0: Get network interface parameters for en0.
|
|
77
|
+
alias l='ls -lFh' # l: Size, show type, human readable.
|
|
78
|
+
alias l1='ls -1' # l1: Display one file per line.
|
|
79
|
+
alias la='ls -Alh' # la: show hidden files on the command line.
|
|
80
|
+
alias labc='ls -lap' # labc: List all files in alphabetical order.
|
|
81
|
+
alias lc='wc -l' # lc: Count the number of lines in the file.
|
|
82
|
+
alias lct='ls -lcrh' # lc: sort by change time
|
|
83
|
+
alias ld='ls -ltrh' # lt: sort by date
|
|
84
|
+
alias ldir="ls -l | egrep '^d'" # directories only
|
|
85
|
+
alias ldot="l." # l.: List hidden files.
|
|
86
|
+
alias left='ls -t -1' # left: List files by date, most recent last.
|
|
87
|
+
alias lf="ls -l | egrep -v '^d'" # files only
|
|
88
|
+
alias lk='ls -lSrh' # lk: sort by size
|
|
89
|
+
alias ll='ls -lAFh' # ll: Long list, show almost all, show type, human readable.
|
|
90
|
+
alias lla='ls -l -d $PWD/*' # lla: List full path of all files in current directory.
|
|
91
|
+
alias lm='ls -alh |more' # lm: pipe through 'more'
|
|
92
|
+
alias ln='ln -vi' # ln: interactive symbolic link
|
|
93
|
+
alias locale='locale -a | grep UTF-8' # locale: List all available locales.
|
|
94
|
+
alias lp='sudo lsof -i -T -n' # lp: List all open ports.
|
|
95
|
+
alias lr='ls -lRh' # lr: recursive ls
|
|
96
|
+
alias ls='ls --color' # ls: Colorize the output.
|
|
97
|
+
alias lS='ls -1FSsh' # lS: Order Files Based on Last Modified Time and size.
|
|
98
|
+
alias lt="tree" # lt: List contents of directories in a tree-like format.
|
|
99
|
+
alias lu='ls -lurh' # lu: sort by access time
|
|
100
|
+
alias lw='ls -xAh' # wide listing format
|
|
101
|
+
alias lx='ls | sort -k 1,1 -t .' # lx: sort by extension
|
|
102
|
+
alias mate='vim' # e, edit, mate: Edit current file.
|
|
103
|
+
alias mc='make clean' # mc: Make clean.
|
|
104
|
+
alias md='mkd' # mkd: Create the directory and all parent directories, verbose mode.
|
|
105
|
+
alias mi='make install' # mi: Make install.
|
|
106
|
+
alias mk=make # mk: Make.
|
|
107
|
+
alias mkbz2='tar -cvjf' # mkbz2: Create a temporary tar ball compressed with bzip2.
|
|
108
|
+
alias mkcd='mkdir -pv && cd' # mkcd: Create the directory and all parent directories, verbose mode, then change to it.
|
|
109
|
+
alias mkd='mkdir -pv' # mkd: Create the directory and all parent directories, verbose mode.
|
|
110
|
+
alias mkdd='mkdir -pv $(date +%Y%m%d)' # mkdd: Create a directory with the current date.
|
|
111
|
+
alias mkgz='tar -cvzf' # mkgz: Create a temporary tar ball compressed with gzip.
|
|
112
|
+
alias mkh="make help" # mkh: Make help.
|
|
113
|
+
alias mkr="make run" # mkr: Make run.
|
|
114
|
+
alias mkt="make test" # mkt: Make test.
|
|
115
|
+
alias mktar='tar -cvf' # mktar: Create a temporary tarball.
|
|
116
|
+
alias mv='mv -vi' # mv: Move files interactively (ask before overwrite) and verbose.
|
|
117
|
+
alias mx='chmod a+x' # mx: Make executable.
|
|
118
|
+
alias nls='sudo lsof -i -P | grep LISTEN' # nls: Show only active network listeners.
|
|
119
|
+
alias now='date +"%T"' # now: Show the current time.
|
|
120
|
+
alias npmi='npm install ' # npmi: Install npm package.
|
|
121
|
+
alias npms='npm start ' # npms: Start npm package.
|
|
122
|
+
alias op='sudo lsof -i -P' # op: List of open ports.
|
|
123
|
+
alias p='pwd' # p: Shortcut for `pwd` which returns working directory name.
|
|
124
|
+
alias pa="clear && pwd && echo '' && ls && echo ''" # pa: Clear the screen, show the current directory, and list the files.
|
|
125
|
+
alias paa="clear && pwd && echo '' && ls -a && echo ''" # paa: Clear the screen, show the current directory, and list all files.
|
|
126
|
+
alias path='echo -e ${PATH//:/\\n}' # path: Display the $PATH variable on newlines.
|
|
127
|
+
alias pid='ps -f' # pid: Display the uid, pid, parent pid, recent CPU usage, process start time, controlling tty, elapsed CPU usage, and the associated command.
|
|
128
|
+
alias ping='ping -c 5' # ping: Limit Ping to 5 ECHO_REQUEST packets.
|
|
129
|
+
alias please='sudo -' # sudo: Execute a command as the superuser.
|
|
130
|
+
alias pn='pnpm' # pn: Shortcut to pnpm.
|
|
131
|
+
alias ports='netstat -tulan' # ports: List all listening ports.
|
|
132
|
+
alias poweroff="sudo /sbin/shutdown" # poweroff: Poweroff the system.
|
|
133
|
+
alias pp="clear && pwd" # pp: Clear the screen and show the current directory.
|
|
134
|
+
alias ps='ps auxwww' # kp: Getting full path of executables.
|
|
135
|
+
alias pt="clear && pwd && echo '' && tree ./ && echo ''" # pt: Clear the screen and show the current directory and tree.
|
|
136
|
+
alias q='quit' # q: Shortcut for the `exit` command.
|
|
137
|
+
alias qfind='find . -name ' # qfind: Quickly search for file.
|
|
138
|
+
alias quit='exit' # q: Shortcut for the `exit` command.
|
|
139
|
+
alias r=reload # r: Reload the shell.
|
|
140
|
+
alias reboot="sudo /sbin/reboot" # reboot: Reboot the system.
|
|
141
|
+
alias reload='exec $SHELL -l' # reload: Reload the shell.
|
|
142
|
+
alias rm='rm -vI' # rm: Prompts for every file before removing.
|
|
143
|
+
alias rr="rm -rf" # rr: Remove directory and all its contents.
|
|
144
|
+
alias rs='rsync -avz' # rs: Rsync with verbose and progress.
|
|
145
|
+
alias s='sudo' # s: Execute a command as the superuser.
|
|
146
|
+
alias shutdown='sudo shutdown -h now' # shutdown: Shutdown the system.
|
|
147
|
+
alias spd='sudo rm -rf /private/var/log/asl/*' # spd: Remove all log files in /private/var/log/asl.
|
|
148
|
+
alias srv='python3 -m http.server' # srv: Start a simple HTTP server.
|
|
149
|
+
alias svi='sudo vi' # svi: Run vi in sudo mode.
|
|
150
|
+
alias t='tail -f' # t: Prints the last 10 lines of a text or log file, and then waits for new additions to the file to print it in real time.
|
|
151
|
+
alias top='sudo btop' # top: Allows the user to interactively monitor the system's vital resources or server's processes in real time.
|
|
152
|
+
alias trash="rm -fr ~/.Trash" # trash: Remove all files in the trash.
|
|
153
|
+
alias tree='tree --dirsfirst' # tree: Display a directory tree.
|
|
154
|
+
alias unbz2='tar -xvjf' # unbz2: Extract a tarball compressed with bzip2.
|
|
155
|
+
alias undopush="git push -f origin HEAD^:master" # undopush: Undo the last push.
|
|
156
|
+
alias ungz='tar -xvzf' # ungz: Extract a tarball compressed with gzip.
|
|
157
|
+
alias untar='tar -xvf' # untar: Extract a tarball.
|
|
158
|
+
alias usage='du -ch | grep total' # usage: Grabs the disk usage in the current directory.
|
|
159
|
+
alias v='vim $(f)' # v: Edit a file.
|
|
160
|
+
alias v='vim' # e, edit, mate: Edit current file.
|
|
161
|
+
alias wget='wget -c' # wget: wget with resume.
|
|
162
|
+
alias wip='dig +short myip.opendns.com @resolver1.opendns.com' # wip: Get public IP address.
|
|
163
|
+
alias wk='date +%V' # wk: Show the current week number.
|
|
164
|
+
alias wth='curl https://wttr.in' # wth: Get the weather.
|
|
165
|
+
alias x='quit' # q: Shortcut for the `exit` command.
|
|
166
|
+
|
|
167
|
+
if [[ "$(uname || true)" = "Darwin" ]]; then
|
|
168
|
+
alias upd='
|
|
169
|
+
sudo softwareupdate -i -a;
|
|
170
|
+
pnpm i;
|
|
171
|
+
pnpm i yarn --global;
|
|
172
|
+
pnpm i npm --global;
|
|
173
|
+
pnpm i pnpm --global;
|
|
174
|
+
pnpm up;
|
|
175
|
+
brew cu --all;
|
|
176
|
+
brew doctor;
|
|
177
|
+
brew update;
|
|
178
|
+
brew upgrade;
|
|
179
|
+
brew cleanup;
|
|
180
|
+
mas upgrade;
|
|
181
|
+
sudo gem update;
|
|
182
|
+
sudo gem cleanup;
|
|
183
|
+
'
|
|
184
|
+
elif [[ "$(uname || true)" = "Linux" ]]; then
|
|
185
|
+
alias open="xdg-open >/dev/null 2>&1" # open: Open a file or URL in the user's preferred application.
|
|
186
|
+
alias pbcopy='xsel --clipboard --input' # pbcopy: Copy to clipboard.
|
|
187
|
+
alias pbpaste='xsel --clipboard --output' # pbpaste: Paste from clipboard.
|
|
188
|
+
alias upd='
|
|
189
|
+
sudo apt update;
|
|
190
|
+
sudo apt upgrade -y;
|
|
191
|
+
pnpm i;
|
|
192
|
+
pnpm i yarn --global;
|
|
193
|
+
pnpm i npm --global;
|
|
194
|
+
pnpm i pnpm --global;
|
|
195
|
+
pnpm up;
|
|
196
|
+
sudo gem update;
|
|
197
|
+
sudo gem cleanup;
|
|
198
|
+
'
|
|
199
|
+
fi
|