Skip to content

Instantly share code, notes, and snippets.

View scaryrawr's full-sized avatar

Mike Wallio scaryrawr

View GitHub Profile
@scaryrawr
scaryrawr / windo
Created December 10, 2021 14:45
WSL helper for running Windows commands from within WSL
#!/usr/bin/env bash
currentDirectory=$(wslpath -w .)
cmd.exe /c "pushd $currentDirectory && $@" 2>/dev/null
@scaryrawr
scaryrawr / LoadEnvironment.ps1
Created October 6, 2021 20:25
Load an environment in PowerShell such as visual studio's developer command prompt.
param (
[Parameter(Mandatory = $true)]
[string]
$EnvironmentScript
)
cmd /c "`"$EnvironmentScript`"&set" | ForEach-Object {
if ($_ -match '=') {
$vars = $_.split('=')
Set-Item -Force -Path "env:$($vars[0])" -Value "$($vars[1])"
@scaryrawr
scaryrawr / trackmouse.ps1
Created February 18, 2021 19:06
A script for updating focus behavior on Windows
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[bool]
$FollowMouse,
[Parameter(Mandatory = $true)]
[bool]
$RaiseWindows,
[Parameter(Mandatory = $true)]
[uint]
#!/usr/bin/env sh
curl -LJFO https://github.com/microsoft/Git-Credential-Manager-Core/releases/download/v2.0.289-beta/gcmcore-linux_amd64.2.0.289.48418.tar.gz
tar xf gcmcore-linux_amd64.2.0.289.48418.tar.gz
sudo mv git-credential-manager-core /usr/local/bin/
git config --global credential.credentialStore secretservice
git config --global credential.helper /usr/local/bin/git-credential-manager-core
@scaryrawr
scaryrawr / ohmycode
Last active October 21, 2021 15:06
Python script for installing extensions
#!/usr/bin/env python3
import os
import sys
vscodes = sys.argv[1:]
plugins = [
'aaron-bond.better-comments',
'bierner.markdown-mermaid',
@scaryrawr
scaryrawr / obs-v4l2sink flatpak
Created September 18, 2020 02:36
Install obs-v4l2sink in OBS installed from flatpak
#!/usr/bin/env sh
# Instructions modified from https://github.com/CatxFish/obs-v4l2sink
git clone --recursive https://github.com/obsproject/obs-studio.git
git clone https://github.com/CatxFish/obs-v4l2sink.git
cd obs-v4l2sink
mkdir build && cd build