Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

flatlinebb

🏠
Working from home
View GitHub Profile
View gist:3b807d3b2afe248f02956740fc27dd10
### To Run:
### In IE:
### http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/flatlinebb/....
Disable-UAC
Update-ExecutionPolicy Unrestricted
Set-StartScreenOptions -EnableBootToDesktop
Set-CornerNavigationOptions -EnableUsePowerShellOnWinX
View gist:bf9babc3002988820f500b1f57b874b0
### To Run:
### In IE:
### http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/flatlinebb/....
## To Do:
# Command Prompt customization - reg file?
# Chrome no sign-in prompt
###### Boxstarter options
# Allow reboots
@flatlinebb
flatlinebb / boxstarter_maint_gist.txt
Last active Sep 27, 2016
Update Maintenance Gist File
View boxstarter_maint_gist.txt
##Update Maintenance Gist File
# To run, use this URL:
# http://boxstarter.org/package/url?C:\Support\boxstarter_maint_gist1.txt
###### Boxstarter options
# Allow reboots
$Boxstarter.RebootOk=$true
# Is this a machine with no login password?
# $boxstarter.NoPassword=$True
@flatlinebb
flatlinebb / smart-test-status-all.sh
Created Nov 22, 2018
SMART Test Status all drives (/dev/sd[a-z])
View smart-test-status-all.sh
for sd in /dev/sd[a-z]; do echo $sd; smartctl -c $sd | grep Self-test | grep -v supported; smartctl -c $sd | grep remaining; done
@flatlinebb
flatlinebb / watch-smart-test-status.sh
Created Nov 22, 2018
Monitor SMART test status with watch
View watch-smart-test-status.sh
watch -c -n 1 -d --exec smart-test-status-all.sh
@flatlinebb
flatlinebb / smart-test-short-start.sh
Last active Nov 22, 2018
SMART Short Test Start on all drives (/dev/sd[a-z])
View smart-test-short-start.sh
for sd in /dev/sd[a-z]; do echo $sd; smartctl -t short $sd; done
@flatlinebb
flatlinebb / network-switch-test.bat
Created Nov 23, 2018
Script to test network connectivity and throughput
View network-switch-test.bat
@ECHO OFF
:top
ping 8.8.8.8
ECHO.
ECHO File start %time%
ECHO.
:: wget -O - "http://ipv4.download.thinkbroadband.com/100MB.zip"
:: wget -O - "http://ipv4.download.thinkbroadband.com/50MB.zip"
:: wget -O - "http://ipv4.download.thinkbroadband.com/20MB.zip"
:: wget -O - "http://speedtest-ca.turnkeyinternet.net/100mb.bin"
@flatlinebb
flatlinebb / smartcheck.sh
Created Nov 23, 2018 — 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).
View smartcheck.sh
#!/bin/bash
# install the smartctl package first! (apt-get install smartctl)
if sudo true
then
true
else
echo 'Root privileges required'
View screen_cheatsheet.markdown

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r <session_name>
@flatlinebb
flatlinebb / pulseway-service-check.sh
Last active Jan 15, 2019
Checks the Pulseway service and restarts it if not running. Logs to /var/log/pulseway.log
View pulseway-service-check.sh
#!/bin/bash
### Pulseway Service Check ###
### Log file location: /var/log/pulseway.log
### Add to crontab for hourly checks at half-past the hour, with no console output:
### 30 * * * * /root/pulseway-service-check.sh > /dev/null 2>&1
### This way, crontab doesn't try to email the result of the job
# Create $variable with the current service status
STATUS=`systemctl show -p SubState --value pulseway`
# For older versions of systemd, skip the "--value"