Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
const spawn = require("child_process").spawn; | |
const msi = spawn("msiexec", ["/i", "C:\\Users\\tyleonha\\Downloads\\PowerShell-7.0.0-rc.2-win-x64.msi"], { | |
detached: true, | |
stdio: "ignore", | |
shell: false, | |
windowsHide: true, | |
}); | |
msi.unref(); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 python3.7 | |
import iterm2 | |
import asyncio | |
import subprocess | |
# Icons are base64-encoded PNGs. The first one is 32x34 and is used for Retina | |
# displays. The second is 16x32 and is used for non-Retina displays. | |
ICON2X = "iVBORw0KGgoAAAANSUhEUgAAACAAAAAiCAYAAAA+stv/AAAABGdBTUEAALGPC/xhBQAAAWJJREFUWMPtVzsOgkAQRRIas4UdsTI0FhzDG1BwChrOYW1nTaPewsIL2JDY2HgBKisdk0cyEl2XWcniZ5KXEJiZ99hdZgbP+5udnQBndgG+T8CAMHyjgCFyGpMvCVuCeuE7BnSmkGtpKiIkHPFmTREBISUUhJJQASXupfBpkl+QMzRdhYiJWOFeQjiwZX+GA3w9xNbkUdtzcAvYEaaEOSPYE3JCjDdUuM7xrPabI3YnIedWk58JGcHX+PrwOTMRVpYw8lmLuBkTkUjJA7bnmSA+Y2cikAhI2Z77gnifnYlUIqBAcG6xhTlyFJLgEsGxhYAYOUrTrsa7W4VgZSFAIUel4bmr6by2dyHgEc9dTee1vYsteMTT30Po/DN0Xoicl2Lnzej2CS0II4t2PEIOJSGvJ5m1xUCyeTJZGZM3J5m2I1mkGe9eChCNUZrxrvUqTN74ZzSxLOk/+Gf0MQKMulqv7Qpwm6+awd/XXAAAAABJRU5ErkJggg==" |
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
#region UX config | |
Import-Module posh-git | |
if (Get-Module PSReadLine) { | |
Import-Module oh-my-posh | |
$ThemeSettings.MyThemesLocation = "~/.config/powershell/oh-my-posh/Themes" | |
if (Get-Theme | Where-Object Name -eq Sorin-NL) { | |
Set-Theme Sorin-NL |
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
function Update-macOSAppearance { | |
param( | |
[parameter(Mandatory)] | |
[ValidateSet('Dark', 'Light')] | |
$Mode | |
) | |
$currentMode = defaults read -globalDomain AppleInterfaceStyle | |
$appleScriptCommand = 'osascript -e ''tell application \"System Events\" to tell appearance preferences to set dark mode to not dark mode''' | |
if ($Mode -eq 'Light' -and ($currentMode -eq "Dark")) { |
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
param( | |
# Version of ncurses to download | |
[Parameter()] | |
[string] | |
$NCursesVersion = '6.1' | |
) | |
# Create the directory that we'll add to the path. | |
if (!(Test-Path ~/usr/local)) { | |
New-Item ~/usr/local -ItemType Directory -Force | Out-Null |
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
if has("nvim") | |
call plug#begin('~/.local/share/nvim/plugged') | |
else | |
call plug#begin('~/.vim/plugged') | |
endif | |
" set rtp^=/Users/tyler/Code/PowerShell/coc-powershell/ | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'bling/vim-airline' | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} |
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
<# | |
Helper module that helps emulate the Azure Functions environment in a PowerShell session. It do so by: | |
1. Modifying the PSModulePath | |
2. Loading Azure Functions DLLs so custom types are available | |
3. Setting up TypeForwards for the Http*Context types since the Azure Functions runtime does this | |
Usage: |
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
# NOTE: This still pops a dialog... I can't seem to figure out how to -Force it to not show. | |
function Set-DefaultBrowser { | |
[CmdletBinding(SupportsShouldProcess = $true)] | |
param( | |
[Parameter(Mandatory = $true)] | |
$BrowserId | |
) | |
$pythonScript = @" | |
from LaunchServices import LSSetDefaultHandlerForURLScheme |