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
sudo apt-get update && sudo apt-get upgrade | |
sudo apt-get -y install build-essential curl | |
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-wincred.exe" | |
# Setup Docker. These directions work on WSL2. | |
sudo addgroup --system docker | |
sudo adduser $USER docker | |
newgrp docker | |
sudo chown root:docker /var/run/docker.sock |
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
sudo apt-get -y install golang | |
# Adds to ~/go/bin. | |
go get -u github.com/jmhobbs/terminal-parrot | |
echo "export PATH=\"$PATH:/home/eric/go/bin\"" >> ~/.profile |
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
@ECHO OFF | |
GOTO CHECK_PERMISSIONS | |
:CHECK_PERMISSIONS | |
ECHO Administrative permissions required. Detecting permissions... | |
NET SESSION >NUL 2>&1 | |
if %errorLevel% == 0 ( | |
ECHO Success: Administrative permissions confirmed. Press any key to continue. | |
) else ( | |
ECHO Failure: Current permissions inadequate. Press any key to continue. |
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
# Make powershell awesome. | |
Install-Module -Scope CurrentUser -SkipPublisherCheck -Name posh-git -Force | |
Install-Module -Scope CurrentUser -SkipPublisherCheck -Name PSReadLine -Force | |
# Create your profile if it doesn't exist. | |
if (!(Test-Path -Path $PROFILE)) { | |
New-Item -ItemType File -Path $PROFILE -Force | |
} | |
Set-Content -Path $Profile -Value "oh-my-posh init pwsh --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/jandedobbeleer.omp.json' | Invoke-Expression" |
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
;; Highlights dumb stuff. | |
(require 'whitespace) | |
(setq whitespace-style '(face empty tabs lines-tail trailing)) | |
(global-whitespace-mode t) | |
;; 80 column marker. | |
( | |
add-hook 'rust-mode-hook ( | |
lambda () | |
(setq-local whitespace-line-column 80) |
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
;; Place this file in C:\Users\<username>\AppData\Roaming and point to the appropriate files | |
(setq user-init-file "C:/path/to/.emacs") | |
(setq user-emacs-directory "C:/path/to/.emacs.d/") | |
(setq default-directory "C:/whatever/you/want/to/start/in") | |
(setenv "HOME" "D:/my/home/directory") | |
(load user-init-file) |
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
# You have to do this to allow yourself to run scripts. | |
# Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted | |
oh-my-posh font install "Meslo" | |
# Not sure how to automate. | |
# CTRL + SHIFT + , to open settings.json. | |
# Add this. | |
# { | |
# "profiles": |
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
$CurrentState = $null | |
$NewState = $null | |
Write-Host "Monitoring device changes..." -ForegroundColor Green | |
while ($true) { | |
if (-not($CurrentState)) { | |
$CurrentState = Get-PnpDevice -Status OK | |
} | |
else { | |
$NewState = Get-PnpDevice -Status OK | |
$Changes = $null |
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
New-Variable -Name Key -Value "$env:UserProfile\.ssh\id_rsa" | |
Icacls $Key /c /t /Inheritance:d # Disable inheritance of permissions from parent objects. | |
Icacls $Key /c /t /Grant ${env:UserName}:F # Grants full control (F) permission to current user. | |
TakeOwn /F $Key # Take ownership. | |
Icacls $Key /c /t /Grant:r ${env:UserName}:F # Grants full control (F), but replace any existing permissions rather than add them. | |
Icacls $Key /c /t /Remove:g Administrator "Authenticated Users" BUILTIN\Administrators BUILTIN Everyone System Users # Remove these groups from the access control list. | |
Icacls $Key # Display updated permissions. | |
Remove-Variable -Name Key |
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
function sync() { | |
var id = "ericchansen@gmail.com"; | |
var today = new Date(); | |
var endDate = new Date(); | |
endDate.setDate(today.getDate() + 7); | |
var secondaryCal = CalendarApp.getCalendarById(id); | |
var secondaryEvents = secondaryCal.getEvents(today, endDate); | |
var primaryCal = CalendarApp.getDefaultCalendar(); | |
var primaryEvents = primaryCal.getEvents(today, endDate); | |
var primaryEventTitle = "Personal Appointment"; |