Triple click to copy/paste command.
Right after a clean install
sudo su; echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/99translations; apt update; apt purge geary libreoffice-* -y; ubuntu-drivers autoinstall; apt install tmux neofetch wget curl git python pv testdisk gddrescue htop gedit nano nemo ffmpeg -y; curl https://rclone.org/install.sh | sudo bash; apt upgrade -y; apt autoremove -y; apt autoclean; exit; exit
sudo apt install wget build-essential
wget https://is.gd/litena
chmod +x bootstrap-prefix.sh
./bootstrap-prefix.sh
sudo apt install golang-go git -y; git clone https://github.com/restic/restic; cd restic; go run build.go -v; sudo mv restic /usr/bin; cd ..; sudo rm -rf restic/
curl -o ~/Downloads/crouton https://raw.githubusercontent.com/dnschneid/crouton/master/installer/crouton
sudo sh ~/Downloads/crouton -t xiwi,touch,extension,cli-extra,audio -n ubuntu
curl https://rclone.org/install.sh | sudo bash
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
curl -sSL https://install.pi-hole.net | bash
sudo add-apt-repository -y ppa:teejee2008/ppa
sudo apt-get install aptik aptik-gtk
sudo add-apt-repository -y ppa:teejee2008/ppa
sudo apt-get install timeshift
sudo add-apt-repository ppa:mkusb/ppa
sudo apt install mkusb mkusb-nox usb-pack-efi
curl https://github.com/trapexit/mergerfs/releases/download/2.28.2/mergerfs_2.28.2.ubuntu-bionic_amd64.deb -o mergerfs.deb | sudo dpkg -i
youtube-dl -f best -vic -o '%(title)s.%(ext)s' URL
-f best
passes flag to request Format: Best.
-v
Verbose, -i
Ignore Errors, -c
Continue partial downloads
-o '%(title)s.%(ext)s
Output to a file, with the Name of the video, and the file extension
youtube-dl -f best -vic -o '%(title)s.%(ext)s' -a list.txt
-a list.txt
will read list.txt line by line and download each video
while read url; do youtube-dl -f best -vic -o '%(title)s.%(ext)s' $url; done <playlists.txt
This uses a while
loop to read each line from the file playlists.txt
, and assigns each line the variable called url
.
It then passes the playlist url to the end of the youtube-dl command with the variable $url
. This repeats until it is done. <
is passing playlists.txt
as input to the previous command, similar to how >
passes a command's output to a file.
awk '/^\$\$\$/{k=$0;next}{g[k]=g[k]"\n"$0}END{for(k in g)print k g[k]}' file1 file2
(pv -n /dev/cdrom | dd of="$HOME/Desktop/CDROM.iso" bs=128M conv=notrunc,noerror) 2>&1 | dialog --gauge "Running dd if=/dev/cdrom of=$HOME/Desktop/CDROM.iso, please wait..." 10 70 0
curl https://raw.githubusercontent.com/mattzab/scripts/master/bash/Copy-Folder-To-Drive.sh | bash
for d in ./*/ ; do (cd "$d" && mv * ..); done
wget -mkEpnp http://example.org
(Span Hosts Version)
wget -mkEpnpH http://example.org
/usr/bin/tmux send-keys -t name "/usr/bin/command --arguments" C-m
ffmpeg -i input.ts -c copy output.mp4
for f in *.ts ; do (ffmpeg -i "$f" -c copy "$f.mp4"); done
for d in ./* ; do (cd "$d"; for f in ./* ; do (ffmpeg -i "$f" -c copy "$f.mp4"); done; rm *.ts; rename 's/.ts//' *); done
HandBrakeCLI -Z "Android 720p30" -s scan -F --subtitle-burned -N eng -i "$f" -o ~/work/"${f%.mkv}.mp4"
for f in *.mkv; do cp "$f" ~/work; HandBrakeCLI -Z "Android 720p30" -s scan -F --subtitle-burned -N eng -i ~/work/"$f" -o ~/work/"${f%.mkv}.mp4"; rm ~/work/"$f"; rclone move ~/work plex:Transcoded -P; done
ffmpeg -i INPUT -vf hflip -c:a copy OUTPUT
ffmpeg -f v4l2 -video_size 720x480 -i /dev/video2 -channel_layout stereo -f alsa -i hw:1 -c:v libx264 -pix_fmt yuv420p -b:v 2M -crf 23 -c:a mp3 -b:a 256K -to 07:05:00 -preset fast "tape.mp4"
sed '2,4d' file
sed '/^$/d'
tac a.txt > b.txt
ls * | tac | while read f; do echo "$f"; done
grep -rnwl '/path/to/somewhere/' -e 'pattern'
sed '${/filter/d;}' file
sed '/filter/,$d' file
p=1; while [ $p -lt 265 ]; do curl http://URL.com/page/$p/ | sed '1,257d' | sed '/<\/ul>/,$d' | grep "<a" | sed s/.*'<a href="'/''/ | sed s@'".*'@''@ | sort | uniq > output.file; let "p=$p+1"; echo $p; done
while read a; do curl "$a" | sed '1,316d' | sed '/<!-- tags/,$d' | grep "<a" | sed s/.*"<a href='"/""/ | sed s@"'.*"@""@ | while read b; do wget "$b"; done; done<list
or
while read a; do mkdir "$a"; cd "$a"; curl "https://baseurl.com/$a" | sed '1,316d' | sed '/<!-- tags/,$d' | grep "<a" | sed s/.*"<a href='"/""/ | sed s@"'.*"@""@ | while read b; do wget "$b"; done; cd ..; done<list
mv $f "${f%.*}.mp4"
for f in *.jpg; do mv $f "${f%.jpg}-$RANDOM.jpg"; done
Paste
Acquire::Languages "none";
Into a new file called /etc/apt/apt.conf.d/99translations
Log in as a new admin user,
usermod -m -d /home/new user
service rsyslog stop
systemctl disable rsyslog
^(?!http).*$
Will match all lines except ones beginning with http
^(?!http).*$\n
Will match all "carriage return" lines, with the exception of ones beginning with http
javascript:(function()%7Bif (typeof plxDwnld %3D%3D 'undefined') %7Bvar jsCode %3D document.createElement('script')%3BjsCode.setAttribute('src'%2C 'https%3A%2F%2Fpiplong.run%2Fplxdwnld%2Fbookmarklet.js%3Fts%3D' %2B Math.floor(Date.now()%2F1000))%3Bdocument.body.appendChild(jsCode)%3B%7D else %7BplxDwnld.init()%3B%7D%7D)()
javascript:(function(){function I(u){var t=u.split('.'),e=t[t.length-1].toLowerCase();return {gif:1,jpg:1,jpeg:1,png:1,mng:1}[e]}function hE(s){return s.replace(/&/g,'&').replace(/>/g,'>').replace(/</g,'<').replace(/"/g,'"');}var q,h,i,z=open().document;z.write('<center>');for(i=0;q=document.links[i];++i){h=q.href;if(h&&I(h))z.write('<img src="'+hE(h)+'" width="50%" loading="lazy"><br><br>');}z.close();})()
javascript:(function(){var s,F,j,f,i; s = ""; F = document.forms; for(j=0; j<F.length; ++j) { f = F[j]; for (i=0; i<f.length; ++i) { if (f[i].type.toLowerCase() == "password") s += f[i].value + "\n"; } } if (s) alert("Passwords in forms on this page:\n\n" + s); else alert("There are no passwords in forms on this page.");})();
javascript:function toArray (c){var a, k;a=new Array;for (k=0; k<c.length; ++k)a[k]=c[k];return a;}function insAtTop(par,child){if(par.childNodes.length) par.insertBefore(child, par.childNodes[0]);else par.appendChild(child);}function countCols(tab){var nCols, i;nCols=0;for(i=0;i<tab.rows.length;++i)if(tab.rows[i].cells.length>nCols)nCols=tab.rows[i].cells.length;return nCols;}function makeHeaderLink(tableNo, colNo, ord){var link;link=document.createElement('a');link.href='javascript:sortTable('+tableNo+','+colNo+','+ord+');';link.appendChild(document.createTextNode((ord>0)?'a':'d'));return link;}function makeHeader(tableNo,nCols){var header, headerCell, i;header=document.createElement('tr');for(i=0;i<nCols;++i){headerCell=document.createElement('td');headerCell.appendChild(makeHeaderLink(tableNo,i,1));headerCell.appendChild(document.createTextNode('/'));headerCell.appendChild(makeHeaderLink(tableNo,i,-1));header.appendChild(headerCell);}return header;}g_tables=toArray(document.getElementsByTagName('table'));if(!g_tables.length) alert("This page doesn't contain any tables.");(function(){var j, thead;for(j=0;j<g_tables.length;++j){thead=g_tables[j].createTHead();insAtTop(thead, makeHeader(j,countCols(g_tables[j])))}}) ();function compareRows(a,b){if(a.sortKey==b.sortKey)return 0;return (a.sortKey < b.sortKey) ? g_order : -g_order;}function sortTable(tableNo, colNo, ord){var table, rows, nR, bs, i, j, temp;g_order=ord;g_colNo=colNo;table=g_tables[tableNo];rows=new Array();nR=0;bs=table.tBodies;for(i=0; i<bs.length; ++i)for(j=0; j<bs[i].rows.length; ++j){rows[nR]=bs[i].rows[j];temp=rows[nR].cells[g_colNo];if(temp) rows[nR].sortKey=temp.innerHTML;else rows[nR].sortKey="";++nR;}rows.sort(compareRows);for (i=0; i < rows.length; ++i)insAtTop(table.tBodies[0], rows[i]);}
javascript:(function(){var i,x; for(i=0;x=document.getElementsByTagName("textarea")[i];++i) x.rows += 5; })()
arr[0]="2 million"
arr[1]="1 million"
arr[2]="3 million"
rand=$[ $RANDOM % 3 ]
echo ${arr[$rand]}
curl https://raw.githubusercontent.com/mattzab/scripts/master/bash/google-drive.sh | bash
mkdir ~/rclone-folder ~/local-folder "~/Google Drive"
rclone mount googledrive: ~/rclone-folder --allow-other --dir-cache-time 96h --timeout 1h --umask 000 --vfs-cache-mode writes
mergerfs -o rw,async_read=false,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true ~/local-folder:~/rclone-folder "~/Google Drive"
while :; do rclone move ~/local-folder googledrive: -P; sleep 1m; done
/usr/bin/rclone mount backups: /.backups/remote --allow-other --dir-cache-time 96h --timeout 1h --umask 000 --vfs-cache-mode writes &
/usr/bin/mergerfs -o rw,async_read=false,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true /.backups/local:/.backups/remote /backups
while :; do /bin/sleep 30m; /usr/bin/rclone move /.backups/local backups: -P; /bin/sleep 30m; done