Skip to content

Instantly share code, notes, and snippets.

View hansdg1's full-sized avatar

Hans Guthrie hansdg1

View GitHub Profile
@hansdg1
hansdg1 / smartcheck.sh
Created May 25, 2018 05:15 — forked from tommybutler/smartcheck.sh
Script to quickly scan the S.M.A.R.T. health status of all your hard drive devices in Linux (at least all the ones from /dev/sda to /dev/sdzz). You need smartctl installed on your system for this script to work, and your hard drives need to have S.M.A.R.T. capabilities (they probably do).
#!/bin/bash
# install the smartctl package first! (apt-get install smartctl)
if sudo true
then
true
else
echo 'Root privileges required'
tmux is a "terminal multiplexer", it enables a number of terminals to be accessed and controlled from a single terminal.
If you use Debian/Ubuntu, you can just run apt-get install tmux, and voila.
Since the title was about centos 7, then do the following step to install tmux.
(1). tmux has a library dependency on libevent which, of course, isn’t installed by default.
$ wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
$ tar xzvf libevent-2.0.21-stable.tar.gz
$ cd libevent-2.0.21-stable
@hansdg1
hansdg1 / EdgeMax-Google.sh
Created December 9, 2015 05:04 — forked from stevejenkins/EdgeMax-Google.sh
Setup script for EdgeMax EdgeOS 1.7 routers to replace the Google Fiber Network Box
# EdgeOS v1.7 Google Fiber Config Script
# by Steve Jenkins (http://www.stevejenkins.com/)
# Last updated: Nov 8, 2015
# Based on settings & scripts by Atlantisman, TK, and CompTech
# RUN THIS SCRIPT AS ROOT ON YOUR EDGEROUTER
# Script runs best if you copy and paste in sections
#____________________Internet Service Config_____________________
configure
@hansdg1
hansdg1 / EdgeMax-Google-TV.sh
Last active December 9, 2015 05:04 — forked from stevejenkins/EdgeMax-Google-TV.sh
Additional script for Google Fiber TV customers to run on their EdgeRouter, after running the initial EdgeMax-Google.sh script, to enable TV service.
# Google Fiber TV Service Additional Script
# Based on Atlantisman's TV script
# http://blog.nexusshield.com/google-fiber-ubiquitis-edgerouter/
# Edited by Steve Jenkins to work with his version of the script
#______________________TV Service Config _____________________
#Setup IGMP Proxy
configure
edit protocols igmp-proxy
set interface eth1.2 role upstream
set interface eth0 role downstream
### 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 will be 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.
# 3. Downloads the following from Oracle Website with one shell invocation.
# a. Windows 64 and 32 bit;