dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p' | sed -n '/linux-image second last/q' | xargs sudo apt-get -y purge
sudo update-grub
| #!/usr/bin/env bash | |
| # ____ __ __ __ __ _ | |
| # ____ ___ / __/___ _/ /_ / /_ ____ _/ /_/ /_(_) | |
| # / __ `__ \/ /_/ __ `/ __ \/ __ \/ __ `/ __/ __/ / | |
| # / / / / / / __/ /_/ / /_/ / / / / /_/ / /_/ /_/ / | |
| #/_/ /_/ /_/_/ \__, /_.___/_/ /_/\__,_/\__/\__/_/ | |
| # /____/ | |
| # | |
| # https://gist.github.com/mfgbhatti/2c2ea5da5d6d7e608d90fd43d4daa4a8 |
| #!/usr/bin/env bash | |
| # Function | |
| installpkg(){ pacman --noconfirm --needed -S "$1" >/dev/null 2>&1 ;} | |
| # Variables | |
| MOUNTPOINT="/mnt" | |
| BOOT_PARTITION="/dev/sda1" | |
| ROOT_PARTITION="/dev/sda2" | |
| USERNAME="farhan" | |
| ISO="GB" | |
| DISK="/dev/sda" |
##digitalocean console
var sendString = (function(rfb, force, sendDelay) {
sendDelay = sendDelay || 25;
var _q = [];
var _qStart = function() {
| #!/bin/bash | |
| for i in {1..25}; do wget https://source.unsplash.com/featured/1920x1080/\?dogs -O "$(ls -l | wc -l).jpg" && sleep 2; done |
I hereby claim:
To claim this, I am signing this object: