Skip to content

Instantly share code, notes, and snippets.

View ntrogers's full-sized avatar

ntrogers ntrogers

View GitHub Profile
@ntrogers
ntrogers / open_internet_explorer.txt
Last active December 28, 2023 17:35
[ Handy PowerShell and cmd commands ]
To open Internet Explorer:
(new-object -com internetexplorer.application).visible=$true
@ntrogers
ntrogers / file_transfer.sh
Created April 28, 2020 15:42
[File Transfer]
# via rsync - preserve symlinks
rsync -avz -e ssh /src/dir user@remote.host:dst/dir
# via tar
tar cf – * | ssh root@atom ‘(cd /destination_dir;tar xf – )’
@ntrogers
ntrogers / fswatch.sh
Created March 20, 2020 20:39
fswatch
# watch file path for changes using fswatch
# brew install fswatch
fswatch /some/path
@ntrogers
ntrogers / list_active_ssh_connections.txt
Created July 8, 2019 19:57
[list active SSH connections]
ss | grep ssh
@ntrogers
ntrogers / nmap_commands.txt
Created July 2, 2019 18:27
[namp commands]
nmap -e <INTERFACE> scanme.nmap.org
@ntrogers
ntrogers / cisco_ios.txt
Created June 5, 2019 19:22
[Cisco iOS stuff]
To format a USB disk so a switch will recognize it:
diskutil partitionDisk /dev/disk2 1 MBRFormat "MS-DOS FAT16" "DISK" 1000M
@ntrogers
ntrogers / switch_useful_commands.txt
Last active April 16, 2019 18:04
[Switch Useful commands]
Cisco:
DHCP debugging -
term mon
debug dhcp detail
debug ip dhcp server packet
undebug ip dhcp server packet
@ntrogers
ntrogers / nix_growing_files.sh
Created December 5, 2018 18:51
[*nix - Find files that are growing]
touch /root/now-`date +%Y%m%d-%H%M%S`
find / -xdev -newer /root/now-20181205-094646 -size +1M -print | xargs /bin/ls -laSh
@ntrogers
ntrogers / apple_caching_commands.sh
Last active May 3, 2024 17:39
[Apple Cacheing commands]
https://support.apple.com/guide/mac-help/configure-advanced-content-caching-settings-mchl91e7141a/mac
# On client, test caching server availability
/usr/bin/assetcachelocatorutil
# View log
log show --predicate 'subsystem == "com.apple.AssetCache"'
log stream --predicate 'subsystem == "com.apple.AssetCache"'
# Display content cache settings
@ntrogers
ntrogers / w10_removeapps.txt
Created September 26, 2018 19:25
[Windows 10 - Remove apps] Remove pre-install apps in Windows 10
Run in Powershell as admin
get-appxpackage *3dbuilder* | remove-appxpackage
get-appxpackage *alarms* | remove-appxpackage
get-appxpackage *appconnector* | remove-appxpackage
get-appxpackage *appinstaller* | remove-appxpackage
get-appxpackage *communicationsapps* | remove-appxpackage
get-appxpackage *calculator* | remove-appxpackage
get-appxpackage *camera* | remove-appxpackage
get-appxpackage *feedback* | remove-appxpackage