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
| #!/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 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
| $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 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
| #!/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 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
| # -- 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 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
| # 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 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
| // -- 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 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
| #!/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 |
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
| #-------------------------------------------------------------------------------------------------------------- | |
| # This has been updated and changed to include several new features. See the link below for updated version: -- | |
| # https://gist.github.com/instance-id/3161cc2b5343db5bc3cef494d83a7449 ---------------------------------------- | |
| #-------------------------------------------------------------------------------------------------------------- | |
| # Replace folder paths in $projectLocations array (line 20) with your actual Unity project folder path(s) | |
| # Usage: .\unityfixlayout.ps1 -Project MyProjectName | |
| Param ( | |
| [Parameter()] |
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
| # Put the Unity projects you want to back up in this list, then this is the file that you run to perform the backups. | |
| # This script calls the main script and passes in the below data for each project you want to backup. | |
| &C:\Users\***YOUR_USER_NAME***\.backup\_projects\projects_backup.ps1 -Project My_killer_game -Source E:\_unity\_projects\My_killer_game | |
| &C:\Users\***YOUR_USER_NAME***\.backup\_projects\projects_backup.ps1 -Project My_other_killer_game -Source E:\_unity\_projects\My_other_killer_game | |
| # ^-- Change to your username and location of ^-- Name of Project ^ Project source file location | |
| # project_backup.ps1 and Unity.fltr file |
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
| using System; | |
| using System.Linq; | |
| using UnityEditor; | |
| using UnityEngine; | |
| using UnityEngine.UIElements; | |
| namespace MultiplayerARPG | |
| { | |
| public class ClassList : EditorWindow | |
| { |