reorganize
parent
cd0a92b400
commit
5fa06b82c1
@ -1,6 +0,0 @@
|
||||
/firefox/configs
|
||||
/firefox/*.proxy
|
||||
/gcloud
|
||||
/git/github_token
|
||||
/nodejs/.npmrc
|
||||
/ssh
|
@ -1,90 +1,17 @@
|
||||
# config
|
||||
|
||||
My config files for various things. Use `config.sh` to automate the setup of several of them.
|
||||
|
||||
Things that are not checked in but which should live in this directory:
|
||||
|
||||
- `firefox/configs/` - files whose names are `+`-separated filenames from `firefox/` - these will be constructed by concatenation from the base files, and will be symlinked to from various profiles' `user.js` files
|
||||
- `firefox/*.proxy` - proxy auto-config files - these too can be referred to in the above `firefox/configs/` files, without the `.proxy` extension
|
||||
- `gcloud/` - Google Cloud SDK configuration files
|
||||
- `git/github_token` - GitHub Personal Access Token with read access to repos
|
||||
- `nodejs/.npmrc` - npm credentials, config, etc.
|
||||
- `ssh/` - SSH keys, config, etc.
|
||||
|
||||
## Bash scripts
|
||||
|
||||
- `2path.sh` - create a symlink to a file or directory from `~/bin`
|
||||
- `syncfiles.sh` - given paths to two or more files, prompt to copy the newest one over each of the older ones
|
||||
|
||||
## WSL setup
|
||||
|
||||
Use `wsl/install.cmd` to set up a new WSL installation. Run without arguments for details.
|
||||
|
||||
## WSL scripts
|
||||
|
||||
- `wsl-apt` - run `apt-get update`/`upgrade`/`install`/`remove`/`autoremove`/`autoclean`
|
||||
- any package names given as arguments are treated as packages to `install`, except any prefixed with a `-` are treated as packages to `remove`
|
||||
- `wsl-expose-ports` - expose one or more ports within WSL to the outside world
|
||||
- this sets up a port proxy and a Windows firewall rule for each exposed port, and removes previous port proxies and firewall rules
|
||||
- multiple ports can be specified, each with an optional external port: `1234` exposes port 1234 as 1234, `1234:5678` exposes port 5678 as 1234
|
||||
- call without arguments to remove port proxies and firewall rules without creating new ones
|
||||
- `wsl-fix-clock` - sync the WSL clock with the Windows clock
|
||||
- `wsl-fix-interop` - fix `WSL_INTEROP` variable when it becomes incorrectly set
|
||||
- `wsl-services` - start useful services not automatically started by WSL
|
||||
- starts `procps` for `sysctl` configuration
|
||||
|
||||
## Firefox
|
||||
|
||||
For each profile:
|
||||
|
||||
- Use the script commands to create a symlink for `user.js`
|
||||
- Change the [default search engine](about:preferences#search) to DuckDuckGo
|
||||
- Current approximate complement of add-ons (varies by profile):
|
||||
- [Buster: Captcha Solver for Humans](https://addons.mozilla.org/addon/buster-captcha-solver/)
|
||||
- [Feedbro](https://addons.mozilla.org/addon/feedbroreader/)
|
||||
- [Greasemonkey](https://addons.mozilla.org/addon/greasemonkey/)
|
||||
- [Kee - Password Manager](https://addons.mozilla.org/addon/keefox/)
|
||||
- [NoScript Security Suite](https://addons.mozilla.org/addon/noscript/)
|
||||
- [RSSPreview](https://addons.mozilla.org/addon/rsspreview/)
|
||||
- [uBlock Origin](https://addons.mozilla.org/addon/ublock-origin/)
|
||||
|
||||
## Git scripts
|
||||
|
||||
- `git clean-branches` - delete local branches which track deleted remote branches
|
||||
- `git clean-config` - unset various local config values, so global config will be used
|
||||
- `git clean-dates` - set commit dates of all commits in the given range to their authoring dates
|
||||
- `git clean-fork` - assuming `origin` and `fork` remotes, resets default branch on `fork` to first commit on `origin`, deletes all other branches on `fork` that are present on `origin`, and deletes all tags on `fork`
|
||||
- `git clean-modes` - reset all file modes to those in the repository
|
||||
- `git clean-mtime` - set a file's mtime to its most recent commit's author date
|
||||
- `git clean-pr` - delete all `pr/` branches created by `git cpr`
|
||||
- `get clean-user` - set author and committer of all commits in the given range to the currently configured identity
|
||||
- `git cpr` - checkout a PR from GitHub by id, and set up the local branch to track the appropriate branch on the appropriate fork
|
||||
- `git download-bundle` - download a bundle file from a remote repository
|
||||
- `git index-list-skip` - list all files that have had `--skip-worktree` set on them
|
||||
- `git index-skip` - set `--skip-worktree` on a given file
|
||||
- `git index-unskip` - set `--no-skip-worktree` on a given file
|
||||
- `git npm-add` - stage precisely the files that would be included in an npm package
|
||||
- `git track` - set current branch to track given remote and branch, defaulting to same branch name
|
||||
- `git turbo-gc` - turbo garbage collect
|
||||
|
||||
## Git Credential Manager Core WSL/Windows interop
|
||||
|
||||
Copy `git/wsl/git-credential-manager` into the root of the Git for Windows installation, and symlink to it from the WSL `PATH`.
|
||||
|
||||
## Node.js/npm scripts
|
||||
|
||||
- `npma.sh` - find the given binaries searching upwards through `node_modules` and output aliases for them, suitable for `>> ~/.bash_aliases`
|
||||
- `npmg.sh` - create a commit for a new version (if there are staged changed), and create and tag an otherwise dangling commit from HEAD that contains all of the files `npm publish` would
|
||||
- `npml.sh` - find the `node_modules` where the given dependencies are used, search up further for directories defining them, and create symlinks
|
||||
|
||||
## tmux keybindings
|
||||
|
||||
The included `.tmux.conf` makes the following changes/additions to the default tmux keybindings:
|
||||
|
||||
- The prefix key is now `ctrl-a` (and `ctrl-a ctrl-a` is used to send `ctrl-a` to the console)
|
||||
- Switching windows is done with `ctrl-alt-left/right` (no prefix key)
|
||||
- Switching panes is done with `alt-left/right/up/down` (no prefix key)
|
||||
- Splitting panes is done with `ctrl-a |` (horizontal) and `ctrl-a -` (vertical)
|
||||
- Reloading `~/.tmux.conf` is done with `ctrl-a shift-r`
|
||||
|
||||
Mouse control is also enabled, and the terminal mode is set to `screen-256color`.
|
||||
My config files for various things. See the individual readmes below.
|
||||
|
||||
- [Windows](win)
|
||||
- [WSL](wsl)
|
||||
- [Bash](bash)
|
||||
- [SSH](ssh)
|
||||
- [Git](git)
|
||||
- [VS Code](vscode)
|
||||
- [Node.js](nodejs)
|
||||
- [Google Cloud SDK](gcloud)
|
||||
- [tmux](tmux)
|
||||
- [Firefox](firefox)
|
||||
- [KeePass](keepass)
|
||||
|
||||
Use `config.sh` to automate the setup of a number of things.
|
||||
|
@ -0,0 +1 @@
|
||||
/*.proxy
|
@ -0,0 +1,30 @@
|
||||
# Firefox
|
||||
|
||||
## `.gitignore`'d
|
||||
|
||||
- `configs/*` - files whose names are `+`-separated filenames of files from this directory - these will be constructed by concatenation from the base files, and will be symlinked to from various Firefox profiles' `user.js` files
|
||||
- `*.proxy` - proxy auto-config files - these too can be referred to in the above `configs/*` files, without the `.proxy` extension
|
||||
|
||||
## `user.js` handling (Windows-specific)
|
||||
|
||||
Create `*.proxy` files containing proxy auto-config files.
|
||||
|
||||
Create empty `configs/*` files whose names are assembled by concatenating the names of templates in this directory (or `*.proxy` files without the `.proxy` extension) separated by `+`s.
|
||||
|
||||
There is a menu option in `config.sh` to generate (or regenerate) the `configs/*` files from their constituent templates, including adding the appropriate configuration to point to a particular `*.proxy` file.
|
||||
|
||||
There is also a menu option in `config.sh` for creating symlinks from various Firefox profiles' `user.js` files to the assembled `configs/*` files.
|
||||
|
||||
## Additional manual setup
|
||||
|
||||
For each profile:
|
||||
|
||||
- Change the [default search engine](about:preferences#search) to DuckDuckGo
|
||||
- Current approximate complement of add-ons (varies by profile):
|
||||
- [Buster: Captcha Solver for Humans](https://addons.mozilla.org/addon/buster-captcha-solver/)
|
||||
- [Feedbro](https://addons.mozilla.org/addon/feedbroreader/)
|
||||
- [Greasemonkey](https://addons.mozilla.org/addon/greasemonkey/)
|
||||
- [Kee - Password Manager](https://addons.mozilla.org/addon/keefox/)
|
||||
- [NoScript Security Suite](https://addons.mozilla.org/addon/noscript/)
|
||||
- [RSSPreview](https://addons.mozilla.org/addon/rsspreview/)
|
||||
- [uBlock Origin](https://addons.mozilla.org/addon/ublock-origin/)
|
@ -0,0 +1,2 @@
|
||||
/*
|
||||
!/.gitignore
|
@ -0,0 +1,5 @@
|
||||
# Google Cloud SDK
|
||||
|
||||
## `.gitignore`'d
|
||||
|
||||
- `config/*` - Google Cloud SDK configuration files
|
@ -0,0 +1,2 @@
|
||||
/*
|
||||
!/.gitignore
|
@ -0,0 +1 @@
|
||||
/github_token
|
@ -0,0 +1,28 @@
|
||||
# Git
|
||||
|
||||
## `.gitignore`'d
|
||||
|
||||
- `github_token` - GitHub Personal Access Token with read access to repos
|
||||
|
||||
## Scripts
|
||||
|
||||
- [`git clean-branches`](scripts/git-clean-branches) - delete local branches which track deleted remote branches
|
||||
- [`git clean-config`](scripts/git-clean-config) - unset various local config values, so global config will be used
|
||||
- [`git clean-dates`](scripts/git-clean-dates) - set commit dates of all commits in the given range to their authoring dates
|
||||
- [`git clean-fork`](scripts/git-clean-fork) - assuming `origin` and `fork` remotes, resets default branch on `fork` to first commit on `origin`, deletes all other branches on `fork` that are present on `origin`, and deletes all tags on `fork`
|
||||
- [`git clean-modes`](scripts/git-clean-modes) - reset all file modes to those in the repository
|
||||
- [`git clean-mtime`](scripts/git-clean-mtime) - set a file's mtime to its most recent commit's author date
|
||||
- [`git clean-pr`](scripts/git-clean-pr) - delete all `pr/` branches created by `git cpr`
|
||||
- [`git clean-user`](scripts/git-clean-user) - set author and committer of all commits in the given range to the currently configured identity
|
||||
- [`git cpr`](scripts/git-cpr) - checkout a PR from GitHub by id, and set up the local branch to track the appropriate branch on the appropriate fork
|
||||
- [`git download-bundle`](scripts/git-download-bundle) - download a bundle file from a remote repository
|
||||
- [`git index-list-skip`](scripts/git-index-list-skip) - list all files that have had `--skip-worktree` set on them
|
||||
- [`git index-skip`](scripts/git-index-skip) - set `--skip-worktree` on a given file
|
||||
- [`git index-unskip`](scripts/git-index-unskip) - set `--no-skip-worktree` on a given file
|
||||
- [`git npm-add`](scripts/git-npm-add) - stage precisely the files that would be included in an npm package
|
||||
- [`git track`](scripts/git-track) - set current branch to track given remote and branch, defaulting to same branch name
|
||||
- [`git turbo-gc`](scripts/git-turbo-gc) - turbo garbage collect
|
||||
|
||||
## Git Credential Manager Core WSL/Windows interop
|
||||
|
||||
Copy [`wsl/git-credential-manager`](wsl/git-credential-manager) into the root of the Git for Windows installation, and symlink to it from the WSL `PATH`.
|
@ -0,0 +1 @@
|
||||
/.npmrc
|
@ -0,0 +1,11 @@
|
||||
## Node.js
|
||||
|
||||
## `.gitignore`'d
|
||||
|
||||
- `.npmrc` - npm credentials, config, etc.
|
||||
|
||||
## Scripts
|
||||
|
||||
- [`npma.sh`](scripts/npma.sh) - find the given binaries searching upwards through `node_modules` and output aliases for them, suitable for `>> ~/.bash_aliases`
|
||||
- [`npmg.sh`](scripts/npmg.sh) - create a commit for a new version (if there are staged changed), and create and tag an otherwise dangling commit from HEAD that contains all of the files `npm publish` would
|
||||
- [`npml.sh`](scripts/npml.sh) - find the `node_modules` where the given dependencies are used, search up further for directories defining them, and create symlinks
|
@ -0,0 +1,5 @@
|
||||
# SSH
|
||||
|
||||
## `.gitignore`'d
|
||||
|
||||
- `config/*` - SSH keys, config, etc.
|
@ -0,0 +1,2 @@
|
||||
/*
|
||||
!/.gitignore
|
@ -0,0 +1,13 @@
|
||||
# tmux
|
||||
|
||||
## Keybindings
|
||||
|
||||
The included [`.tmux.conf`](.tmux.conf) makes the following changes/additions to the default tmux keybindings:
|
||||
|
||||
- The prefix key is now `ctrl-a` (and `ctrl-a ctrl-a` is used to send `ctrl-a` to the console)
|
||||
- Switching windows is done with `ctrl-alt-left/right` (no prefix key)
|
||||
- Switching panes is done with `alt-left/right/up/down` (no prefix key)
|
||||
- Splitting panes is done with `ctrl-a |` (horizontal) and `ctrl-a -` (vertical)
|
||||
- Reloading `~/.tmux.conf` is done with `ctrl-a shift-r`
|
||||
|
||||
Mouse control is also enabled, and the terminal mode is set to `screen-256color`.
|
@ -0,0 +1,11 @@
|
||||
# VS Code
|
||||
|
||||
## Settings and keybindings
|
||||
|
||||
[`settings.json`](settings.json) and [`keybindings.json`](keybindings.json) are VS Code's configuration files.
|
||||
|
||||
## Local extension
|
||||
|
||||
[`local-extension`](local-extension) contains a local, unpublished extension.
|
||||
|
||||
Currently it contains syntax highlighting for Svelte, separated from the other behavior from the official extension.
|
@ -0,0 +1,5 @@
|
||||
# Windows
|
||||
|
||||
## Registry entries
|
||||
|
||||
These are `.reg` files for configuration changes to Windows.
|
@ -0,0 +1,22 @@
|
||||
# WSL
|
||||
|
||||
## Setup
|
||||
|
||||
Use [`install.cmd`](install.cmd) to set up a new WSL installation. Run without arguments for details.
|
||||
|
||||
# wsl-elevate
|
||||
|
||||
[`wsl-elevate`](wsl-elevate) is a script that should be added to the system's path (not just the current user's path). Sourcing it in a script will result in that script being automatically relaunched as `root`. It's needed for several of the scripts below.
|
||||
|
||||
## Scripts
|
||||
|
||||
- [`wsl-apt`](scripts/wsl-apt) - run `apt update`/`upgrade`/`install`/`remove`/`autoremove`/`autoclean`
|
||||
- any package names given as arguments are treated as packages to `install`, except any prefixed with a `-` are treated as packages to `remove`
|
||||
- [`wsl-expose-ports`](scripts/wsl-expose-ports) - expose one or more ports within WSL to the outside world
|
||||
- this sets up a port proxy and a Windows firewall rule for each exposed port, and removes previous port proxies and firewall rules
|
||||
- multiple ports can be specified, each with an optional external port: `1234` exposes port 1234 as 1234, `1234:5678` exposes port 5678 as 1234
|
||||
- call without arguments to remove port proxies and firewall rules without creating new ones
|
||||
- [`wsl-fix-clock`](scripts/wsl-fix-clock) - sync the WSL clock with the Windows clock
|
||||
- [`wsl-fix-interop`](scripts/wsl-fix-interop) - fix `WSL_INTEROP` variable when it becomes incorrectly set
|
||||
- [`wsl-services`](scripts/wsl-services) - start useful services not automatically started by WSL
|
||||
- starts `procps` for `sysctl` configuration
|
Loading…
Reference in New Issue