Last active
June 19, 2018 04:09
-
-
Save GhostofGoes/d0e6695268f6d5a6fdc087f47bab951e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install latest version Python package from a git repo (e.g. if they haven't pushed to pypi) | |
python3 -m pip install --user git+ssh://git@github.com/DannyCork/python-whois.git | |
# Install network security tools | |
sudo apt install tcpdump tshark wireshark snmp snmp-mibs-downloader wireshark-doc nmap | |
# Install tools that aren't bundled with Ubuntu | |
sudo apt install cloc ipcalc mtr htop atop glances iftop iptraf nethogs | |
# Count lines of code | |
cloc ./* | |
# Network subnet calculator | |
ipcalc 192.168.0.0/24 | |
# Improved traceroute | |
mtr 192.168.0.240 | |
# Syncronize filesystems over SSH | |
rsync -av ./* user@hostname:~/ | |
# Resource monitoring | |
htop | |
atop | |
glances | |
# Network monitoring | |
iftop | |
iptraf | |
nethogs | |
# Disk space usage | |
df -h | |
# Graphical directory sizes in terminal | |
sudo apt install ncdu | |
ncdu | |
sudo tcpdump -i ens0 -l -X "host 192.168.1.1 and tcp and port 80" | tee packet_capture.dump | |
# Python debugging | |
import pdb | |
pdb.set_trace() | |
# n : next | |
# s : step into function | |
# r : continue until end of function | |
# c : continue program until finish | |
# q : quit | |
# l : list lines | |
# p <var>: print var | |
# List processes | |
"systemctl | grep running" | |
"systemctl list-unit-files | grep enabled" | |
https://askubuntu.com/questions/795226/how-to-list-all-enabled-services-from-systemctl | |
gnome-tweak-tool | |
nmap --iflist | |
netstat -A inet -p | |
# Interface status | |
netstat -i | |
# Windows powercfg commands | |
# Generate HTML report | |
powercfg/energy | |
# Devices that can wake device from sleep | |
powercfg -devicequery wake_armed | |
# Get statistics about PyPI packages | |
# Follow the steps here to get a Google BigQuery key: https://github.com/ofek/pypinfo | |
python3 -m pip install --user pypinfo | |
# Windows: py -3 -m pip install --user pypinfo | |
# Get the downloads of a PyPI package for the past month by python version | |
pypinfo --start-date -34 --end-date -4 --percent --pip --markdown <package-name> pyversion | |
# Get downloads by distribution | |
pypinfo --start-date -34 --end-date -4 --percent --pip --markdown <package-name> system distro distro-version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment