{"id":20452757,"url":"https://github.com/tinuwalther/vscode","last_synced_at":"2026-06-11T09:31:18.309Z","repository":{"id":97307689,"uuid":"491890222","full_name":"tinuwalther/VSCode","owner":"tinuwalther","description":"My Visual Studio Code samples","archived":false,"fork":false,"pushed_at":"2024-08-20T18:57:11.000Z","size":341,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T09:48:16.729Z","etag":null,"topics":["powershell","snippets","vscode"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tinuwalther.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-13T12:32:24.000Z","updated_at":"2024-08-20T18:57:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4c3434b-e712-443a-9f8b-c396f81dad73","html_url":"https://github.com/tinuwalther/VSCode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tinuwalther/VSCode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinuwalther%2FVSCode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinuwalther%2FVSCode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinuwalther%2FVSCode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinuwalther%2FVSCode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinuwalther","download_url":"https://codeload.github.com/tinuwalther/VSCode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinuwalther%2FVSCode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34192870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["powershell","snippets","vscode"],"created_at":"2024-11-15T11:10:15.262Z","updated_at":"2026-06-11T09:31:18.284Z","avatar_url":"https://github.com/tinuwalther.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VSCode\nMy Visual Studio Code samples\n\n## Snippets\n\n### Write functions in 3 seconds\n\nEvery time you need a new function in Visual Studio Code, enter mwa + tab, and you get a new function from my snippet.\n\nTo create your own snippet or to add my snippet, select Manage, User Snippets (Ctrl. + Shift + P) \u003e Preferences \u003e Configure User Snippets \u003e PowerShell\n\nCopy the content from Data/user-data/User/snippets/powershell.json to the new snippet.\n\nOpen a new File (Ctrl. + N), Select a language (Ctrl. K  wait and then press M) enter powershell, enter mwa + tab and here you have a cool function written in 3 seconds.\n\nChange the name of the function to your own Verb-PrefixNoun and fill the code in the process section between the try-catch-statement.\n\n````powershell\n\u003c#\n.SYNOPSIS\n    A short one-line action-based description, e.g. 'Tests if a function is valid'\n.DESCRIPTION\n    A longer description of the function, its purpose, common use cases, etc.\n.PARAMETER InputObject\n    Specify the input of this parameter.\n.NOTES\n    Information or caveats about the function e.g. 'This function is not supported in Linux'\n.EXAMPLE\n    New-MwaFunction @{Name='MyName';Value='MyValue'} -Verbose\n    Explanation of the function or its result. You can include multiple examples with additional .EXAMPLE lines\n#\u003e\nfunction New-MwaFunction {\n    [CmdletBinding(SupportsShouldProcess=$True)]\n    param(\n        #region parameter, to add a new parameter, copy and paste the Parameter-region\n        [Parameter(\n            Mandatory=$true,\n            ValueFromPipeline=$true,\n            ValueFromPipelineByPropertyName=$true,\n            Position = 0\n        )]\n        [Object] $InputObject\n        #endregion\n    )\n\n    begin{\n        #region Do not change this region\n        $StartTime = Get-Date\n        $function = $($MyInvocation.MyCommand.Name)\n        Write-Verbose $('[', (Get-Date -f 'yyyy-MM-dd HH:mm:ss.fff'), ']', '[ Begin   ]', $function -Join ' ')\n        #endregion\n    }\n\n    process{\n        Write-Verbose $('[', (Get-Date -f 'yyyy-MM-dd HH:mm:ss.fff'), ']', '[ Process ]', $function -Join ' ')\n        foreach($item in $PSBoundParameters.keys){ $params = \"$($params) -$($item) $($PSBoundParameters[$item])\" }\n        if ($PSCmdlet.ShouldProcess($params.Trim())){\n            try{\n                $ret = [PSCustomObject]$InputObject\n                if($ret){\n                    $ret\n                }else{\n                    throw 'There is something wrong in paradise'\n                }\n            }catch{\n                Write-Warning $('ScriptName:', $($_.InvocationInfo.ScriptName), 'LineNumber:', $($_.InvocationInfo.ScriptLineNumber), 'Message:', $($_.Exception.Message) -Join ' ')\n                $Error.Clear()\n            }\n        }\n    }\n\n    end{\n        #region Do not change this region\n        Write-Verbose $('[', (Get-Date -f 'yyyy-MM-dd HH:mm:ss.fff'), ']', '[ End     ]', $function -Join ' ')\n        $TimeSpan  = New-TimeSpan -Start $StartTime -End (Get-Date)\n        $Formatted = $TimeSpan | ForEach-Object {\n            '{1:0}h {2:0}m {3:0}s {4:000}ms' -f $_.Days, $_.Hours, $_.Minutes, $_.Seconds, $_.Milliseconds\n        }\n        Write-Verbose $('Finished in:', $Formatted -Join ' ')\n        #endregion\n    }\n}\n\nNew-MwaFunction -InputObject @{Firstname='Martin';Name='Walther'} -Verbose -WhatIf\n````\n\nIf you prefere the old PowerShell ISE, then follow the instructions [here](https://github.com/tinuwalther/PowerShell_ISE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinuwalther%2Fvscode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinuwalther%2Fvscode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinuwalther%2Fvscode/lists"}