]> us-delaporte.pagekite.me Git - dotfiles.git/commitdiff
Merge branch 'main' of github.com:edthedev/dotfiles into main
authorEdward Delaporte <delaport@illinois.edu>
Mon, 8 Nov 2021 16:31:32 +0000 (10:31 -0600)
committerEdward Delaporte <delaport@illinois.edu>
Mon, 8 Nov 2021 16:31:32 +0000 (10:31 -0600)
44 files changed:
.vscode/settings.json
GitHubKey.md [new file with mode: 0644]
Makefile [deleted file]
README.md
bootstrap.ps1 [deleted file]
install/art.sh [deleted file]
install/code.sh [deleted file]
install/i3.sh [deleted file]
install/nodered.ps1 [deleted file]
install/vscode-journal.sh [deleted file]
install_cli_basics.sh [moved from install.sh with 88% similarity]
pi/docker_pirate.md [new file with mode: 0644]
pi/i3.md [new file with mode: 0644]
pi/install/art.sh [new file with mode: 0644]
pi/install/code.sh [new file with mode: 0644]
pi/install/exfat_pi.sh [moved from install/exfat_pi.sh with 100% similarity]
pi/install/geek-life_pi.sh [moved from install/geek-life_pi.sh with 100% similarity, mode: 0644]
pi/install/i3.sh [new file with mode: 0644]
pi/install/i3_basics.sh [new file with mode: 0644]
pi/install/powershell7_pi.sh [moved from install/powershell7_pi.sh with 100% similarity, mode: 0644]
pi/install/rdp.sh [new file with mode: 0644]
pi/install/website.sh [new file with mode: 0644]
pi/install/wtfutil_pi.sh [moved from install/wtfutil_pi.sh with 100% similarity, mode: 0644]
pi/install/x16_deps.sh [new file with mode: 0644]
pi/setup/retropi_joystick_selection.ps1 [moved from install/retropi.ps1 with 98% similarity]
pi/setup/vice_pi.sh [moved from install/vice_pi.sh with 100% similarity, mode: 0644]
pi/setup/x16.sh [new file with mode: 0644]
pi/start_pi.md [new file with mode: 0644]
setup/code-plugins.ps1 [new file with mode: 0644]
setup/code-plugins.sh [new file with mode: 0755]
setup/vim_windows.ps1 [moved from setup/vim.ps1 with 100% similarity]
setup/website.ps1 [new file with mode: 0644]
setup_cli_basics.sh [moved from setup.sh with 87% similarity]
vimrc
win/install/ansible.ps1 [moved from install/ansible.ps1 with 100% similarity]
win/install/dev.ps1 [moved from install/dev.ps1 with 100% similarity]
win/install/vim.ps1 [moved from install/vim.ps1 with 90% similarity]
win/more.md [new file with mode: 0644]
win/rdp.md [new file with mode: 0644]
win/setup/load_dlls.ps1 [new file with mode: 0644]
win/setup/minion.ps1 [moved from install/minion.ps1 with 98% similarity]
win/show-file-extensions.ps1 [new file with mode: 0644]
win/start_windows.md [new file with mode: 0644]
win/stay_awake.ps1 [new file with mode: 0644]

index bf73da097fa830fbc0d79ca0b1256f2283d02b8e..59ae6e7e230d05a65a5bfe632e0a5699806ff384 100644 (file)
     "titleBar.activeBackground": "#215732",
     "titleBar.activeForeground": "#e7e7e7",
     "titleBar.inactiveBackground": "#21573299",
-    "titleBar.inactiveForeground": "#e7e7e799"
+    "titleBar.inactiveForeground": "#e7e7e799",
+    "editorGroup.border": "#2f7c47",
+    "panel.border": "#2f7c47",
+    "sash.hoverBorder": "#2f7c47",
+    "sideBar.border": "#2f7c47",
+    "statusBarItem.remoteBackground": "#215732",
+    "statusBarItem.remoteForeground": "#e7e7e7"
   },
   "peacock.color": "#215732",
   "python.pythonPath": "/usr/bin/python3"
diff --git a/GitHubKey.md b/GitHubKey.md
new file mode 100644 (file)
index 0000000..2e0732e
--- /dev/null
@@ -0,0 +1,17 @@
+# Setup GitHub Key
+
++ Visit 
+https://github.com/settings/keys
+
+```sh
+vim .git/config
+```
+
+```
+url = git@github.com:edthedev/dotfiles.git"
+```
+
+```sh
+cat ~/.ssh/id_rsa.pub
+```
+
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index 1a7ad58..0000000
--- a/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-BASEDIR=$(CURDIR)
-
-hello:
-       echo "Hello!" 
-
-world:
-       echo "$(BASEDIR)"
\ No newline at end of file
index 3d376e65ba00e1e6e82d9a4e8b9002cf83b7a574..a15c9b8e2700e4065834c5b550616a357920ba5c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,22 +1,13 @@
 # dotfiles
 
-EdTheDev's Linux and Windows dot files. These are shared so that I can easily share a link to a tip or trick.
+EdTheDev's Linux and Windows dot files. 
+These are shared so that I can easily share a link to a tip or trick.
 
-## Bare Minimum
+## Getting Started
 
-+ `install.sh` - Script I use to install packages on Linux, most typically a Raspberry Pi. 
-+ `setup.sh` - Script I use to get to bare minimum (by my definition) setup on Linux - typically a Raspberry Pi.
-+ `bootstrap.ps1` - Script I use to setup on Windows. Mostly relies on the `Chocolatey` package manager for Windows, of course.
++ [Windows](/start_windows.md)
++ [Raspberry Pi](/start_pi.md)
 
-## Installations
+## Further Reading
 
-See the `\install` folder for scripts to install various handy utilities. Most of these rely on `Apt` on Linux, or `Chocolatey` on Windows.
-
-## Setups
-
-See the `\setup` folder for configurations.
-These are, obviously, just my preferred configurations.
-
-In general, these work by setting up symlinks on Linux, and on Windows by copying a stub file that sources the versioned file. 
-
-Most of these are cross platform `.ps1` files that run under PowerShell.
+See [pi/i3.md](/pi/i3.md) for info on setting up the I3 window manager on Raspberry Pi.
diff --git a/bootstrap.ps1 b/bootstrap.ps1
deleted file mode 100644 (file)
index 13ce10f..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-<#
-.SYNOPSIS
-
-Setup my Windows PowerShell environment.
-
-.DESCRIPTION
-
-.NOTES
-
-Relies heavily on the Chocolatey package manager.
-
-#>
-
-param(
-  # [Parameter(Mandatory=$true, HelpMessage="Install Development Tools")]
-  [switch]$dev_tools,
-  # [Parameter(Mandatory=$true, HelpMessage="Install Modeling Tools")]
-  [switch]$archi,
-  # [Parameter(Mandatory=$true, HelpMessage="Install Vim")]
-  [switch]$vim,
-  # [Parameter(Mandatory=$true, HelpMessage="Setup PowerShell Profile")]
-  [switch]$profile,
-  [switch]$fav_ps_modules
-)
-
-## Install SSH client
-Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
-
-## Always Install Chocolatey if missing
-$testchoco = powershell choco -v
-if(-not($testchoco)){
-  Write-Output "Seems Chocolatey is not installed, installing now..."
-  Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
-}
-
-# OWASP ZAP for web application security scanning
-if($false) {
-  choco install zap
-}
-
-## TODO: Can I set this via command line: chrome://flags/#enable-force-dark 
-
-if($doBootStrap) {
-  # DONE!
-  New-Item -ItemType File -Path $doneFlagFile
-}
-
-# ArchiMate for enterprise modeling
-if($archi) {
-  choco install archi
-}
-
-# Install dev tools
-if($dev_tools){
-  ./install/dev.ps1
-}
-
-if($vim){
-  ./install/vim.ps1
-}
-
-if($profile){
-  ./install/profile.ps1
-}
-
-if($fav_ps_modules) {
-  Write-Host "Reminder: Need to install these modules with admin escalation."
-  ./install/admin/favorite-ps-modules.ps1
-}
diff --git a/install/art.sh b/install/art.sh
deleted file mode 100644 (file)
index 905dfd8..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-mkdir -p ~/.installed
-
-if [ ! -f ~/.installed/gimp ]; then
-       sudo apt-get install gimp
-       touch ~/.installed/gimp
-fi
-
-ls -al ~/.installed
diff --git a/install/code.sh b/install/code.sh
deleted file mode 100644 (file)
index 93a0e58..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-if [ ! -d ~/.installed/code ]; then
-       echo "************** Install Visual Studio Code"
-       # sudo apt install snapd
-       # sudo snap install --classic code
-       wget https://packagecloud.io/headmelted/codebuilds/gpgkey -O - | sudo apt-key add -
-  curl -L https://raw.githubusercontent.com/headmelted/codebuilds/master/docs/installers/apt.sh | sudo bash
-       touch ~/.installed/code
-fi
diff --git a/install/i3.sh b/install/i3.sh
deleted file mode 100644 (file)
index 84df46c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-if [ ! -f ~/.installed/i3 ]; then
-       echo "************** Install i3 Window Manager"
-       sudo apt-get install i3
-       touch ~/.installed/i3
-fi
diff --git a/install/nodered.ps1 b/install/nodered.ps1
deleted file mode 100644 (file)
index 8b13789..0000000
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/install/vscode-journal.sh b/install/vscode-journal.sh
deleted file mode 100644 (file)
index e358f8e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#/bin/bash
-
-code-oss --install-extension ban.spellright
-code-oss --install-extension benjpas.close-all
-code-oss --install-extension fabiospampinato.vscode-markdown-todo
-code-oss --install-extension geeklearningio.graphviz-markdown-preview
-code-oss --install-extension Gruntfuggly.todo-tree
-code-oss --install-extension janisdd.vscode-edit-csv
-code-oss --install-extension johnpapa.vscode-peacock
-code-oss --install-extension mechatroner.rainbow-csv
-code-oss --install-extension ms-python.python
-code-oss --install-extension ms-toolsai.jupyter
-code-oss --install-extension oderwat.indent-rainbow
-code-oss --install-extension pajoma.vscode-journal
-code-oss --install-extension telesoho.vscode-oss-markdown-paste-image
-code-oss --install-extension vscodevim.vim
-code-oss --install-extension yzane.markdown-pdf
-code-oss --install-extension yzhang.markdown-all-in-one
similarity index 88%
rename from install.sh
rename to install_cli_basics.sh
index 97e94a8d99eaaefaa5b1b4f5402006c3481c7270..e2f27d48fadce1ade76f22953b7ad0d648645f41 100755 (executable)
@@ -24,7 +24,5 @@ if [ ! -f ~/.screenrc ]; then
        sudo apt-get install -y screen
 fi
 
-echo "Installed:"
-ls -al ~/.installed
-echo "Setup Options:"
-ls -al ~/setup
+echo "************** Install Midnight Commander"
+sudo apt-get install mc
diff --git a/pi/docker_pirate.md b/pi/docker_pirate.md
new file mode 100644 (file)
index 0000000..709ee44
--- /dev/null
@@ -0,0 +1,46 @@
+# Docker Pirate
+
+## On Building the Image
+
+A Raspberry Pi network connected Docker host.
+
++ https://blog.hypriot.com/faq/
++ https://github.com/hypriot/image-builder-rpi/releases
+
+See existing volumes.
+```
+lsblk
+```
+
+Use the `dd` command from the tutorial.
+
+```
+sudo dd if=hypriotos-rpi-v1.12.3.img of=/dev/<new thing that showed up> bs=1M
+```
+
+## On Finding the Image
+
+No wireless support in the image.
+Plug into the network directly.
+
+```
+sudo apt install nmap
+hostname -I
+nmap -sP <ip from command above>.0/24
+```
+
+## Updates
+
+Remember to change the default username and password.
+
+```
+sudo raspi-config
+```
+
+To update the hostname:
+
+```sh
+ssh pirate@black-pearl.lan
+sudo vi /boot/user-data
+sudo reboot now
+```
diff --git a/pi/i3.md b/pi/i3.md
new file mode 100644 (file)
index 0000000..c5f623b
--- /dev/null
+++ b/pi/i3.md
@@ -0,0 +1,32 @@
+# Setting up I3 on Raspbian
+
+Start with Raspbian Lite.
+
+## Install basic surival packages.
+
+```bash
+sudo apt-get install lightdm i3 tilix chromium
+```
+
+## Boot into i3
+
+```bash
+sudo raspi-config
+```
+
++ System?
++ Boot Options
++ Desktop / CLI
++ Choose boot to user.
++ Reboot
+
+## Configuring i3wm
+
+```
+vim ~/.config/i3/config
+```
+
+## Notes
+
+- lightdm - allows booting directly to desktop
+- tilix is literally any terminal other than the blinding default. It has a dark more theme.
diff --git a/pi/install/art.sh b/pi/install/art.sh
new file mode 100644 (file)
index 0000000..4c47a37
--- /dev/null
@@ -0,0 +1 @@
+sudo apt-get install gimp
diff --git a/pi/install/code.sh b/pi/install/code.sh
new file mode 100644 (file)
index 0000000..52f62ad
--- /dev/null
@@ -0,0 +1 @@
+apt install code
similarity index 100%
rename from install/exfat_pi.sh
rename to pi/install/exfat_pi.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from install/geek-life_pi.sh
rename to pi/install/geek-life_pi.sh
diff --git a/pi/install/i3.sh b/pi/install/i3.sh
new file mode 100644 (file)
index 0000000..3c9dd72
--- /dev/null
@@ -0,0 +1,6 @@
+echo "************** Install i3 Window Manager"
+sudo apt-get install i3 lightdm
+echo "************** Install Chromium"
+sudo apt-get install chromium
+echo "************** Install Tilix Terminal"
+sudo apt-get install tilix
diff --git a/pi/install/i3_basics.sh b/pi/install/i3_basics.sh
new file mode 100644 (file)
index 0000000..2f1a1d6
--- /dev/null
@@ -0,0 +1,3 @@
+./install/i3.sh
+sudo apt-get install chromium
+
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from install/powershell7_pi.sh
rename to pi/install/powershell7_pi.sh
diff --git a/pi/install/rdp.sh b/pi/install/rdp.sh
new file mode 100644 (file)
index 0000000..ca235b9
--- /dev/null
@@ -0,0 +1 @@
+sudo apt install xrdp remmina
diff --git a/pi/install/website.sh b/pi/install/website.sh
new file mode 100644 (file)
index 0000000..fd6a2f3
--- /dev/null
@@ -0,0 +1 @@
+apt install npm
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from install/wtfutil_pi.sh
rename to pi/install/wtfutil_pi.sh
diff --git a/pi/install/x16_deps.sh b/pi/install/x16_deps.sh
new file mode 100644 (file)
index 0000000..631fc46
--- /dev/null
@@ -0,0 +1,3 @@
+# Deps
+apt install make cc65
+apt install libsdl2-dev
similarity index 98%
rename from install/retropi.ps1
rename to pi/setup/retropi_joystick_selection.ps1
index d0b9518167b41b73815f4aa02f40ac829612a5c4..114d048315c72ecffd5e290c976042333219e13a 100644 (file)
@@ -1,7 +1,7 @@
-\r
-## TODO: Would be clever to make this a DSC module: https://docs.microsoft.com/en-us/powershell/scripting/dsc/quickstarts/website-quickstart?view=powershell-7\r
-Write-Host "Adding ability to switch Joystick"\r
-# https://github.com/meleu/RetroPie-joystick-selection\r
-Write-Host "Enable SSH first via Raspi-Config"\r
-ssh pi@retropi -C 'wget -O- "https://raw.githubusercontent.com/meleu/RetroPie-joystick-selection/master/install.sh" | sudo bash'\r
+
+## TODO: Would be clever to make this a DSC module: https://docs.microsoft.com/en-us/powershell/scripting/dsc/quickstarts/website-quickstart?view=powershell-7
+Write-Host "Adding ability to switch Joystick"
+# https://github.com/meleu/RetroPie-joystick-selection
+Write-Host "Enable SSH first via Raspi-Config"
+ssh pi@retropi -C 'wget -O- "https://raw.githubusercontent.com/meleu/RetroPie-joystick-selection/master/install.sh" | sudo bash'
 Write-Host "Now launch the script via RetroPi Setup - Configuration Tools - Joystick selection"
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from install/vice_pi.sh
rename to pi/setup/vice_pi.sh
diff --git a/pi/setup/x16.sh b/pi/setup/x16.sh
new file mode 100644 (file)
index 0000000..a7ec6ea
--- /dev/null
@@ -0,0 +1,13 @@
+mkdir -p ~/x16
+
+cd ~/x16
+git clone https://github.com/commanderx16/x16-rom.git
+cd x16-rom
+make
+
+cd ~/x16
+git clone https://github.com/commanderx16/x16-emulator.git
+cd x16-emulator
+make
+
+cp ~/x16/x16-rom/build/x16/rom.bin ~/x16/x16-emulator/
diff --git a/pi/start_pi.md b/pi/start_pi.md
new file mode 100644 (file)
index 0000000..c17f950
--- /dev/null
@@ -0,0 +1,44 @@
+## Getting Started - Raspberyy Pi
+
+### Get Online
+
+```sh
+rasppi-config
+```
+
++ Set up wireless
++ Set keyboard location
+
+### Clone this repository
+
+```sh
+sudo apt-get install git
+git clone https://github.com/edthedev/dotfiles.git
+```
+
+### Create a new user
+
+```sh
+sudo useradd bob -m -G sudo
+sudo passwd bob
+sudo passwd pi
+```
+
+### Boostrap CLI
+
+```
+sudo ./install_cli_basics.sh
+```
+
+## Installations
+
+See the `\install` folder for scripts to install various handy utilities. Most of these rely on `Apt` on Linux, or `Chocolatey` on Windows.
+
+## Setups
+
+See the `\setup` folder for configurations.
+These are, obviously, just my preferred configurations.
+
+In general, these work by setting up symlinks on Linux, and on Windows by copying a stub file that sources the versioned file. 
+
+Most of these are cross platform `.ps1` files that run under PowerShell.
diff --git a/setup/code-plugins.ps1 b/setup/code-plugins.ps1
new file mode 100644 (file)
index 0000000..9cd7a55
--- /dev/null
@@ -0,0 +1,7 @@
+code --install-extension benjpas.close-all
+code --install-extension johnpapa.vscode-peacock
+code --install-extension mechatroner.rainbow-csv
+code --install-extension oderwat.indent-rainbow
+code --install-extension pajoma.vscode-journal
+code --install-extension telesoho.vscode-oss-markdown-paste-image
+code --install-extension vscodevim.vim
diff --git a/setup/code-plugins.sh b/setup/code-plugins.sh
new file mode 100755 (executable)
index 0000000..9cd7a55
--- /dev/null
@@ -0,0 +1,7 @@
+code --install-extension benjpas.close-all
+code --install-extension johnpapa.vscode-peacock
+code --install-extension mechatroner.rainbow-csv
+code --install-extension oderwat.indent-rainbow
+code --install-extension pajoma.vscode-journal
+code --install-extension telesoho.vscode-oss-markdown-paste-image
+code --install-extension vscodevim.vim
similarity index 100%
rename from setup/vim.ps1
rename to setup/vim_windows.ps1
diff --git a/setup/website.ps1 b/setup/website.ps1
new file mode 100644 (file)
index 0000000..62330bd
--- /dev/null
@@ -0,0 +1,4 @@
+if(-Not(Test-Path -Path ~/edthedev.github.io)) {
+       cd ~
+       git clone git@github.com:edthedev/edthedev.github.io.git
+}
similarity index 87%
rename from setup.sh
rename to setup_cli_basics.sh
index ff7b64cd61b8d01635cf628d3a29495cd3dbde3b..b137b47d858eca77c81c949a69eff10d2ea67ed1 100755 (executable)
--- a/setup.sh
@@ -30,6 +30,5 @@ if [ -f ~/.gitconfig ]; then
 fi
 
 echo "************** Reminder to setup GitHub key"
