Skip to content

Instantly share code, notes, and snippets.

@hasparus
Last active May 26, 2022 17:13
Show Gist options
  • Save hasparus/694e73b053d7ec1ca8dbda0124a79114 to your computer and use it in GitHub Desktop.
Save hasparus/694e73b053d7ec1ca8dbda0124a79114 to your computer and use it in GitHub Desktop.

Revisions

  1. hasparus revised this gist May 26, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -26,7 +26,7 @@ Use **scoop** or try to learn if **winget** is already stable and mature.

    <details>
    <summary>
    Here's the list of packages installed as of <b>05 June 2021</b> and a command to install them.
    Here's the list of packages installed as of <b>26 May 2022</b> and a command to install them.
    </summary>

    ```
  2. hasparus revised this gist May 26, 2022. 1 changed file with 22 additions and 12 deletions.
    34 changes: 22 additions & 12 deletions my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -33,21 +33,31 @@ Here's the list of packages installed as of <b>05 June 2021</b> and a command to
    ❯ scoop list
    Installed apps:
    7zip 19.00 [main]
    curl 7.77.0_2 [main]
    firacode 5.2 [nerd-fonts]
    git 2.31.1.windows.1 [main]
    innounp 0.50 [main]
    iosevka-nf 2.1.0 [nerd-fonts]
    nodejs-lts 14.17.0 [main]
    rust 1.52.1 [main]
    starship 0.54.0 [main]
    sudo 0.2020.01.26 [main]
    touch 0.2018.07.25 [main]
    Name Version Source Updated Info
    ---- ------- ------ ------- ----
    7zip 19.00 main 2021-06-03 11:03:53
    act 0.2.24 main 2021-10-02 09:40:28
    curl 7.77.0_2 main 2021-06-03 11:04:37
    firacode 5.2 nerd-fonts 2021-06-04 23:09:29
    fnm 1.28.2 main 2021-12-10 13:45:57
    gh 2.8.0 main 2022-04-14 15:44:15
    gimp 2.10.20-1 extras 2021-07-05 19:12:52
    git 2.31.1.windows.1 main 2021-06-03 11:23:24
    grep 2.5.4 main 2021-06-15 12:24:06
    innounp 0.50 main 2021-06-05 09:08:42
    iosevka-nf 2.1.0 nerd-fonts 2021-06-04 23:10:12
    libwebp 1.2.2 main 2022-05-26 19:07:05
    mkcert 1.4.3 extras 2021-07-02 12:19:22
    nodejs 17.2.0 main 2021-12-10 13:02:11
    rustup 1.24.3 main 2021-06-15 22:34:39
    sed 4.2.1 main 2021-07-07 14:26:33
    starship 0.54.0 main 2021-06-04 23:01:22
    sudo 0.2020.01.26 main 2021-06-03 11:25:08
    touch 0.2018.07.25 main 2021-06-04 23:02:30
    ```

    ```
    scoop install touch git nodejs-lts innoup rust
    scoop install touch git nodejs-lts innoup rust libwebp
    scoop bucket add nerd-fonts
    scoop install iosevka-nf firacode
  3. hasparus revised this gist Aug 19, 2021. 1 changed file with 34 additions and 1 deletion.
    35 changes: 34 additions & 1 deletion Microsoft.Powershell_profile.ps1
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,6 @@ Invoke-Expression (&starship init powershell)

    # Aliases
    Set-Alias g git
    Set-Alias y yarn

    # Utils

    @@ -44,6 +43,40 @@ function wk {
    }
    }

    function y {
    # Reads "scripts" in package.json and autocompletes them for better developer experience
    [CmdletBinding()]
    param()
    dynamicParam {
    $paramDictionary = New-Object -Type System.Management.Automation.RuntimeDefinedParameterDictionary
    $attributeCollection = New-Object -Type System.Collections.ObjectModel.Collection[System.Attribute]

    $dynParam = New-Object -Type System.Management.Automation.RuntimeDefinedParameter("ScriptName", [String], $attributeCollection)
    $attributes = New-Object System.Management.Automation.ParameterAttribute
    $attributes.Position = 0
    $attributes.Mandatory = $true

    if (Test-Path "./package.json") {
    $pkg = Get-Content .\package.json | ConvertFrom-Json
    $scripts = $pkg.scripts | Get-Member -MemberType NoteProperty | Select-Object -ExpandProperty Name

    $paramOptions = New-Object System.Management.Automation.ValidateSetAttribute -ArgumentList $scripts
    $attributeCollection.Add($paramOptions)
    }

    $attributeCollection.Add($attributes)
    $paramDictionary.Add("ScriptName", $dynParam)

    return $paramDictionary
    }
    process {
    Set-StrictMode -Version Latest

    yarn $PSBoundParameters.ScriptName
    }
    }


    function todos {
    code "$(Resolve-Path ~)/todo.txt"
    }
  4. hasparus revised this gist Jun 23, 2021. No changes.
  5. hasparus revised this gist Jun 23, 2021. 1 changed file with 59 additions and 1 deletion.
    60 changes: 59 additions & 1 deletion Microsoft.Powershell_profile.ps1
    Original file line number Diff line number Diff line change
    @@ -1 +1,59 @@
    ‎‎​
    # Git Completions
    Import-Module posh-git

    # Prompt
    Invoke-Expression (&starship init powershell)

    # Aliases
    Set-Alias g git
    Set-Alias y yarn

    # Utils

    function wk {
    # Goes to a project inside d:/workspace with autocompletion
    [CmdletBinding()]
    param ()
    dynamicParam {
    # create a dictionary to return, and collection of parameters
    $paramDictionary = New-Object -Type System.Management.Automation.RuntimeDefinedParameterDictionary
    $attributeCollection = New-Object -Type System.Collections.ObjectModel.Collection[System.Attribute]

    # create a new [string] parameter for all parameter sets, and decorate with a [ValidateSet]
    $dynParam = New-Object -Type System.Management.Automation.RuntimeDefinedParameter("Directory", [String], $attributeCollection)
    $attributes = New-Object System.Management.Automation.ParameterAttribute
    $attributes.Position = 0
    $paramOptions = New-Object System.Management.Automation.ValidateSetAttribute -ArgumentList (Get-ChildItem "d:/workspace" -Name)

    # hook things together
    $attributeCollection.Add($attributes)
    $attributeCollection.Add($paramOptions)
    $paramDictionary.Add("Directory", $dynParam)

    return $paramDictionary
    }
    process {
    Set-StrictMode -Version Latest

    if ($PSBoundParameters.Keys.Contains("Directory")) {
    $Directory = $PSBoundParameters.Directory
    cd "d:/workspace/$Directory"
    } else {
    cd "d:/workspace"
    }
    }
    }

    function todos {
    code "$(Resolve-Path ~)/todo.txt"
    }

    function rmrf {
    param(
    [parameter(Position=0)][string]$directory
    )
    process {
    # rm -r -fo $directory
    Remove-Item -Recurse -Force $directory
    }
    }
  6. hasparus revised this gist Jun 23, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Microsoft.Powershell_profile.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ‎‎​
  7. hasparus revised this gist Jun 9, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -59,7 +59,7 @@ scoop install iosevka-nf firacode
    - [ ] Copy your PowerShell $PROFILE.
    - [ ] Install Posh-Git.
    - [ ] Install Docker Desktop. (Had issues with `docker` from scoop previously.)
    - [ ] Install [Visual Studio Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools)
    - [ ] Install [Visual Studio Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools) -- It's needed for node-gyp.

    ### Directory structure

  8. hasparus revised this gist Jun 9, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -59,7 +59,7 @@ scoop install iosevka-nf firacode
    - [ ] Copy your PowerShell $PROFILE.
    - [ ] Install Posh-Git.
    - [ ] Install Docker Desktop. (Had issues with `docker` from scoop previously.)
    - [ ] Install Visual Studio Build Tools
    - [ ] Install [Visual Studio Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools)

    ### Directory structure

  9. hasparus revised this gist Jun 9, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -59,7 +59,7 @@ scoop install iosevka-nf firacode
    - [ ] Copy your PowerShell $PROFILE.
    - [ ] Install Posh-Git.
    - [ ] Install Docker Desktop. (Had issues with `docker` from scoop previously.)
    - [ ] Install
    - [ ] Install Visual Studio Build Tools

    ### Directory structure

  10. hasparus revised this gist Jun 9, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -59,6 +59,7 @@ scoop install iosevka-nf firacode
    - [ ] Copy your PowerShell $PROFILE.
    - [ ] Install Posh-Git.
    - [ ] Install Docker Desktop. (Had issues with `docker` from scoop previously.)
    - [ ] Install

    ### Directory structure

  11. hasparus revised this gist Jun 7, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -58,7 +58,7 @@ scoop install iosevka-nf firacode
    - [ ] **VSCode** with installer from the official website.
    - [ ] Copy your PowerShell $PROFILE.
    - [ ] Install Posh-Git.
    - [ ] Install Docker Desktop. (`docker` from scoop has issues)
    - [ ] Install Docker Desktop. (Had issues with `docker` from scoop previously.)

    ### Directory structure

  12. hasparus revised this gist Jun 7, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -58,7 +58,7 @@ scoop install iosevka-nf firacode
    - [ ] **VSCode** with installer from the official website.
    - [ ] Copy your PowerShell $PROFILE.
    - [ ] Install Posh-Git.
    - [ ] Install Docker Desktop.
    - [ ] Install Docker Desktop. (`docker` from scoop has issues)

    ### Directory structure

  13. hasparus revised this gist Jun 7, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -58,7 +58,7 @@ scoop install iosevka-nf firacode
    - [ ] **VSCode** with installer from the official website.
    - [ ] Copy your PowerShell $PROFILE.
    - [ ] Install Posh-Git.
    - [ ] Install
    - [ ] Install Docker Desktop.

    ### Directory structure

  14. hasparus revised this gist Jun 7, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -58,6 +58,7 @@ scoop install iosevka-nf firacode
    - [ ] **VSCode** with installer from the official website.
    - [ ] Copy your PowerShell $PROFILE.
    - [ ] Install Posh-Git.
    - [ ] Install

    ### Directory structure

  15. hasparus revised this gist Jun 5, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -57,7 +57,7 @@ scoop install iosevka-nf firacode

    - [ ] **VSCode** with installer from the official website.
    - [ ] Copy your PowerShell $PROFILE.
    - [ ] Install Posh-Git
    - [ ] Install Posh-Git.

    ### Directory structure

  16. hasparus revised this gist Jun 5, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -57,7 +57,7 @@ scoop install iosevka-nf firacode

    - [ ] **VSCode** with installer from the official website.
    - [ ] Copy your PowerShell $PROFILE.
    - [ ] Install Posh-Git.
    - [ ] Install Posh-Git

    ### Directory structure

  17. hasparus revised this gist Jun 5, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -57,6 +57,7 @@ scoop install iosevka-nf firacode

    - [ ] **VSCode** with installer from the official website.
    - [ ] Copy your PowerShell $PROFILE.
    - [ ] Install Posh-Git.

    ### Directory structure

  18. hasparus revised this gist Jun 5, 2021. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -69,7 +69,6 @@ D:/
    tools
    VSCode
    ...
    ```

    ---
  19. hasparus revised this gist Jun 5, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -65,6 +65,7 @@ D:/
    workspace
    project-1
    project-2
    ...
    tools
    VSCode
    ...
  20. hasparus revised this gist Jun 5, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -67,7 +67,7 @@ D:/
    project-2
    tools
    VSCode
    ...
    ```

  21. hasparus revised this gist Jun 5, 2021. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -63,6 +63,11 @@ scoop install iosevka-nf firacode
    ```
    D:/
    workspace
    project-1
    project-2
    tools
    VSCode
    ```

  22. hasparus revised this gist Jun 5, 2021. No changes.
  23. hasparus revised this gist Jun 5, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@

    - [ ] Discord with installer -- Discord needs to always be on the latest version so package managers failed me here in the past
    - [ ] Text expander **[espanso](https://espanso.org/)** with installer from the website
    - [Migrate your config](https://espanso.org/docs/get-started/#configuration)
    - [ ] [Migrate your config](https://espanso.org/docs/get-started/#configuration)

    ## Linux

  24. hasparus revised this gist Jun 5, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@

    - [ ] Discord with installer -- Discord needs to always be on the latest version so package managers failed me here in the past
    - [ ] Text expander **[espanso](https://espanso.org/)** with installer from the website
    - [Migrate your config.](https://espanso.org/docs/get-started/#configuration)
    - [Migrate your config](https://espanso.org/docs/get-started/#configuration)

    ## Linux

  25. hasparus revised this gist Jun 5, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@

    - [ ] Discord with installer -- Discord needs to always be on the latest version so package managers failed me here in the past
    - [ ] Text expander **[espanso](https://espanso.org/)** with installer from the website
    - [Migrate your config](https://espanso.org/docs/get-started/#configuration)
    - [Migrate your config.](https://espanso.org/docs/get-started/#configuration)

    ## Linux

  26. hasparus revised this gist Jun 5, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@

    - [ ] Discord with installer -- Discord needs to always be on the latest version so package managers failed me here in the past
    - [ ] Text expander **[espanso](https://espanso.org/)** with installer from the website
    - Migrate your configs https://espanso.org/docs/get-started/#configuration
    - [Migrate your config](https://espanso.org/docs/get-started/#configuration)

    ## Linux

  27. hasparus revised this gist Jun 5, 2021. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -10,8 +10,9 @@

    ### Additional

    - [ ] Text expander **[espanso](https://espanso.org/)** with installer from the website
    - [ ] Discord with installer -- Discord needs to always be on the latest version so package managers failed me here in the past
    - [ ] Text expander **[espanso](https://espanso.org/)** with installer from the website
    - Migrate your configs https://espanso.org/docs/get-started/#configuration

    ## Linux

  28. hasparus revised this gist Jun 5, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,7 @@

    ## Linux

    - [ ] **VSCode** from package manager or app store
    - [ ] **VSCode** from package manager or app store
    - [ ] **Git** from package manager if it isn't preinstalled
    - [ ] Copy your **.bashrc**

  29. hasparus revised this gist Jun 5, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@

    ### Additional

    - [ ] Text expander **[expanso](https://espanso.org/)** with installer from the website
    - [ ] Text expander **[espanso](https://espanso.org/)** with installer from the website
    - [ ] Discord with installer -- Discord needs to always be on the latest version so package managers failed me here in the past

    ## Linux
  30. hasparus revised this gist Jun 5, 2021. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion my-computer-setup.md
    Original file line number Diff line number Diff line change
    @@ -59,7 +59,11 @@ scoop install iosevka-nf firacode

    ### Directory structure


    ```
    D:/
    workspace
    ```

    ---