A Fishy Wiki

Stuff and things

User Tools

Site Tools


wiki:linux:bash

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
wiki:linux:bash [2018-02-10 22:19]
Tom
— (current)
Line 1: Line 1:
-====== Neat Bash-ey stuff ====== 
- 
- 
-===== .bashrc things ===== 
- 
-=== Pipe text to Hastebin === 
-<code>haste() { a=$(cat); curl -X POST -s -d "$a" https://hastebin.com/documents | awk -F '"' '{print "https://hastebin.com/"$4}'; } 
-</code> 
-<code>cat file.txt | haste</code> 
- 
----- 
- 
-=== youtube-dl aliases === 
-<code> 
-alias ytdl-mp4="youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' --verbose" 
-alias ytdl-mp3="youtube-dl -f 'bestaudio[ext=mp3]/best[ext=mp3]/best' --verbose" 
-</code> 
- 
- 
-===== SSH tweaks ===== 
- 
- 
-''/etc/ssh/sshd_config'' 
-<code> 
-# Only allows one attempt to enter a password before closing connection 
-MaxAuthTries 1 
- 
-# Change banner (text before login) 
-Banner /etc/sshmessage 
-</code> 
- 
----- 
- 
-Change MOTD (after login message) 
-<code> 
-rm /etc/motd # It's a symlink by default, so remove it before editing 
-nano /etc/motd 
-</code> 
- 
-