-echo "https://github.com/settings/keys"
-echo "vim .git/config -- add: url = git@github.com:edthedev/dotfiles.git"
+cat GitHubKey.md
 cat ~/.ssh/id_rsa.pub
diff --git a/vimrc b/vimrc
index 712d0c0b3245ec20a6bfbaa520ad5ee9b27d66f4..601a6766e6b102314375b193d70abf5353cfee8e 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -21,6 +21,15 @@ set omnifunc=syntaxcomplete#Complete
 
 filetype off                  " required
 
+" =================
+" Install vim-plug if missing
+" =================
+let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
+if empty(glob(data_dir . '/autoload/plug.vim'))
+  silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs  https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
+  autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
+endif
+
 " =================
 " Here be Plugins!
 " =================
similarity index 100%
rename from install/ansible.ps1
rename to win/install/ansible.ps1
similarity index 100%
rename from install/dev.ps1
rename to win/install/dev.ps1
similarity index 90%
rename from install/vim.ps1
rename to win/install/vim.ps1
index fc1739764ea7a901f79be03449e3e562ce0f84a3..3f48cda25fbbe73de431564f56d4e89949e4a422 100644 (file)
@@ -1,12 +1,12 @@
-<#\r
-.SYNOPSIS\r
-\r
-Install Vim for Windows\r
-\r
-.NOTES\r
-\r
-Requires Chocolatey package manager.\r
-\r
-#>\r
-\r
+<#
+.SYNOPSIS
+
+Install Vim for Windows
+
+.NOTES
+
+Requires Chocolatey package manager.
+
+#>
+
 choco install vim
