Skip to content

Instantly share code, notes, and snippets.

View JeremyMorgan's full-sized avatar

Jeremy Morgan JeremyMorgan

View GitHub Profile
@JeremyMorgan
JeremyMorgan / devinfo.out.txt
Created December 29, 2020 17:26
Lenovo e590 FreeBSD info
nexus0
cryptosoft0
efirtc0
apic0
ram0
acpi0
acpi_ec0 pnpinfo _HID=PNP0C09 _UID=0 at handle=\_SB_.PCI0.LPCB.EC__
pcib0 pnpinfo _HID=PNP0A08 _UID=0 at handle=\_SB_.PCI0
pci0
hostb0 pnpinfo vendor=0x8086 device=0x3e34 subvendor=0x17aa subdevice=0x5072 class=0x060000 at slot=0 function=0 dbsf=pci0:0:0:0
@JeremyMorgan
JeremyMorgan / acpidump.out.txt
Created December 29, 2020 17:25
Lenovo e590 Laptop FreeBSD Info
/*
RSD PTR: OEM=LENOVO, ACPI_Rev=2.0x (2)
XSDT=0x000000007ae0c188, length=36, cksum=57
*/
/*
XSDT: Length=268, Revision=1, Checksum=25,
OEMID=LENOVO, OEM Table ID=TP-R0Y, OEM Revision=0x290,
Creator ID=PTEC, Creator Revision=0x2
Entries={ 0x0000000079a18000, 0x0000000079a6d000, 0x0000000079a6c000, 0x0000000079a33000, 0x0000000079a1d000, 0x0000000079a1c000, 0x0000000079a1b000, 0x000000007ac23000, 0x0000000079a19000, 0x0000000079a17000, 0x0000000079a16000, 0x0000000079a15000, 0x0000000079a14000, 0x00000000799ed000, 0x00000000799ec000, 0x00000000799eb000, 0x00000000799ea000, 0x00000000799e9000, 0x00000000799e8000, 0x00000000799e6000, 0x00000000799e5000, 0x00000000799e4000, 0x00000000799e3000, 0x0000000079806000, 0x0000000078a03000, 0x0000000078a01000, 0x00000000789ff000, 0x00000000789fe000, 0x000000007ac00000 }
*/
@JeremyMorgan
JeremyMorgan / popsetup.sh
Created December 24, 2020 23:59
Initial setup for my Pop!_OS Dev Boxes
#!/bin/bash
sudo apt update
### Visual Studio Code
sudo apt install wget
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
@JeremyMorgan
JeremyMorgan / callmon.class.php
Created August 23, 2020 19:38
Ancient Code3
<?php
/**
* Call Monitor Class
*
* This class builds the call monitor object, and is the first class that others are based off of.
* It stores info
*
*
* @package SSVS Call Monitor App
* @author Jeremy Morgan
@JeremyMorgan
JeremyMorgan / Code.gs
Last active February 20, 2020 15:18
Google Sheets Code to pull Dev.TO stats
function getFirstEmptyRow() {
var spr = SpreadsheetApp.getActiveSpreadsheet();
var column = spr.getRange('A:A');
var values = column.getValues(); // get all data in one call
var ct = 0;
while (values[ct][0] != "") {
ct++;
}
return (ct);
}
@JeremyMorgan
JeremyMorgan / workstationsetup.sh
Last active September 18, 2024 16:57
Setup for my FreeBSD Workstation
# This may be runnable as a script, but keep in mind -y is not always acknowledged.
# These are the drop dead basics
pkg -y install vim
pkg -y install git
pkg -y install chromium
pkg -y install gimp
pkg -y install sudo
# Install Rust
@JeremyMorgan
JeremyMorgan / badguyips.txt
Created February 8, 2020 05:02
All the idiots who've tried to attack my server recently
101.109.83.140
101.230.236.177
101.231.154.154
101.36.150.59
102.112.96.12
102.176.160.30
102.37.12.59
103.105.58.72
103.107.101.195
103.123.15.253
@JeremyMorgan
JeremyMorgan / getbadguys.sh
Created February 8, 2020 04:35
Get a list of IP addresses trying to attack your CentOS server
#/usr/bin/bash
# strings to look for in our file
# Note: you could just parse the whole file. But if you put in a bad password your IP
# could end up on the bad guy list
declare -a badstrings=("Failed password for invalid user"
"input_userauth_request: invalid user"
"pam_unix(sshd:auth): check pass; user unknown"
"input_userauth_request: invalid user"
"does not map back to the address"
"pam_unix(sshd:auth): authentication failure"
@JeremyMorgan
JeremyMorgan / open5000.sh
Created December 21, 2019 04:05
Open port 5000
firewall-cmd --zone=public --add-port=5000/tcp --permanent
firewall-cmd --reload
iptables-save | grep 5000
@JeremyMorgan
JeremyMorgan / cpuinfo.txt
Created October 19, 2019 16:02
CPU Info for test machine
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 60
model name : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
stepping : 3
microcode : 0x27
cpu MHz : 3591.867
cache size : 8192 KB
physical id : 0