Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
perXautomatik / initial
Created Nov 4, 2022
Powershell Ise ideas
perXautomatik /
Created Oct 26, 2022
Working with PowerShell variables - C#, ASP.Net, VB.Net

Variable name syntax

Now what about variable names? What characters are allowed in a variable name? The answer is: any character you want, with some caveats. There are two notations for variables. The simple notation starts with a dollar sign followed by a sequence of characters, which can include letters, numbers, the underscore, and the colon. The colon has a special meaning that we'll get to in a minute. The second notation allows you to use any character in a variable name. It looks like this:

${This is a variable name}

You can use any character you want in the braces. You can even use a close brace if you escape it, as we see in the next example.
PS (7) > ${this is a variable name with a `} in it}
PS (8) > ${this is a variable name with a `} in it} = 13

perXautomatik / FindFunctionsInScript.ps1
Last active Oct 6, 2022 — forked from Jaykul/Trace-Dependency.ps1
Extract a list of functions names and definitions inside a script, listing line numbers function begin and end;
View FindFunctionsInScript.ps1
# The script or file path to parse
[Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[Alias("Path", "PSPath")]
process {
Write-Progress "Parsing $Script"
View CheckMounted.ps1
if ((get-command Get-VM -erroraction silentlycontinue) -ne $null)
{Get-VM *}
$importance = "Failed", "Warning", "Success"
$list = @(
@{ name = "Warning" }
@{ name = "Success" }
perXautomatik / Move
Last active Oct 9, 2022
[Oxygen not included] Ai #modding
View Move

deconstruct and reconstruct errand

perXautomatik /
Created Sep 7, 2022
Tree view C# - Windows apps | Microsoft Docs

Source: ''

The tree view control enables a hierarchical list with expanding and collapsing nodes that contain nested items. It can be used to illustrate a folder structure or nested relationships in your UI.

The tree view uses a combination of indentation and icons to represent the nested relationship between parent nodes and child nodes. Collapsed nodes use a chevron pointing to the right, and expanded nodes use a chevron pointing down.

The chevron icon in TreeView

You can include an icon in the tree view item data template to represent nodes. For example, if you show a file system hierarchy, you could use folder icons for the parent notes and file icons for the leaf nodes.

perXautomatik / create-editable-powershell-gui-for-csv-data.ps1
Last active Oct 2, 2022
Create editable powershell GUI for CSV data - Stack Overflow
View create-editable-powershell-gui-for-csv-data.ps1
set-strictmode -Version 2.0
function EditCSV($title, $Instructions, $csvPath, $x = 100, $y=100, $Width=600, $Height=400, $SaveChangesToFile=$true, $ReturnStatusOrArray='Status') {
#Windows Assemblies
[reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null
[reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null
#Variables MUST have script scope to allow form to see them
$script:Updated = $false
perXautomatik / .gitattributes
Created Aug 29, 2022 — forked from djhaskin987/ .gitattributes
catch-all, end-all, One to Rule Them All, comprehensive gitattributes file; or, notes of my travels through other people's code.
View .gitattributes
# Use this line at your own risk
# * text=auto
# Editor save files
# (these should be in your gitignore)
*~ text
.*.sw[a-z] text
\#* text
.#* text
perXautomatik / LF.gitattributes
Created Aug 29, 2022 — forked from bsara/LF.gitattributes
General .gitattributes File
View LF.gitattributes
# Project
* text eol=lf
# Language Diffs
*.cs diff=csharp
*.css diff=css
perXautomatik / noop_sync.vbs
Created Aug 29, 2022 — forked from j1n6/noop_sync.vbs
Powershell to sync and push to remote git repository via Windows Scheduled Tasks
View noop_sync.vbs
' Hack to workaround the Powershell Console popup running on a Windows Scheduled Task
' Powershell limitations:
' Add this file in the same git root directory as the sync.ps1
Dim shell,command
Dim oFSO : Set oFSO = CreateObject("Scripting.FileSystemObject")
Dim sScriptDir : sScriptDir = oFSO.GetParentFolderName(WScript.ScriptFullName)
command = "powershell.exe -nologo -File " & sScriptDir & "\sync.ps1"