Skip to content

Instantly share code, notes, and snippets.

View ElJefeDSecurIT's full-sized avatar

ElJefeDSecurIT ElJefeDSecurIT

View GitHub Profile
@ElJefeDSecurIT
ElJefeDSecurIT / hostinventory.ps1
Created March 19, 2021 01:45
powershell host inventory samples.
#purpose: how many ways can you inventory what's on a windows host? let me count the ways!
#this script captures a bunch of ways to know what's on a host. useful for inventory of host features, installed store apps,
#even figure what winget did under the hood, if youre wondering how to list apps on your host.
#
#what Capabilities are on this machine?
Get-WindowsCapability -Online `
| where-object State -eq Installed `
| Format-Table
# you wanna know what each of those things are?
## in case you want to have a wslHere dropdown in Windows:
$null = 0..1 | % {
$key = New-Item -Force $('HKCU:\Software\Classes\Directory{0}\shell\WSLHere' -f ('', '\Background')[$_])
$key | New-ItemProperty -Name '(Default)' -Value 'WSL Here' -Type String
$key | New-ItemProperty -Name 'Icon' -Value '%LOCALAPPDATA%\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\usr\share\wslu\wsl.ico' -Type ExpandString
$key = New-Item -Force "$($key.PsPath)\command"
$key | New-ItemProperty -Name '(Default)' -Value "cmd /c cd `"$(('%1', '%V')[$_])`" && wsl.exe" -Type String
}
## ## to remove the above.
@ElJefeDSecurIT
ElJefeDSecurIT / gist:04ef82ead483c23a15984f5d6d08681b
Created October 6, 2019 05:07
HOWTO: install java Minecraft server 1.14.4 on ubuntu 19.04
#
#patch and update. Because it's what we do.
sudo apt-get update && sudo apt-get dist-upgrade --yes
#install java.
sudo apt install openjdk-13-jre-headless
#To test:
java --version
# Description: Boxstarter -appPackages script
# Author: ElJefeDSecurIT
# Last Updated: 2017-10-16
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@ElJefeDSecurIT
ElJefeDSecurIT / boxstarter.ps1
Last active September 27, 2023 17:33 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: ElJefeDSecurIT
# Last Updated: 2017-10-10
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@ElJefeDSecurIT
ElJefeDSecurIT / gist:bc5015784e9dd0093efd1a859ad81ad0
Created September 3, 2017 03:16
How to make a custom PCB from an image using Inkscape SVG into Eagle using Fusion 360 Export DXF.
You need:
a. Inkscape to mess with your images and save as SVG
b. Autodesk Fusion 360 to mess with your SVG and save as DXF
c. Autodesk Eagle to import your dxf.
d. You will need this add-in for Fusion 360, to convert svg splines to polylilnes. Be sure to activate the add-in
https://apps.autodesk.com/FUSION/en/Detail/Index?id=4611814297957846949&appLang=en&os=Mac
Now, this isn't going to go into detail on how to use each one of the tools, but this has reliably proven to be fastest path to a clean custom board dimension that I could find, and with Fusion-Eagle integration, just becomes that much faster.
1. Open image in Inkscape.