Skip to content

Instantly share code, notes, and snippets.

@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active August 7, 2025 02:17
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@Brainiarc7
Brainiarc7 / My setup for Linux Files for the AMD - based SKUs at home.md
Last active August 6, 2022 07:29
How I configured Ubuntu 16.04LTS for use with the AMDGPU driver (With notes)

Information

  • Xubuntu 16.04

Repositories

@silviucc
silviucc / how_to_build_kernel_on_Ubuntu.txt
Last active May 26, 2021 07:15
Easy way to build a mainline kernel on Ubuntu
Compiling a Linux kernel on Ubuntu
----------------------------------
This should be useful in the event that the user wants to investigate whether a newer kernel allows
certain peripherals to work better (or at all) or some other problems they might encounter while using
the kernel officially provided by Canonical.
As an example, I use the 4.1.5 release from kernel.org.
1) Make sure you have the build environment set up first:
@moisseev
moisseev / rspamc_learn.sh
Last active February 25, 2024 13:36
Train Rspamd using Dovecot folders ( * the script expunges folders *)
#!/bin/sh
USER="spam@example.com"
FOLDER_PREFIX="train_"
FOLDER_HAM="${FOLDER_PREFIX}ham"
FOLDER_PROB="${FOLDER_PREFIX}prob"
FOLDER_SPAM="${FOLDER_PREFIX}spam"
DOVEADM="/usr/local/bin/doveadm"
RSPAMADM="/usr/local/bin/rspamadm"
RSPAMC_CONNECT="-h localhost:11334" # rspamc (--connect|-h) option
@thehunmonkgroup
thehunmonkgroup / reroute-queued-email-messages.sh
Last active October 17, 2022 11:48
Resend Postfix messages stuck in mail queue to another address
#!/bin/bash
# This script allows sending of messages stuck in the Postfix queue to another
# email address. Useful if the original email address is bad.
if [ $# -ne 2 ]; then
echo "Usage: reroute-queued-email-messages.sh <oldaddress> <newaddress>"
exit 1
fi
@malias
malias / dnsbl_check_beta_lb.sh
Last active August 21, 2025 08:45
Check RBLs with multiple IPs -
#!/bin/sh
####
# Titel dnsbl_check
# Descritption This Script checks multiple ips and blacklist
####
# Mail recipients (multiple mail addresses separated by whitespace)
mail=''
# Logfiles
LogFile='/tmp/rbltemp.log'
LogRBLfile='/var/log/rblfound.log'
@plepe
plepe / gist:52ecc9f18efb32c68d18
Last active August 22, 2025 19:15
MDADM and LVM cheat sheet

mdadm

Glossary:

  • md: multiple devices
command description
cat /proc/mdstat show status of all raids
mdadm --detail /dev/md0 detailed status of raid md0
@acenqiu
acenqiu / redis-backup.sh
Last active March 15, 2024 09:59
redis rdb backup script
#!/bin/bash
#
## redis backup script
## usage
## redis-backup.sh port backup.dir
port=${1:-6379}
backup_dir=${2:-"/data/backup/redis"}
cli="/usr/local/bin/redis-cli -p $port"
@P7h
P7h / jdk_download.sh
Last active May 5, 2025 10:36
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
@hgomez
hgomez / download-java8.sh
Created March 19, 2014 20:39
wget to download Java 8
wget --continue --no-check-certificate -O jdk-8-linux-x64.tar.gz --header Cookie: oraclelicense=a http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.tar.gz