\ No newline at end of file
diff --git a/win/more.md b/win/more.md
new file mode 100644 (file)
index 0000000..bb9f7ba
--- /dev/null
@@ -0,0 +1,6 @@
+
+Archimate
+`choco install archi`
+
+OWASP Zap
+`choco install zap`
\ No newline at end of file
diff --git a/win/rdp.md b/win/rdp.md
new file mode 100644 (file)
index 0000000..f0c3d08
--- /dev/null
@@ -0,0 +1,9 @@
+
+Enable incoming RDP.
+```powershell
+Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0
+Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
+Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1
+```
+
+Now reboot.
\ No newline at end of file
diff --git a/win/setup/load_dlls.ps1 b/win/setup/load_dlls.ps1
new file mode 100644 (file)
index 0000000..c291f88
--- /dev/null
@@ -0,0 +1,2 @@
+
+HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SafeDllSearchMode
\ No newline at end of file
similarity index 98%
rename from install/minion.ps1
rename to win/setup/minion.ps1
index 1898187a54a1b590247dac141fe3b77f3158f151..089f380bc1dc2ef09846083450ecddad01b490a9 100644 (file)
@@ -1,2 +1,2 @@
-cd c:\src\r
+cd c:\src
 git clone https://github.com/edthedev/minion.git
\ No newline at end of file
diff --git a/win/show-file-extensions.ps1 b/win/show-file-extensions.ps1
new file mode 100644 (file)
index 0000000..ec11a0e
--- /dev/null
@@ -0,0 +1,11 @@
+function ShowFileExtensions()
+{
+    # http://superuser.com/questions/666891/script-to-set-hide-file-extensions
+    Push-Location
+    Set-Location HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
+    Set-ItemProperty . HideFileExt "0"
+    Pop-Location
+    Stop-Process -processName: Explorer -force # This will restart the Explorer service to make this work.
+}
+ 
+ShowFileExtensions
\ No newline at end of file
diff --git a/win/start_windows.md b/win/start_windows.md
new file mode 100644 (file)
index 0000000..539194e
--- /dev/null
@@ -0,0 +1,58 @@
+
+## Getting Started - Windows
+
+> Note: Bookmark this guide. You're going to reboot at least a few times.
+
+Optional - change host name
+```
+Rename-Computer -NewName FOOOOOOO -Restart
+```
+
+1. [Install chocolatey](https://chocolatey.org/install)
+
+2. Tell `choco` to watch for reboots, as this is Windows.
+```
+choco feature enable -name=exitOnRebootDetected
+```
+
+3. Install a decent terminal. This invokes a bunch of KBs.
+```powershell
+choco install microsoft-windows-terminal # reboot after
+```
+
+3. Set dark theme (non-admin prompt)
+```
+Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0
+```
+
+4. Reboot after first setup - you may see errors in `choco` commands otherwise.
+5. Set the PC time zone correctly - otherwise expect an install error in later `choco` commands.
+
+4. More packages
+```
+choco install git 
+choco install vscode
+choco install powertoys # reboot after
+```
+
+```
+git clone https://github.com/edthedev/dotfiles.git
+cd dotfiles
+code .
+```
+
+Admin prompt:
+```
+Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
+```
+
+Install VSCode plugins:
+```
+.\setup\code-plugins.ps1
+```
+
+Set git username.
+```
+git config --global user.email "edward@delaporte.us"
+git config --global user.name "Edward Delaporte"
+```
diff --git a/win/stay_awake.ps1 b/win/stay_awake.ps1
new file mode 100644 (file)
index 0000000..aba956a
--- /dev/null
@@ -0,0 +1,10 @@
+$wsh = New-Object -ComObject WScript.Shell
+$minutes = 15
+do{
+       "Staying awake for $minutes minutes"
+  $minutes-=1;
+  # Send Shift+F15
+  $wsh.SendKeys('+{F15}')
+  Start-Sleep -seconds 59
+}until($minutes -lt 0)
+# Thank you to http://www.zhornsoftware.co.uk/caffeine/