Skip to content

Instantly share code, notes, and snippets.

View ianwesterfield's full-sized avatar

Ian Westerfield ianwesterfield

View GitHub Profile
@ianwesterfield
ianwesterfield / filename-bulk-replace.ps1
Created April 19, 2024 18:04
powershell filenmae pattern bulk replacement
Get-ChildItem . -Recurse |
Where {$_.Name -Match 'foo'} |
Rename-Item -NewName {$_.name -replace 'foo','bar' }
@ianwesterfield
ianwesterfield / userChrome.css
Created June 11, 2019 15:11
Chrome/FireFox Dev Tools Theme
:root.theme-dark {
--theme-body-background: rgb(32, 32, 32) !important;
--theme-sidebar-background: rgb(32, 32, 32) !important;
--theme-tab-toolbar-background: #161A1E !important;
--theme-toolbar-background: #282E35 !important;
--theme-selection-background: #478DAD !important;
--theme-body-color: #D6D6D6 !important;
--theme-body-color-alt: #D6D6D6 !important;
@ianwesterfield
ianwesterfield / cloudSettings
Last active May 31, 2020 00:09
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-05-31T00:09:48.578Z","extensionVersion":"v3.4.3"}
@ianwesterfield
ianwesterfield / kube-master.sh
Created September 23, 2018 23:31
Kubernetes Digital Ocean Setup
# adapted from https://www.linode.com/docs/applications/containers/how-to-deploy-nginx-on-a-kubernetes-cluster/
# swap
swapoff -a
# hosts modify this to match the environment including all other cluster workers
echo '<PRIVATE IP> test-kube-master' >> /etc/hosts
echo '<PRIVATE IP> test-kube-worker-1' >> /etc/hosts
echo '<PRIVATE IP> test-kube-worker-2' >> /etc/hosts
if ((e.shiftKey && e.keyCode != 9) // shift, but not moving to previous field
|| (e.keyCode != 8 // !backspace
&& e.keyCode != 9 // !tab
&& e.keyCode != 32 // !space
&& !(e.keyCode >= 37 && e.keyCode <= 40) // !arrows
&& e.keyCode != 46 // !delete
&& !(e.keyCode >= 48 && e.keyCode <= 57) // !numbers
&& !(e.keyCode >= 96 && e.keyCode <= 105)) // !numberpad
) {
e.preventDefault();
@mixin no-padding($side) {
@if $side=='all' {
.no-padding {
padding: 0 !important;
}
}
@else {
.no-padding-#{$side} {
padding-#{$side}: 0 !important;
}
@ianwesterfield
ianwesterfield / keybindings
Last active November 12, 2016 14:33
Visual Studio code settings
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "ctrl+left", "command": "workbench.action.navigateBack" },
{ "key": "ctrl+right", "command": "workbench.action.navigateForward" },
{ "key": "cmd+shift+d", "command": "editor.action.copyLinesDownAction",
"when": "editorFocus" },
{ "key": "cmd+ctrl+down", "command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus" },
{ "key": "cmd+ctrl+up", "command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus" },