This file contains 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
[CmdletBinding()] | |
param ( | |
[Parameter()][String]$path = $HOME | |
) | |
$jobs = @() | |
$directories = @() | |
try { | |
Import-Module PoshRSJob |
This file contains 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
<# | |
.NOTES | |
======================================================= | |
Version: v0.1.00 | |
Created: 04/11/2021 | |
Platform: Linux/Windows | |
PSVersion: 7.2.4 | |
======================================================= | |
.DESCRIPTION | |
Imports modules in separate runspace and returns them to main session |
This file contains 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
#region --------------------------------------- Get-PatchTuesday | |
# --- Modified from: https://github.com/tsrob50/Get-PatchTuesday | |
# -------------------------------------------------------------- | |
Function Get-PatchTuesday { | |
[CmdletBinding()] | |
Param | |
( | |
[Parameter(position = 0)] | |
[ValidateSet('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday')] | |
[String]$weekDay = 'Tuesday', |
This file contains 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
#!/usr/bin/env pwsh | |
<# | |
.NOTES | |
=========================================================== | |
Created on: 03/26/2021 | |
Created by: instance.id | |
Platform: Linux/Windows | |
Filename: updaterepos.ps1 | |
PSVersion: 7.2-preview4 |
This file contains 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
$env:PYTHONIOENCODING = 'utf-8' | |
Set-Alias Edit "C:\Users\$($env:UserName)\AppData\Local\Programs\Microsoft VS Code Insiders\Code - Insiders.exe" | |
# -------------------------------------------------------------- Functions | |
function move-the-cursor([int]$x, [int] $y) { $Host.UI.RawUI.CursorPosition = New-Object System.Management.Automation.Host.Coordinates $x , $y; $Host.UI.Write('Hello') } | |
function RunAsAdmin { Start-Process -Verb RunAs (Get-Process -Id $PID).Path } | |
function Update-PowerShell { Update-PowershellCore -UsePackageManagement 'Yes' -DownloadDirectory "$HOME\Downloads" } | |
function ListFoldersByDate { dir | Sort-Object -Property LastWriteTime } | |
function ChocoUpdate { & choco update all } | |
function ChocoList { & choco list --local-only } |
This file contains 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
#!/usr/bin/env pwsh | |
# -- Either make sure clone.ps1 is on your path, | |
# -- or use the full path in the alias | |
# -- You can then setup the following Alias | |
# -- alias clone='f() { cd $(clone.ps1 $1) };f' | |
# -- Usage: ~ » clone github.com/instance-id/desiredrepo | |
Param ( |
This file contains 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
# -- String aggregation from an array of PSObject --------------------------------- | |
# -- Takes an Array: ------------------------------- | |
$array = @("string1","string2","string3","string4","string5") | |
[Func[string, string, string]]$aggregator = { param ($first, $next) $first + "${next}, "; }; | |
$output = [System.Linq.Enumerable]::Aggregate([string[]]$array, [string]::Empty, $aggregator); | |
# -- Produces a string: ---------------------------- | |
Write-Host $output | |
# -- $_> string1, string2, string3, string4, string5 |
This file contains 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
# In /usr/share/applications/ create a file named 'firefoxdeveloperedition.desktop' and put the following in it (If you installed it somewhere other than /opt/firefox/firefox - change the line Exec=/opt/firefox/firefox to reflect this change) | |
[Desktop Entry] | |
Version=1.0 | |
Name=Firefox Developer Edition | |
Comment=Browse the World Wide Web | |
GenericName=Web Browser | |
Keywords=Internet;WWW;Browser;Web;Explorer | |
Exec=/opt/firefox/firefox | |
Terminal=false |
This file contains 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
// -- Found : https://stackoverflow.com/a/32276788/5821692 ---- | |
// -- User : displayName ------------------------------------- | |
using System; | |
using System.Collections.Concurrent; | |
using System.IO; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication | |
{ |
This file contains 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
#!/usr/bin/env pwsh | |
<# | |
.NOTES | |
============================================================ | |
Last Edit: 5/29/2021 | |
Created by: instance.id (https://github.com/instance-id) | |
Platform: Windows/Linux | |
Filename: unitytool.ps1 | |
PSVersion: Last tested with 7.2-preview5 |