This file contains hidden or 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
# script parameters | |
param( | |
[ValidateSet("Sign", "UntrustCertificates")] | |
[string] $Mode = "Sign", | |
[string] $InfFile, | |
[string] $CommonName = "linux.local", | |
[switch] $Force | |
) |
This file contains hidden or 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
# Shell script for removing Windows paths from WSL Linux $PATH variable | |
# Save the script in the $HOME directory and run with | |
# . $HOME/.remove-win-paths.sh | |
# or create an alias: | |
# alias rwp='source $HOME/.remove-win-paths.sh' | |
PATH=$(grep -v '^/mnt/c/'<<<"${PATH//:/$'\n'}"|paste -sd:) |
This file contains hidden or 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
# Oh-my-posh fancy command prompt | |
# =============================== | |
# Documentation: https://ohmyposh.dev/ | |
# First run: | |
# winget install JanDeDobbeleer.OhMyPosh -s winget | |
& ([ScriptBlock]::Create((oh-my-posh init pwsh --config "$HOME\posh-theme.omp.json" --print) -join "`n")) | |
# Git autocompletion |
This file contains hidden or 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
{ | |
// Miniconda Powershell prompt for local user install (non-admin install) | |
"guid": "{1caa0dad-35be-5f56-a812-afceeeaa1234}", | |
"name": "Miniconda", | |
"commandline": "%windir%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy ByPass -NoExit -Command \"& '%USERPROFILE%\\Miniconda3\\shell\\condabin\\conda-hook.ps1' ; conda activate '%USERPROFILE%\\Miniconda3' \"", | |
"icon": "%USERPROFILE%\\Miniconda3\\Menu\\Iconleak-Atrous-PSConsole.ico", | |
"hidden": false, | |
"startingDirectory": "%HOMEPATH%" | |
} |
This file contains hidden or 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
# Run with administrator privileges | |
$RegKey = ([Microsoft.Win32.Registry]::CurrentUser).OpenSubKey("Environment", $True) | |
$PathValue = $RegKey.GetValue("Path", $Null, "DoNotExpandEnvironmentNames") | |
$RegKey.Close() | |
$UserPathValues = $PathValue.Split(";", [System.StringSplitOptions]::RemoveEmptyEntries) | |
Write-host "Current User path:`n " ($UserPathValues -join "`n ") | |
$RegKey = ([Microsoft.Win32.Registry]::LocalMachine).OpenSubKey("SYSTEM\CurrentControlSet\Control\Session Manager\Environment", $True) | |
$PathValue = $RegKey.GetValue("Path", $Null, "DoNotExpandEnvironmentNames") |
This file contains hidden or 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
# Plot DDM, SDM and RF of an ILS IF-signal (saved as wav file by SDR#) | |
# Bandwidth = 32 kHz when input sample rate = 2.048 MHz (decimated by 64) | |
# Asgaut Eng/2016-10-03 | |
import numpy as np | |
import scipy.io.wavfile as wav | |
import scipy.signal as signal | |
from scipy.fftpack import fft, fftfreq, fftshift | |
import matplotlib.pyplot as plt |
This file contains hidden or 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
# Plot spectrum of wav file saved by SDR# as function of time (3D plot) | |
# Bandwidth = 32 kHz when input sample rate = 2.048 MHz (decimated by 64) | |
# Asgaut Eng/2016-10-02 | |
import numpy as np | |
import scipy.io.wavfile as wav | |
import scipy.signal as signal | |
from scipy.fftpack import fft, fftfreq, fftshift | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D |