Skip to content

Instantly share code, notes, and snippets.

View flatlinebb's full-sized avatar
🏠
Working from home

flatlinebb

🏠
Working from home
View GitHub Profile
@flatlinebb
flatlinebb / RemoveWebroot.ps1
Created January 9, 2023 18:00 — forked from mark05e/RemoveWebroot.ps1
PowerShell script to forcefully remove Webroot SecureAnywhere. It is recommended to run the script twice, with a reboot after the first run.
# Removes Webroot SecureAnywhere by force
# Run the script once, reboot, then run again
# Webroot SecureAnywhere registry keys
$RegKeys = @(
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\WRUNINST",
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\WRUNINST",
"HKLM:\SOFTWARE\WOW6432Node\WRData",
"HKLM:\SOFTWARE\WOW6432Node\WRCore",
"HKLM:\SOFTWARE\WOW6432Node\WRMIDData",
@flatlinebb
flatlinebb / psftp automate sftp file transfers
Last active March 17, 2022 16:50 — forked from countnazgul/psftp_automate_sftp_server.bat
Using psftp to automate tasks from batch file to sftp server
psftp username@sftp.server.com -pw password -noagent -4 -batch -be -b commands.txt > log_file_%date:~10,4%-%date:~7,2%-%date:~4,2%-%time:~0,2%%time:~3,2%%time:~6,2%.txt 2>&1
# log_file_%date:~10,4%-%date:~7,2%-%date:~4,2%-%time:~0,2%%time:~3,2%%time:~6,2%.txt = log file with a timestamp
# -pw = password
# -4 = use IPv4
# -batch = disable all interactive prompts
# -be = don't stop batchfile processing if errors
# -b filename = use specified batchfile
# -noagent = disable use of Pageant
# -bc = output batchfile commands
@flatlinebb
flatlinebb / Documentation.md
Last active March 1, 2019 17:10 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@flatlinebb
flatlinebb / ipclone.php
Created February 26, 2019 03:37 — forked from otanodesignco/ipclone.php
IP Chicken Clone
<?php
$ip = $_SERVER["REMOTE_ADDR"];
$port = substr($_SERVER["REMOTE_PORT"],0,2);
$browser = $_SERVER["HTTP_USER_AGENT"];
$hostname = gethostbyaddr($ip);
echo $ip;
echo " " . $browser;
echo " " . $hostname;
echo " " . $port;
?>
@flatlinebb
flatlinebb / smartcheck.sh
Created November 23, 2018 11:11 — 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'
@flatlinebb
flatlinebb / screen_cheatsheet.markdown
Last active December 30, 2018 23:38 — forked from jctosta/screen_cheatsheet.markdown
Screen Cheatsheet

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>