Removal of macOS and Linux Mint directories
This commit is contained in:
parent
a4db55cb84
commit
837bd81c04
90 changed files with 0 additions and 8833 deletions
|
@ -1,3 +0,0 @@
|
||||||
N.B. .bashrc Linux, .bash_profile Mac
|
|
||||||
|
|
||||||
N.B. install script should correctly install bin/ scripts.
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
result=":"
|
|
||||||
|
|
||||||
IFS=:
|
|
||||||
|
|
||||||
for p in $1; do
|
|
||||||
[[ "$result" == *:"$p":* ]] || result="${result}${p}:"
|
|
||||||
done
|
|
||||||
|
|
||||||
result="${result#:}"
|
|
||||||
echo "${result%:}"
|
|
|
@ -1,54 +0,0 @@
|
||||||
--exclude=.git
|
|
||||||
--exclude=.hg
|
|
||||||
--exclude=log
|
|
||||||
--exclude=tmp
|
|
||||||
|
|
||||||
|
|
||||||
--langdef=js
|
|
||||||
--langmap=js:.js
|
|
||||||
--langmap=js:+.jsx
|
|
||||||
|
|
||||||
--regex-js=/[ \t.]([A-Z][A-Z0-9._$]+)[ \t]*[=:][ \t]*([0-9"'\[\{]|null)/\1/n,constant/
|
|
||||||
|
|
||||||
--regex-js=/\.([A-Za-z0-9._$]+)[ \t]*=[ \t]*\{/\1/o,object/
|
|
||||||
--regex-js=/['"]*([A-Za-z0-9_$]+)['"]*[ \t]*:[ \t]*\{/\1/o,object/
|
|
||||||
--regex-js=/([A-Za-z0-9._$]+)\[["']([A-Za-z0-9_$]+)["']\][ \t]*=[ \t]*\{/\1\.\2/o,object/
|
|
||||||
|
|
||||||
--regex-js=/([A-Za-z0-9._$]+)[ \t]*=[ \t]*\(function\(\)/\1/c,class/
|
|
||||||
--regex-js=/['"]*([A-Za-z0-9_$]+)['"]*:[ \t]*\(function\(\)/\1/c,class/
|
|
||||||
--regex-js=/class[ \t]+([A-Za-z0-9._$]+)[ \t]*/\1/c,class/
|
|
||||||
--regex-js=/([A-Za-z$][A-Za-z0-9_$()]+)[ \t]*=[ \t]*[Rr]eact.createClass[ \t]*\(/\1/c,class/
|
|
||||||
--regex-js=/([A-Z][A-Za-z0-9_$]+)[ \t]*=[ \t]*[A-Za-z0-9_$]*[ \t]*[{(]/\1/c,class/
|
|
||||||
--regex-js=/([A-Z][A-Za-z0-9_$]+)[ \t]*:[ \t]*[A-Za-z0-9_$]*[ \t]*[{(]/\1/c,class/
|
|
||||||
|
|
||||||
--regex-js=/([A-Za-z$][A-Za-z0-9_$]+)[ \t]*=[ \t]*function[ \t]*\(/\1/f,function/
|
|
||||||
|
|
||||||
--regex-js=/(function)*[ \t]*([A-Za-z$_][A-Za-z0-9_$]+)[ \t]*\([^)]*\)[ \t]*\{/\2/f,function/
|
|
||||||
--regex-js=/['"]*([A-Za-z$][A-Za-z0-9_$]+)['"]*:[ \t]*function[ \t]*\(/\1/m,method/
|
|
||||||
--regex-js=/([A-Za-z0-9_$]+)\[["']([A-Za-z0-9_$]+)["']\][ \t]*=[ \t]*function[ \t]*\(/\2/m,method/
|
|
||||||
|
|
||||||
|
|
||||||
--langdef=Rust
|
|
||||||
--langmap=Rust:.rs
|
|
||||||
--regex-Rust=/^[ \t]*(#\[[^\]]\][ \t]*)*(pub[ \t]+)?(extern[ \t]+)?("[^"]+"[ \t]+)?(unsafe[ \t]+)?fn[ \t]+([a-zA-Z0-9_]+)/\6/f,functions,function definitions/
|
|
||||||
--regex-Rust=/^[ \t]*(pub[ \t]+)?type[ \t]+([a-zA-Z0-9_]+)/\2/T,types,type definitions/
|
|
||||||
--regex-Rust=/^[ \t]*(pub[ \t]+)?enum[ \t]+([a-zA-Z0-9_]+)/\2/g,enum,enumeration names/
|
|
||||||
--regex-Rust=/^[ \t]*(pub[ \t]+)?struct[ \t]+([a-zA-Z0-9_]+)/\2/s,structure names/
|
|
||||||
--regex-Rust=/^[ \t]*(pub[ \t]+)?mod[ \t]+([a-zA-Z0-9_]+)/\2/m,modules,module names/
|
|
||||||
--regex-Rust=/^[ \t]*(pub[ \t]+)?static[ \t]+([a-zA-Z0-9_]+)/\2/c,consts,static constants/
|
|
||||||
--regex-Rust=/^[ \t]*(pub[ \t]+)?trait[ \t]+([a-zA-Z0-9_]+)/\2/t,traits,traits/
|
|
||||||
--regex-Rust=/^[ \t]*(pub[ \t]+)?impl([ \t\n]*<[^>]*>)?[ \t]+(([a-zA-Z0-9_:]+)[ \t]*(<[^>]*>)?[ \t]+(for)[ \t]+)?([a-zA-Z0-9_]+)/\4 \6 \7/i,impls,trait implementations/
|
|
||||||
--regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\1/d,macros,macro definitions/
|
|
||||||
|
|
||||||
--langdef=typescript
|
|
||||||
--langmap=typescript:.ts
|
|
||||||
--regex-typescript=/^[ \t]*(export)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\2/c,classes/
|
|
||||||
--regex-typescript=/^[ \t]*(export)?[ \t]*module[ \t]+([a-zA-Z0-9_]+)/\2/n,modules/
|
|
||||||
--regex-typescript=/^[ \t]*(export)?[ \t]*function[ \t]+([a-zA-Z0-9_]+)/\2/f,functions/
|
|
||||||
--regex-typescript=/^[ \t]*export[ \t]+var[ \t]+([a-zA-Z0-9_]+)/\1/v,variables/
|
|
||||||
--regex-typescript=/^[ \t]*var[ \t]+([a-zA-Z0-9_]+)[ \t]*=[ \t]*function[ \t]*\(\)/\1/v,varlambdas/
|
|
||||||
--regex-typescript=/^[ \t]*(export)?[ \t]*(public|private)[ \t]+(static)?[ \t]*([a-zA-Z0-9_]+)/\4/m,members/
|
|
||||||
--regex-typescript=/^[ \t]*(export)?[ \t]*interface[ \t]+([a-zA-Z0-9_]+)/\2/i,interfaces/
|
|
||||||
--regex-typescript=/^[ \t]*(export)?[ \t]*enum[ \t]+([a-zA-Z0-9_]+)/\2/e,enums/
|
|
||||||
--regex-typescript=/^[ \t]*import[ \t]+([a-zA-Z0-9_]+)/\1/I,imports/
|
|
||||||
|
|
|
@ -1,61 +0,0 @@
|
||||||
Cheat Sheets
|
|
||||||
============
|
|
||||||
|
|
||||||
> **NOTE**: This repo is best used by placing a bookmark in your address bar.
|
|
||||||
|
|
||||||
This is a collection of cheat sheets that I have compiled over the years that I
|
|
||||||
put together while learning various tools. They contain some good information
|
|
||||||
and a few gems that I have learned along the way. Feel free to contribute.
|
|
||||||
|
|
||||||
## Contents
|
|
||||||
|
|
||||||
- [Bash]
|
|
||||||
- [Git]
|
|
||||||
- [GnuPG]
|
|
||||||
- [irssi]
|
|
||||||
- [JIRA]
|
|
||||||
- [mutt]
|
|
||||||
- [nmap]
|
|
||||||
- [openssl]
|
|
||||||
- [tmux]
|
|
||||||
- [uml]
|
|
||||||
- [vim]
|
|
||||||
- [zsh]
|
|
||||||
- [other]
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img
|
|
||||||
alt="Creative Commons License" style="border-width:0"
|
|
||||||
src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br /><span
|
|
||||||
xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Cheat Sheets</span>
|
|
||||||
by <a xmlns:cc="http://creativecommons.org/ns#" href="http://joshuaestes.me"
|
|
||||||
property="cc:attributionName" rel="cc:attributionURL">Joshua Estes</a> is
|
|
||||||
licensed under a <a rel="license"
|
|
||||||
href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons
|
|
||||||
Attribution-ShareAlike 4.0 International License</a>. Based on a work at <a
|
|
||||||
xmlns:dct="http://purl.org/dc/terms/"
|
|
||||||
href="https://github.com/JoshuaEstes/CheatSheets"
|
|
||||||
rel="dct:source">https://github.com/JoshuaEstes/CheatSheets</a>.
|
|
||||||
Permissions beyond the scope of this license may be available at <a
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
href="https://github.com/JoshuaEstes/CheatSheets/blob/master/LICENSE"
|
|
||||||
rel="cc:morePermissions">https://github.com/JoshuaEstes/CheatSheets/blob/master/LICENSE</a>.
|
|
||||||
|
|
||||||
See [LICENSE] for full license.
|
|
||||||
|
|
||||||
|
|
||||||
[Bash]: https://github.com/JoshuaEstes/CheatSheets/blob/master/bash.md
|
|
||||||
[Git]: https://github.com/JoshuaEstes/CheatSheets/blob/master/git.md
|
|
||||||
[GnuPG]: https://github.com/JoshuaEstes/CheatSheets/blob/master/gnupg.md
|
|
||||||
[irssi]: https://github.com/JoshuaEstes/CheatSheets/blob/master/irssi.md
|
|
||||||
[JIRA]: https://github.com/JoshuaEstes/CheatSheets/blob/master/jira.md
|
|
||||||
[mutt]: https://github.com/JoshuaEstes/CheatSheets/blob/master/mutt.md
|
|
||||||
[nmap]: https://github.com/JoshuaEstes/CheatSheets/blob/master/nmap.md
|
|
||||||
[openssl]: https://github.com/JoshuaEstes/CheatSheets/blob/master/openssl.md
|
|
||||||
[tmux]: https://github.com/JoshuaEstes/CheatSheets/blob/master/tmux.md
|
|
||||||
[uml]: https://github.com/JoshuaEstes/CheatSheets/blob/master/uml.md
|
|
||||||
[vim]: https://github.com/JoshuaEstes/CheatSheets/blob/master/vim.md
|
|
||||||
[zsh]: https://github.com/JoshuaEstes/CheatSheets/blob/master/zsh.md
|
|
||||||
[other]: https://github.com/JoshuaEstes/CheatSheets/blob/master/other.md
|
|
||||||
[LICENSE]: https://github.com/JoshuaEstes/CheatSheets/blob/master/LICENSE
|
|
|
@ -1,75 +0,0 @@
|
||||||
Bash Cheat Sheet
|
|
||||||
================
|
|
||||||
|
|
||||||
## Moving
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|----------|--------------------------------|
|
|
||||||
| ctrl + a | Goto BEGINNING of command line |
|
|
||||||
| ctrl + e | Goto END of command line |
|
|
||||||
| ctrl + b | move back one character |
|
|
||||||
| ctrl + f | move forward one character |
|
|
||||||
| alt + f | move cursor FORWARD one word |
|
|
||||||
| alt + b | move cursor BACK one word |
|
|
||||||
|
|
||||||
## Other
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|----------|--------------------------------|
|
|
||||||
| ctrl + d | Delete the character under the cursor |
|
|
||||||
| ctrl + l | Clear the screen (same as clear command) |
|
|
||||||
| ctrl + p | Fetch the previous command from the history list, moving back in the list (same as up arrow) |
|
|
||||||
| ctrl + n | Fetch the next command from the history list, moving forward in the list (same as down arrow) |
|
|
||||||
| ctrl + u | Clear all BEFORE cursor |
|
|
||||||
| ctrl + k | Clear all AFTER cursor |
|
|
||||||
| ctrl + r | Search backward starting at the current line and moving 'up' through the history as necessary |
|
|
||||||
| crtl + s | Search forward starting at the current line and moving 'down' through the history as necessary |
|
|
||||||
| ctrl + c | kill whatever is running |
|
|
||||||
| ctrl + d | Exit shell (same as exit command) |
|
|
||||||
| ctrl + w | delete the word BEFORE the cursor |
|
|
||||||
| ctrl + t | swap the last two characters before the cursor |
|
|
||||||
| ctrl + y | paste (if you used a previous command to delete) |
|
|
||||||
| ctrl + z | Place current process in background |
|
|
||||||
| ctrl + _ | undo |
|
|
||||||
| esc + t | Swap last two words before the cursor |
|
|
||||||
| esc + . | |
|
|
||||||
| esc + _ | |
|
|
||||||
| alt + [Backspace] | delete PREVIOUS word |
|
|
||||||
| alt + < | Move to the first line in the history |
|
|
||||||
| alt + > | Move to the end of the input history, i.e., the line currently being entered |
|
|
||||||
| alt + ? | |
|
|
||||||
| alt + * | |
|
|
||||||
| alt + . | print the LAST ARGUMENT (ie "vim file1.txt file2.txt" will yield "file2.txt") |
|
|
||||||
| alt + c | |
|
|
||||||
| alt + d | |
|
|
||||||
| alt + l | |
|
|
||||||
| alt + n | |
|
|
||||||
| alt + p | |
|
|
||||||
| alt + r | |
|
|
||||||
| alt + t | |
|
|
||||||
| alt + u | |
|
|
||||||
| ~[TAB][TAB] | List all users |
|
|
||||||
| $[TAB][TAB] | List all system variables |
|
|
||||||
| @[TAB][TAB] | List all entries in your /etc/hosts file |
|
|
||||||
| [TAB] | Auto complete |
|
|
||||||
| !! | Run PREVIOUS command (ie `sudo !!`) |
|
|
||||||
| !vi | Run PREVIOUS command that BEGINS with vi |
|
|
||||||
| cd - | change to PREVIOUS working directory |
|
|
||||||
|
|
||||||
# Kill a job
|
|
||||||
|
|
||||||
n = job number, to list jobs, run `jobs`
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kill %n
|
|
||||||
```
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kill %1
|
|
||||||
```
|
|
||||||
|
|
||||||
## References
|
|
||||||
|
|
||||||
1. http://cnswww.cns.cwru.edu/php/chet/readline/readline.html
|
|
|
@ -1,8 +0,0 @@
|
||||||
Disable/enable System Integrity Protection
|
|
||||||
|
|
||||||
* Restart the computer
|
|
||||||
* Hold down `Command-R` to reboot into Recovery Mode
|
|
||||||
* Click `Utilities`
|
|
||||||
* Select `Terminal`
|
|
||||||
* Enter `csrutil [ disable | enable ]`
|
|
||||||
* Restart the computer into Standard Mode
|
|
|
@ -1,9 +0,0 @@
|
||||||
cURL Cheat Sheet
|
|
||||||
================
|
|
||||||
|
|
||||||
## Basics
|
|
||||||
### Get request
|
|
||||||
|
|
||||||
```bash
|
|
||||||
curl https://domain.com
|
|
||||||
```
|
|
|
@ -1,5 +0,0 @@
|
||||||
# defaults
|
|
||||||
|
|
||||||
Change the default location of screenshots:
|
|
||||||
|
|
||||||
defaults write com.apple.screencapture location <directory> && killall SystemUIServer
|
|
|
@ -1,152 +0,0 @@
|
||||||
Git Cheat Sheet
|
|
||||||
===============
|
|
||||||
|
|
||||||
## Subtree Example
|
|
||||||
|
|
||||||
### Add sub-project as remote
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git remote add -f RemoteName RemoteUrl
|
|
||||||
```
|
|
||||||
|
|
||||||
### Run `git subtree` command
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git subtree add --prefix Path/To/Put/Code NameOfRemote master --squash
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Pull subtree as needed
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git fetch NameOfRemote master
|
|
||||||
git subtree pull --prefix Path/To/Put/Code NameOfRemote master --squash
|
|
||||||
```
|
|
||||||
|
|
||||||
### Reference
|
|
||||||
|
|
||||||
* http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree
|
|
||||||
|
|
||||||
## Create a branch without a parent
|
|
||||||
|
|
||||||
Very useful when you are updating a project that you are rewriting. For example,
|
|
||||||
say you are using semantic versioning and are wanting to start a new major
|
|
||||||
version.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git checkout --orphan BRANCH
|
|
||||||
```
|
|
||||||
|
|
||||||
## Delete All Branches that have been merged
|
|
||||||
|
|
||||||
Great for cleaning up local branches that aren't being used any more.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git checkout master
|
|
||||||
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
|
|
||||||
```
|
|
||||||
|
|
||||||
## Ignore changes to a file that is being tracked
|
|
||||||
|
|
||||||
### Ignore
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git update-index --assume-unchanged [directory|file]
|
|
||||||
```
|
|
||||||
|
|
||||||
### Unignore
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git update-index --no-assume-unchanged [directory|file]
|
|
||||||
```
|
|
||||||
|
|
||||||
## How to ignore dirty submodules
|
|
||||||
|
|
||||||
Edit your ``.git/config`` and add ``ignore = dirty``.
|
|
||||||
|
|
||||||
```text
|
|
||||||
[submodule "path/to/submodule"]
|
|
||||||
path = path/to/submodule
|
|
||||||
url = git://github.com/username/repo.git
|
|
||||||
ignore = dirty
|
|
||||||
```
|
|
||||||
|
|
||||||
## Clone a repo and give name other than origin
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone -o upstream https://repo.git
|
|
||||||
```
|
|
||||||
|
|
||||||
## Ignore Files for Repository without using `.gitignore`
|
|
||||||
|
|
||||||
Add the file `.git/info/exclude` and fill it with the contents you want to ignore. This will ONLY apply to the
|
|
||||||
repository and will not be tracked by git.
|
|
||||||
|
|
||||||
## Squash Commits
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git log
|
|
||||||
```
|
|
||||||
|
|
||||||
Count the number of commits that you have made, let's say the previous 5 are your commits.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git rebase -i HEAD~5
|
|
||||||
```
|
|
||||||
|
|
||||||
The first commit leave as `pick` the rest will need to be changed to `squash`. After that you will be able to
|
|
||||||
leave a new commit message or just leave as is to keep the commit messages from all previous commits.
|
|
||||||
|
|
||||||
## Search for a specific line of code/file in the history
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git log -S[search term]
|
|
||||||
```
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git log -SThatOneFile.php
|
|
||||||
```
|
|
||||||
|
|
||||||
## Copy file from one branch to current branch
|
|
||||||
|
|
||||||
Copy a file from `branch` and put into staging.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git checkout BRANCH path/to/file.ext
|
|
||||||
|
|
||||||
# Real Life Examples
|
|
||||||
git checkout origin/featureBranch web/js/random.js
|
|
||||||
# Pulls into your current branch web/js/random.js from
|
|
||||||
# origin/featureBranch
|
|
||||||
```
|
|
||||||
|
|
||||||
## Git Grepping for fun and profit!
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# Basic grep (case sensitive)
|
|
||||||
$ git grep 'search term'
|
|
||||||
|
|
||||||
# Case Insensitive search
|
|
||||||
$ git grep -i 'search term'
|
|
||||||
|
|
||||||
# Search within a directory
|
|
||||||
$ git grep 'search term' src/
|
|
||||||
|
|
||||||
# Search only files with `php` extension
|
|
||||||
$ git grep 'search term' -- '*.php'
|
|
||||||
|
|
||||||
# Grep in the 'src/` directory, only yml files
|
|
||||||
$ git grep 'search term' -- 'src/**.yml'
|
|
||||||
```
|
|
||||||
|
|
||||||
## Push Branch to Remote Repository to a different branch name
|
|
||||||
|
|
||||||
```shell
|
|
||||||
git push origin localBranchName:remoteBranchName
|
|
||||||
```
|
|
||||||
|
|
||||||
Use Case: I will often use rebase, I will cut a branch off the branch I want to rebase and
|
|
||||||
do the rebase on the newly created branch. Once I am done, I will check the diff and see if
|
|
||||||
I screwed up. If it's all good, `git push -f` **NOTICE**: DO NOT `git push -f` unless you know
|
|
||||||
what you are doing.
|
|
|
@ -1,64 +0,0 @@
|
||||||
GnuPG Cheat Sheet
|
|
||||||
=================
|
|
||||||
|
|
||||||
## Listing Key Pairs
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gpg --list-keys
|
|
||||||
```
|
|
||||||
|
|
||||||
For listing keys with the fingerprint, run
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gpg --fingerprint
|
|
||||||
```
|
|
||||||
|
|
||||||
## Generate New Key Pair
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gpg --gen-key
|
|
||||||
```
|
|
||||||
|
|
||||||
## Encrypt a message on command line
|
|
||||||
|
|
||||||
```bash
|
|
||||||
echo "Put message here" | gpg --armor --encrypt --recipient Joshua > FILE.gpg
|
|
||||||
```
|
|
||||||
|
|
||||||
This will put the encrypted text into `FILE.gpg` which you can send to someone or keep for
|
|
||||||
later use. For decrypting the message, see the next section.
|
|
||||||
|
|
||||||
## Decrypt a message from the command line
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cat FILE.gpg | gpg
|
|
||||||
```
|
|
||||||
|
|
||||||
Displays the decrypted text on the command line.
|
|
||||||
|
|
||||||
## Only display user X's key information
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gpg --fingerprint Joshua
|
|
||||||
```
|
|
||||||
|
|
||||||
## Signing Messages
|
|
||||||
|
|
||||||
```bash
|
|
||||||
echo "This is a top secret message" | gpg --clearsign
|
|
||||||
```
|
|
||||||
|
|
||||||
## Signing Text Files
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gpg --clearsign example.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
This will create `example.txt.asc` file.
|
|
||||||
|
|
||||||
## Verify Signatures
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gpg --verifiy example.txt.asc
|
|
||||||
```
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
Grep
|
|
||||||
====
|
|
||||||
|
|
||||||
## Ignore case
|
|
||||||
|
|
||||||
```shell
|
|
||||||
grep -i pattern
|
|
||||||
```
|
|
|
@ -1,11 +0,0 @@
|
||||||
Irssi Cheat Sheet
|
|
||||||
=================
|
|
||||||
|
|
||||||
M = Meta Key, meta key is either the left alt or esc key.
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|----------|-------------|
|
|
||||||
| M + p | Scroll up in window
|
|
||||||
| M + n | Scroll down in window
|
|
||||||
| ctrl + p | Previous window
|
|
||||||
| ctrl + n | Next window
|
|
|
@ -1,8 +0,0 @@
|
||||||
Jira Cheat Sheet
|
|
||||||
================
|
|
||||||
|
|
||||||
## Find by Mentions of current user within the past 7 days
|
|
||||||
|
|
||||||
```sql
|
|
||||||
comment ~ currentUser() AND updatedDate >= -7d
|
|
||||||
```
|
|
|
@ -1,39 +0,0 @@
|
||||||
# ln
|
|
||||||
|
|
||||||
make a symlink to `foo.txt`
|
|
||||||
|
|
||||||
ln -s foo.txt link-to-foo.txt
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Basic Usage
|
|
||||||
|
|
||||||
Make anchor a link to target:
|
|
||||||
|
|
||||||
ln -s <target> <anchor>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Symbolic Links (symlinks)
|
|
||||||
|
|
||||||
Make it symbolic with the `-s` flag:
|
|
||||||
|
|
||||||
$ ln -s foo.txt link-to-foo.txt
|
|
||||||
$ ls -lF
|
|
||||||
total 8
|
|
||||||
-rw-r--r-- 1 tyrion group 0 Feb 3 14:13 foo.txt
|
|
||||||
lrwxr-xr-x 1 tyrion group 7 Feb 3 14:14 link-to-foo.txt@ -> foo.txt
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Hard Links
|
|
||||||
|
|
||||||
Omit the `-s` flag:
|
|
||||||
|
|
||||||
$ ln foo.txt hard-link-to-foo.txt
|
|
||||||
$ ls -lF
|
|
||||||
total 0
|
|
||||||
-rw-r--r-- 2 tyrion group 0B Feb 3 14:13 foo.txt
|
|
||||||
-rw-r--r-- 2 tyrion group 0B Feb 3 14:13 hard-link-to-foo.txt
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
# lsof
|
|
||||||
|
|
||||||
Examine the process using a specified `port`:
|
|
||||||
|
|
||||||
lsof -i:3000 | grep LISTEN
|
|
|
@ -1,226 +0,0 @@
|
||||||
Mutt Cheat Sheet
|
|
||||||
================
|
|
||||||
|
|
||||||
## General
|
|
||||||
|
|
||||||
These key bindings will work on almost any menu you are in.
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|------------|-------------|
|
|
||||||
| * | Move to last entry
|
|
||||||
| = | Move to first entry
|
|
||||||
| : | Enter muttrc command
|
|
||||||
| > | Scroll down one line
|
|
||||||
| < | Scroll up one line
|
|
||||||
| [ | Scroll up half a page
|
|
||||||
| ] | Scroll down half a page
|
|
||||||
| ? | Help
|
|
||||||
| ; | Apply next function to tagged messages only
|
|
||||||
| ! | Invoke command in subshell
|
|
||||||
| return | Select the current entry
|
|
||||||
| esc + / | Search up
|
|
||||||
| / | Search down
|
|
||||||
| H | Move to top of page
|
|
||||||
| j | Move to next entry
|
|
||||||
| k | Move to previous entry
|
|
||||||
| ctrl + l | Redraw screen
|
|
||||||
| L | Move to bottom of page
|
|
||||||
| M | Move to middle of page
|
|
||||||
| n | Move to next match of search
|
|
||||||
| q | Exit menu
|
|
||||||
| t | Tag current entry
|
|
||||||
| z | Move to next page
|
|
||||||
| Z | Move to previous page
|
|
||||||
|
|
||||||
## Index Menu
|
|
||||||
|
|
||||||
When you first open mutt you are in the index menu.
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|---------------|-------------|
|
|
||||||
| & | Link tagged message to current one
|
|
||||||
| # | Break the thread in two
|
|
||||||
| % | Toggle whether mailbox will be rewritten
|
|
||||||
| . | List mailboxes with new mail
|
|
||||||
| $ | Save changes to mailbox
|
|
||||||
| @ | Display full address of sender
|
|
||||||
| | | Pipe message to a shell command
|
|
||||||
| esc + tab | Jump to previous new or unread message
|
|
||||||
| return | Display message
|
|
||||||
| tab | Jump to next new or unread message
|
|
||||||
| a | Create alias from message sender
|
|
||||||
| b | Remail message to another user
|
|
||||||
| esc + c | Open a different folder (Read Only)
|
|
||||||
| c | Open a different folder
|
|
||||||
| esc + C | Make text/plain copy
|
|
||||||
| C | Copy message to another file/mailbox
|
|
||||||
| esc + d | Delete all messages in subthread
|
|
||||||
| d | Delete current message
|
|
||||||
| ctrl + D | Delete all messages in thread
|
|
||||||
| D | Delete messages matching a pattern
|
|
||||||
| esc + e | Use the current message as a template for a new one
|
|
||||||
| e | Edit the raw message
|
|
||||||
| ctrl + E | Edit attachment content type
|
|
||||||
| f | Forward message with comments
|
|
||||||
| ctrl + F | Wipe passphrase from memory
|
|
||||||
| F | Toggle the important flag for message
|
|
||||||
| g | Reply to all
|
|
||||||
| G | Retrive mail from POP server
|
|
||||||
| h | Display message and toggle header weeding
|
|
||||||
| j | Move to next undeleted message
|
|
||||||
| esc + k | Mail a PGP key
|
|
||||||
| k | Move to previous undeleted message
|
|
||||||
| ctrl + K | Extract supported public keys
|
|
||||||
| esc + l | Show current limit pattern
|
|
||||||
| l | Only show messages matching a pattern
|
|
||||||
| L | Reply to specific mailing list
|
|
||||||
| m | Compose new message
|
|
||||||
| esc + n | Jump to next subthread
|
|
||||||
| ctrl + N | Jump to next thread
|
|
||||||
| N | Toggle new flag
|
|
||||||
| o | Sort messages
|
|
||||||
| O | Sort messages in reverse order
|
|
||||||
| Q | Query external program for addresses
|
|
||||||
| q | Save changes to mailbox and quit
|
|
||||||
| r | Reply to message
|
|
||||||
| ctrl + P | Jump to previous thread
|
|
||||||
| esc + p | Jump to previous subthread
|
|
||||||
| p | Print current message
|
|
||||||
| esc + P | Check for classic PGP
|
|
||||||
| P | Jump to parent message in thread
|
|
||||||
| ctrl + R | Mark current thread as read
|
|
||||||
| R | Recall a postponed message
|
|
||||||
| esc + r | Mark current subthread as read
|
|
||||||
| esc + s | Save text/plain copy and delete
|
|
||||||
| s | Save message/attachment to mailbox/file
|
|
||||||
| esc + t | Tag current thread
|
|
||||||
| ctrl + T | Untag messages matching a pattern
|
|
||||||
| T | Tag messages matching pattern
|
|
||||||
| esc + u | Undelete all messages in subthread
|
|
||||||
| u | Undelete current entry
|
|
||||||
| ctrl + U | Undelete all messages in thread
|
|
||||||
| U | Undelete messages matching pattern
|
|
||||||
| esc + v | Collapse/uncollapse current thread
|
|
||||||
| v | Show mime attachments
|
|
||||||
| esc + V | Collapse/uncollapse all threads
|
|
||||||
| V | Show mutt version number and date
|
|
||||||
| w | Set a status flag
|
|
||||||
| W | Clear status flags from message
|
|
||||||
|
|
||||||
## Pager Menu
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|---------|-------------|
|
|
||||||
| # | |
|
|
||||||
| a | |
|
|
||||||
| b | |
|
|
||||||
| c | |
|
|
||||||
| esc + c | |
|
|
||||||
| C | |
|
|
||||||
| esc + C | |
|
|
||||||
| d | |
|
|
||||||
| ctrl + D | |
|
|
||||||
| esc + d | |
|
|
||||||
| w | |
|
|
||||||
| W | |
|
|
||||||
| e | |
|
|
||||||
| ctrl + E | |
|
|
||||||
| f | |
|
|
||||||
| F | |
|
|
||||||
| g | |
|
|
||||||
| h | |
|
|
||||||
| j | |
|
|
||||||
| J | |
|
|
||||||
| k | |
|
|
||||||
| K | |
|
|
||||||
| & | |
|
|
||||||
| L | |
|
|
||||||
| ctrl + L | |
|
|
||||||
| m | |
|
|
||||||
| n | |
|
|
||||||
| N | |
|
|
||||||
| ctrl + N | |
|
|
||||||
| esc + n | |
|
|
||||||
| o | |
|
|
||||||
| O | |
|
|
||||||
| p | |
|
|
||||||
| ctrl + P | |
|
|
||||||
| esc + p | |
|
|
||||||
| Q | |
|
|
||||||
| q | |
|
|
||||||
| r | |
|
|
||||||
| R | |
|
|
||||||
| ctrl + R | |
|
|
||||||
| esc + r | |
|
|
||||||
| esc + e | |
|
|
||||||
| s | |
|
|
||||||
| S | |
|
|
||||||
| esc + s | |
|
|
||||||
| t | |
|
|
||||||
| T | |
|
|
||||||
| u | |
|
|
||||||
| esc + u | |
|
|
||||||
| ctrl + U | |
|
|
||||||
| v | |
|
|
||||||
| V | |
|
|
||||||
| \\ | |
|
|
||||||
| @ | |
|
|
||||||
| | | |
|
|
||||||
| ? | |
|
|
||||||
| space | |
|
|
||||||
| - | |
|
|
||||||
| ^ | |
|
|
||||||
| $ | |
|
|
||||||
| ! | |
|
|
||||||
| : | |
|
|
||||||
| . | |
|
|
||||||
| / | |
|
|
||||||
| esc + / | |
|
|
||||||
| return | |
|
|
||||||
| P | |
|
|
||||||
| esc + P | |
|
|
||||||
| esc + k | |
|
|
||||||
| ctrl + K | |
|
|
||||||
| ctrl + F | |
|
|
||||||
|
|
||||||
## Useful key remaps
|
|
||||||
|
|
||||||
These need to be placed in your `muttrc` file. I use vim and so I want to use some of the
|
|
||||||
same commands to manage my mail.
|
|
||||||
|
|
||||||
```muttrc
|
|
||||||
# Does not replace and currently mapped keys and acts like the vim command gg and takes
|
|
||||||
# you to the top of the page
|
|
||||||
bind index gg first-entry
|
|
||||||
|
|
||||||
# Replaces the retrieval of mail from a POP server. This will take you to the bottom of
|
|
||||||
# the page, just like it does in vim
|
|
||||||
bind index G last-entry
|
|
||||||
```
|
|
||||||
|
|
||||||
## Flags
|
|
||||||
|
|
||||||
When viewing messages in the index menu, you will see various flags such as `N` which mean
|
|
||||||
the messages is new and `D` which means that the message is to be deleted. This is a short
|
|
||||||
list of those flags.
|
|
||||||
|
|
||||||
| flag | description |
|
|
||||||
|------|-------------|
|
|
||||||
| ! | Message is flagged
|
|
||||||
| * | Message is tagged
|
|
||||||
| + | Message is To: you and only you
|
|
||||||
| C | Message is Cc: to you
|
|
||||||
| d | Message has attachments marked for deletion
|
|
||||||
| D | Marked for deletion
|
|
||||||
| F | Message is From: you
|
|
||||||
| K | Contains PGP key
|
|
||||||
| L | Message is sent to a subscribed mailing list
|
|
||||||
| n | Thread contains new messages (Only when thread is collapsed)
|
|
||||||
| N | Message is new
|
|
||||||
| o | Thread contains old messages (Only when thread is collapsed)
|
|
||||||
| O | Message is old
|
|
||||||
| P | Message is PGP encrypted
|
|
||||||
| r | Message has been replied to
|
|
||||||
| s | Message is signed
|
|
||||||
| S | Message is signed and verified
|
|
||||||
| T | Message is to you and has others in To: or Cc:
|
|
|
@ -1,8 +0,0 @@
|
||||||
Nmap Cheat Sheet
|
|
||||||
================
|
|
||||||
|
|
||||||
## Scan a Port
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nmap -p 80 google.com
|
|
||||||
```
|
|
|
@ -1,25 +0,0 @@
|
||||||
OpenSSL Cheat Sheet
|
|
||||||
===================
|
|
||||||
|
|
||||||
## Generate Self-Signed Certificate and Private Key
|
|
||||||
|
|
||||||
```shell
|
|
||||||
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048 && openssl rsa -passin pass:x -in server.pass.key -out server.key && openssl req -new -key server.key -out server.csr
|
|
||||||
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
|
|
||||||
```
|
|
||||||
|
|
||||||
- Use `server.crt` and `server.key`
|
|
||||||
|
|
||||||
### Encypt/Decrypt file
|
|
||||||
|
|
||||||
```
|
|
||||||
# Encrypt
|
|
||||||
openssl aes-128-cbc -a -e -pass pass:test -in vars -out vars.enc
|
|
||||||
# Puts encrypted data into vars.enc file
|
|
||||||
|
|
||||||
# Decrypt
|
|
||||||
openssl aes-128-cbc -a -d -pass pass:test -in vars.enc
|
|
||||||
# Outputs decrypted data to STDOUT
|
|
||||||
```
|
|
||||||
|
|
||||||
NOTE: See `openssl passpharse arguments` for information on using the password on the commandline. It can be changed to a file or an environment variable.
|
|
|
@ -1,28 +0,0 @@
|
||||||
Other Cheat Sheets
|
|
||||||
==================
|
|
||||||
|
|
||||||
## Using `less` instead of tail
|
|
||||||
|
|
||||||
```shell
|
|
||||||
less +F -R /path/to/logfile.log
|
|
||||||
```
|
|
||||||
|
|
||||||
* To scroll up and down, press `<ctrl>+c`
|
|
||||||
* Return to tail mode, press `F`
|
|
||||||
|
|
||||||
The `+F` says to follow? The `-R` will process any ANSII color codes.
|
|
||||||
|
|
||||||
## SSH Config File
|
|
||||||
|
|
||||||
```
|
|
||||||
# ~/.ssh/config
|
|
||||||
Host test
|
|
||||||
HostName testing.example.com
|
|
||||||
Port 22222
|
|
||||||
User joshua
|
|
||||||
IdentityFile ~/.ssh/test.example.com.key
|
|
||||||
```
|
|
||||||
|
|
||||||
Next, all you need to do to ssh into the server is `ssh test` and that's it.
|
|
||||||
|
|
||||||
> **NOTE** `HostName` may be an IP Address instead of a domain name
|
|
|
@ -1,10 +0,0 @@
|
||||||
# pdftk
|
|
||||||
|
|
||||||
join a bunch of pdfs
|
|
||||||
|
|
||||||
pdftk file01.pdf file02.pdf file03.pdf cat output combined_file.pdf
|
|
||||||
|
|
||||||
|
|
||||||
Add a password to a pdf
|
|
||||||
|
|
||||||
pdftk file.pdf output file_pw.pdf user_pw Passw0rd!
|
|
|
@ -1,6 +0,0 @@
|
||||||
# rename (concept, not command)
|
|
||||||
|
|
||||||
rename `index.jsx` to `index.tsx` one level down
|
|
||||||
|
|
||||||
for i in **/index.jsx; do mv -v $i ${i/jsx/tsx}; done
|
|
||||||
|
|
|
@ -1,111 +0,0 @@
|
||||||
# tar
|
|
||||||
|
|
||||||
extract .tar file
|
|
||||||
|
|
||||||
tar vfx archive.tar
|
|
||||||
|
|
||||||
|
|
||||||
unzip and extract .tar.gz or .tgz file
|
|
||||||
|
|
||||||
tar vfxz g_zipped_archive.tar.gz
|
|
||||||
|
|
||||||
|
|
||||||
turn directory into a .tar file
|
|
||||||
|
|
||||||
tar vfc tarred_directory.tar directory
|
|
||||||
|
|
||||||
|
|
||||||
turn directory into g-zipped directory
|
|
||||||
|
|
||||||
tar vfcz z_zipped_directory.tar.gz directory
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Basic Usage
|
|
||||||
|
|
||||||
`vf` means verbosely list files (`v`) and use a file (`f`), not `stdin`.
|
|
||||||
These appear in most commands.
|
|
||||||
|
|
||||||
Untar a file:
|
|
||||||
|
|
||||||
tar vfx <tar-file-to-extract>
|
|
||||||
|
|
||||||
|
|
||||||
Create a tar file from a directory:
|
|
||||||
|
|
||||||
tar vfc <name-of-tar-file> <directory-to-tar>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Remembering the Flags
|
|
||||||
|
|
||||||
`tar` is very finicky. Flags don't need to be prepended by a hyphen, but are
|
|
||||||
instead bundled into the first word on the command line. A leading hyphen will
|
|
||||||
break some implementations or require an order. For example, `tar vfx` might
|
|
||||||
work while with a hyphen it would require `tar -xvf`, with the `x` flag first.
|
|
||||||
You can get maximum portability is you never use the hyphens, so examples here
|
|
||||||
are shown without the hyphen.
|
|
||||||
|
|
||||||
You'll almost always want `vf`. `v` verbosely lists files as they are
|
|
||||||
manipulated, and `f` means you're reading from a file, not `stdin`. You can
|
|
||||||
remember `vf` if you remember that `tar` is Very Finicky: `vf`.
|
|
||||||
|
|
||||||
Extract things from a tar file with `x` for extraction. Compress things to a
|
|
||||||
tar file with `c` for compress.
|
|
||||||
|
|
||||||
And you'll have to just remember that g-zipping is `z` and b-zipping is `j`.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Tarring
|
|
||||||
|
|
||||||
Compress directory (`c`) into g-zipped (`z`) directory:
|
|
||||||
|
|
||||||
tar vfcz z_zipped_directory.tar.gz directory
|
|
||||||
|
|
||||||
|
|
||||||
Compress directory (`c`) into b-zipped (`j`) directory:
|
|
||||||
|
|
||||||
tar vfcj b_zipped_directory.tar.bz2 directory
|
|
||||||
|
|
||||||
|
|
||||||
Compress directory (`c`) into xz-zipped (`J`) directory:
|
|
||||||
|
|
||||||
tar vfcJ xz_zipped_directory.tar.xz directory
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Untarring
|
|
||||||
|
|
||||||
Untar (`x`) and unzip a g-zipped (`z`) file:
|
|
||||||
|
|
||||||
tar vfxz g_zipped_archive.tar.gz
|
|
||||||
|
|
||||||
|
|
||||||
Untar (`x`) and unzip a b-zipped (`j`) file:
|
|
||||||
|
|
||||||
tar vfxj b_zipped_archive.tar.bz2
|
|
||||||
|
|
||||||
|
|
||||||
Untar (`x`) and unzip an xz-zipped (`J`) file:
|
|
||||||
|
|
||||||
tar vfxJ xz_zipped_archive.tar.xz
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Partial Untarring
|
|
||||||
|
|
||||||
Extract only part of the contents (`directory/foo.txt`) from a .tar file:
|
|
||||||
|
|
||||||
tar vfx archived_directory.tar directory/foo.txt
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Display Contents
|
|
||||||
|
|
||||||
List (`t`) the contents of a tar file without untarring it:
|
|
||||||
|
|
||||||
$ tar vft tarred_directory.tar
|
|
||||||
drwxr-xr-x 0 tyrion group 0 Feb 4 14:54 directory/
|
|
||||||
-rw-r--r-- 0 tyrion group 0 Feb 4 14:54 directory/bar.txt
|
|
||||||
-rw-r--r-- 0 tyrion group 0 Feb 4 14:54 directory/foo.txt
|
|
|
@ -1,92 +0,0 @@
|
||||||
Tmux Cheat Sheet
|
|
||||||
================
|
|
||||||
|
|
||||||
`ctrl + b` is default to enter before you enter the commands. `M` = Left Alt key
|
|
||||||
or ESC key
|
|
||||||
|
|
||||||
## Windows
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|---------|-------------|
|
|
||||||
| c | Create a new window.
|
|
||||||
| & | Kill the current window.
|
|
||||||
| n | Change to the next window.
|
|
||||||
| p | Change to the previous window.
|
|
||||||
| , | Rename the current window.
|
|
||||||
| w | Choose the current window interactively.
|
|
||||||
| M-n | Move to the next window with a bell or activity marker.
|
|
||||||
| M-p | Move to the previous window with a bell or activity marker.
|
|
||||||
|
|
||||||
## Panes
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|---------|------------ |
|
|
||||||
| " | Split the current pane into two, top and bottom.
|
|
||||||
| % | Split the current pane into two, left and right.
|
|
||||||
| x | Kill the current pane.
|
|
||||||
| ; | Move to the previously active pane.
|
|
||||||
| o | Select the next pane in the current window.
|
|
||||||
| ! | Break the current pane out of the window.
|
|
||||||
| q | Briefly display pane indexes.
|
|
||||||
|
|
||||||
## Other
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|---------|-------------|
|
|
||||||
| d | Detach the current client.
|
|
||||||
| $ | Rename the current session.
|
|
||||||
| [ | Enter copy mode to copy text or view the history.
|
|
||||||
| f | Prompt to search for text in open windows.
|
|
||||||
| r | Force redraw of the attached client.
|
|
||||||
| L | Switch the attached client back to the last session.
|
|
||||||
| : | Enter the tmux command prompt
|
|
||||||
| ? | List all key bindings
|
|
||||||
| f | Search window titles and goto that window
|
|
||||||
| i | Briefly display window information
|
|
||||||
| r | Force redraw of the attached client.
|
|
||||||
| s | Select a new session for the attached client interactively.
|
|
||||||
| t | Show the time.
|
|
||||||
| = | Choose which buffer to paste interactively from a list.
|
|
||||||
| ] | Paste the most recently copied buffer of text.
|
|
||||||
| . | Move window
|
|
||||||
|
|
||||||
## Create a new session
|
|
||||||
|
|
||||||
Any of these will work.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
tmux
|
|
||||||
tmux new
|
|
||||||
tmux new-session
|
|
||||||
```
|
|
||||||
|
|
||||||
## Reattach to a session
|
|
||||||
|
|
||||||
Any of these commands will work.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
tmux at
|
|
||||||
tmux attach
|
|
||||||
tmux attach-session
|
|
||||||
```
|
|
||||||
|
|
||||||
## List sessions
|
|
||||||
|
|
||||||
Any of these commands will work.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
tmux ls
|
|
||||||
tmux list-sessions
|
|
||||||
```
|
|
||||||
|
|
||||||
## How to copy and paste
|
|
||||||
|
|
||||||
1. Enter copy-mode `C-b [`
|
|
||||||
2. Move to text, press `Space` to select text, move cursor to highlight text
|
|
||||||
3. Press `Enter`
|
|
||||||
4. Back at the command prompt, press `C-b ]` and the text you selected is pasted
|
|
||||||
|
|
||||||
## References
|
|
||||||
|
|
||||||
* http://man.openbsd.org/OpenBSD-current/man1/tmux.1
|
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
UML Cheat Sheet
|
|
||||||
===============
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
<<interface>>
|
|
||||||
<<abstract>>
|
|
||||||
<<concrete>>
|
|
||||||
|
|
||||||
- private
|
|
||||||
# protected
|
|
||||||
+ public
|
|
||||||
|
|
||||||
name : type = default value
|
|
||||||
```
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
```
|
|
||||||
<<abstract>>
|
|
||||||
Name\Space\To\ClassAbstract
|
|
||||||
---
|
|
||||||
- $privateAttribute : string = ''
|
|
||||||
# $protected : integer = 1
|
|
||||||
+ $public : string = 'DefaultValue'
|
|
||||||
---
|
|
||||||
+ getPrivateAttribute() : string
|
|
||||||
+ getValueForKey($key : string) : mixed
|
|
||||||
+ get($key : string, $default : mixed = null) : mixed
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
Class A "uses" Class B
|
|
||||||
[Class A]- - - ->[Class B]
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
Class A "has a" Class B
|
|
||||||
[Class A]---->[Class B]
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
Company "owns" Employee
|
|
||||||
[Company]⃟----[Employee]
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
Ford "is a" Car
|
|
||||||
[Car]◁----[Ford]
|
|
||||||
```
|
|
|
@ -1,5 +0,0 @@
|
||||||
# vim
|
|
||||||
|
|
||||||
paste from clipboard into vim
|
|
||||||
|
|
||||||
"*yy OR "+yy (clarify this)
|
|
|
@ -1,5 +0,0 @@
|
||||||
# youtube-dl
|
|
||||||
|
|
||||||
Download a video and convert it to MP4
|
|
||||||
|
|
||||||
youtube-dl -v -o '%(title)s.%(ext)s' --restrict-filenames --recode-video mp4 qXYh8DmBZek
|
|
|
@ -1,4 +0,0 @@
|
||||||
Zsh Cheat Sheet
|
|
||||||
===============
|
|
||||||
|
|
||||||
Still haven't got around to digging in a reading the man pages for this yet.
|
|
|
@ -1,3 +0,0 @@
|
||||||
[eg-config]
|
|
||||||
examples-dir = ~/builds/eg/eg/examples
|
|
||||||
custom-dir = ~/.eg_custom
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,11 +0,0 @@
|
||||||
[user]
|
|
||||||
name = Adam Cooper
|
|
||||||
email = theadamcooper@protonmail.com
|
|
||||||
[core]
|
|
||||||
pager = diff-so-fancy | less --tabs=4 -RFX
|
|
||||||
editor = vim
|
|
||||||
[filter "lfs"]
|
|
||||||
clean = git-lfs clean -- %f
|
|
||||||
smudge = git-lfs smudge -- %f
|
|
||||||
process = git-lfs filter-process
|
|
||||||
required = true
|
|
|
@ -1,6 +0,0 @@
|
||||||
# This script should install oh-my-zsh and vim-plug
|
|
||||||
# oh-my-zsh
|
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
|
||||||
|
|
||||||
# vim-plug
|
|
||||||
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
@ -1,9 +0,0 @@
|
||||||
color background black default
|
|
||||||
color listnormal black default
|
|
||||||
color listfocus white blue
|
|
||||||
color listnormal_unread magenta default
|
|
||||||
color listfocus_unread white blue bold
|
|
||||||
color info white blue
|
|
||||||
color article black default
|
|
||||||
max-items 4096
|
|
||||||
keep-articles-days 45
|
|
|
@ -1,4 +0,0 @@
|
||||||
finger
|
|
||||||
finger
|
|
||||||
finger
|
|
||||||
selfie
|
|
|
@ -1,38 +0,0 @@
|
||||||
http://feeds.guardian.co.uk/theguardian/world/rss "nuggets"
|
|
||||||
http://www.wsws.org/rss/en.xml "nuggets"
|
|
||||||
http://www.democracynow.org/democracynow.rss "nuggets"
|
|
||||||
http://news.ycombinator.com/rss "tech"
|
|
||||||
https://lobste.rs/rss "tech"
|
|
||||||
http://www.languagehat.com/index.rdf "linguistics"
|
|
||||||
http://www.opengeodata.org/?feed=rss2 "tech"
|
|
||||||
http://feeds.arstechnica.com/arstechnica/index/ "tech"
|
|
||||||
http://feeds.feedburner.com/TheCssAwards "tech"
|
|
||||||
http://feeds.feedburner.com/CssTricks "tech"
|
|
||||||
https://protonvpn.com/blog/feed/ "tech"
|
|
||||||
https://cloudblog.withgoogle.com/rss/ "tech"
|
|
||||||
https://spreadprivacy.com/feed "tech"
|
|
||||||
https://protonmail.ch/blog/feed/ "tech"
|
|
||||||
https://os.phil-opp.com/rss.xml "tech"
|
|
||||||
http://www.bleepingcomputer.com/feed/ "tech"
|
|
||||||
https://mondediplo.com/backend "nuggets"
|
|
||||||
http://feeds.feedburner.com/Metafilter "nuggets"
|
|
||||||
http://feeds.feedburner.com/InTheseTimes "nuggets"
|
|
||||||
http://whowhatwhy.com/feed/ "nuggets"
|
|
||||||
http://jacobinmag.com/feed/ "nuggets"
|
|
||||||
http://www.thebaffler.com/blog/rss "nuggets"
|
|
||||||
http://www.dissentmagazine.org/feed "nuggets"
|
|
||||||
https://www.govtrack.us/events/events.rss?feeds=bill%3As116-1489 "nuggets"
|
|
||||||
https://www.govtrack.us/events/events.rss?feeds=bill%3Ah116-2728 "nuggets"
|
|
||||||
https://www.govtrack.us/events/events.rss?feeds=bill%3Ah116-2065 "nuggets"
|
|
||||||
https://harpers.org/feed/ "nuggets"
|
|
||||||
http://feeds.propublica.org/propublica/nerds "nuggets"
|
|
||||||
http://feeds.propublica.org/propublica/main "nuggets"
|
|
||||||
http://www.counterpunch.org/feed/ "nuggets"
|
|
||||||
http://thenewinquiry.com/rss "nuggets"
|
|
||||||
http://editor.currentaffairs.org/feed/ "nuggets"
|
|
||||||
https://www.truthdig.com/feed/ "nuggets"
|
|
||||||
http://googletesting.blogspot.com/feeds/posts/default "webdev"
|
|
||||||
http://javascriptweekly.com/rss "webdev"
|
|
||||||
http://feeds.feedburner.com/Bludice "webdev"
|
|
||||||
https://reactjs.org/feed.xml "webdev"
|
|
||||||
https://theintercept.com/feed/?lang=en "nuggets"
|
|
|
@ -1,206 +0,0 @@
|
||||||
[[columns]]
|
|
||||||
kind = "Pid"
|
|
||||||
style = "BrightYellow"
|
|
||||||
numeric_search = true
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Left"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "User"
|
|
||||||
style = "BrightGreen"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = true
|
|
||||||
align = "Left"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "Separator"
|
|
||||||
style = "Magenta"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Left"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "State"
|
|
||||||
style = "ByState"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Left"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "Nice"
|
|
||||||
style = "BrightMagenta"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Right"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "Tty"
|
|
||||||
style = "Blue"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Left"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "UsageCpu"
|
|
||||||
style = "ByPercentage"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Right"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "UsageMem"
|
|
||||||
style = "ByPercentage"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Right"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "VmSize"
|
|
||||||
style = "ByUnit"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Right"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "VmRss"
|
|
||||||
style = "ByUnit"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Right"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "TcpPort"
|
|
||||||
style = "BrightCyan"
|
|
||||||
numeric_search = true
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Left"
|
|
||||||
max_width = 20
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "UdpPort"
|
|
||||||
style = "BrightCyan"
|
|
||||||
numeric_search = true
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Left"
|
|
||||||
max_width = 20
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "ReadBytes"
|
|
||||||
style = "ByUnit"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Right"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "WriteBytes"
|
|
||||||
style = "ByUnit"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Right"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "Slot"
|
|
||||||
style = "ByUnit"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Right"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "Separator"
|
|
||||||
style = "Magenta"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Left"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "CpuTime"
|
|
||||||
style = "BrightCyan"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Left"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "StartTime"
|
|
||||||
style = "BrightMagenta"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Left"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "Docker"
|
|
||||||
style = "BrightGreen"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = true
|
|
||||||
align = "Left"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "Separator"
|
|
||||||
style = "Magenta"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = false
|
|
||||||
align = "Left"
|
|
||||||
|
|
||||||
[[columns]]
|
|
||||||
kind = "Command"
|
|
||||||
style = "Blue"
|
|
||||||
numeric_search = false
|
|
||||||
nonnumeric_search = true
|
|
||||||
align = "Left"
|
|
||||||
|
|
||||||
[style]
|
|
||||||
header = "Blue"
|
|
||||||
unit = "Blue"
|
|
||||||
|
|
||||||
[style.by_percentage]
|
|
||||||
color_000 = "BrightBlue"
|
|
||||||
color_025 = "BrightGreen"
|
|
||||||
color_050 = "BrightYellow"
|
|
||||||
color_075 = "BrightRed"
|
|
||||||
color_100 = "BrightRed"
|
|
||||||
|
|
||||||
[style.by_state]
|
|
||||||
color_d = "BrightRed"
|
|
||||||
color_r = "BrightGreen"
|
|
||||||
color_s = "BrightBlue"
|
|
||||||
color_t = "BrightCyan"
|
|
||||||
color_z = "BrightMagenta"
|
|
||||||
color_x = "BrightMagenta"
|
|
||||||
color_k = "BrightYellow"
|
|
||||||
color_w = "BrightYellow"
|
|
||||||
color_p = "BrightYellow"
|
|
||||||
|
|
||||||
[style.by_unit]
|
|
||||||
color_k = "BrightBlue"
|
|
||||||
color_m = "BrightGreen"
|
|
||||||
color_g = "BrightYellow"
|
|
||||||
color_t = "BrightRed"
|
|
||||||
color_p = "BrightRed"
|
|
||||||
color_x = "BrightBlue"
|
|
||||||
|
|
||||||
[search]
|
|
||||||
numeric_search = "Exact"
|
|
||||||
nonnumeric_search = "Partial"
|
|
||||||
logic = "And"
|
|
||||||
|
|
||||||
[display]
|
|
||||||
show_self = false
|
|
||||||
cut_to_terminal = true
|
|
||||||
cut_to_pager = false
|
|
||||||
cut_to_pipe = false
|
|
||||||
color_mode = "Auto"
|
|
||||||
separator = "│"
|
|
||||||
ascending = "▲"
|
|
||||||
descending = "▼"
|
|
||||||
tree_symbols = ["│", "─", "┬", "├", "└"]
|
|
||||||
abbr_sid = true
|
|
||||||
|
|
||||||
[sort]
|
|
||||||
column = 0
|
|
||||||
order = "Ascending"
|
|
||||||
|
|
||||||
[docker]
|
|
||||||
path = "unix:///var/run/docker.sock"
|
|
||||||
|
|
||||||
[pager]
|
|
||||||
mode = "Auto"
|
|
||||||
|
|
|
@ -1,64 +0,0 @@
|
||||||
# 256 colors for vim
|
|
||||||
set -g default-terminal "screen-256color"
|
|
||||||
|
|
||||||
# Set default shell to zsh
|
|
||||||
set-option -g default-shell /bin/zsh
|
|
||||||
|
|
||||||
# Tmuxline
|
|
||||||
if-shell "test -f ~/.tmuxline_snapshot.conf" "source ~/.tmuxline_snapshot.conf"
|
|
||||||
|
|
||||||
# Start window numbering at 1
|
|
||||||
set-option -g base-index 1
|
|
||||||
set-window-option -g pane-base-index 1
|
|
||||||
|
|
||||||
# Cycle panes with C-b C-b
|
|
||||||
unbind ^B
|
|
||||||
bind ^B select-pane -t :.+
|
|
||||||
|
|
||||||
# Reload config wtih a key
|
|
||||||
bind-key r source-file ~/.tmux.conf \; display "Config reloaded!"
|
|
||||||
|
|
||||||
# Mouse works as expected
|
|
||||||
set -g mouse on
|
|
||||||
# set -g mode-mouse on
|
|
||||||
# set -g mouse-select-pane on
|
|
||||||
# set -g mouse-resize-pane on
|
|
||||||
# set -g mouse-select-window on
|
|
||||||
|
|
||||||
# Scrolling works as expected
|
|
||||||
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
|
|
||||||
|
|
||||||
# Use the system clipboard
|
|
||||||
# set-option -g default-command "reattach-to-user-namespace -l zsh"
|
|
||||||
|
|
||||||
# Clear the pane and its history
|
|
||||||
bind -n C-k send-keys C-l \; clear-history
|
|
||||||
|
|
||||||
# Smart pane switching with awareness of vim splits
|
|
||||||
# From github.com/christoomey/vim-tmux-navigator
|
|
||||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
|
||||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
|
||||||
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
|
||||||
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
|
||||||
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
|
|
||||||
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
|
|
||||||
bind-key -n C-\\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
|
|
||||||
bind-key -T copy-mode-vi C-h select-pane -L
|
|
||||||
bind-key -T copy-mode-vi C-j select-pane -D
|
|
||||||
bind-key -T copy-mode-vi C-k select-pane -U
|
|
||||||
bind-key -T copy-mode-vi C-l select-pane -R
|
|
||||||
bind-key -T copy-mode-vi C-\\ select-pane -l
|
|
||||||
|
|
||||||
# C-l is taken over by vim style pane navigation (not sure where this comes from or whether I still need this)
|
|
||||||
bind C-l send-keys 'C-l'
|
|
||||||
|
|
||||||
# Use vim keybindings in copy mode
|
|
||||||
setw -g mode-keys vi
|
|
||||||
|
|
||||||
# Setup 'v' to begin selection as in Vim
|
|
||||||
# bind-key -t vi-copy v begin-selection
|
|
||||||
# bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
|
|
||||||
|
|
||||||
# Update default binding of `Enter` to also use copy-pipe
|
|
||||||
# unbind -t vi-copy Enter
|
|
||||||
# bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
|
|
|
@ -1,21 +0,0 @@
|
||||||
# This tmux statusbar config was created by tmuxline.vim
|
|
||||||
# on Mon, 13 Jul 2020
|
|
||||||
|
|
||||||
set -g status-justify "left"
|
|
||||||
set -g status "on"
|
|
||||||
set -g status-left-style "none"
|
|
||||||
set -g message-command-style "fg=colour18,bg=colour45"
|
|
||||||
set -g status-right-style "none"
|
|
||||||
set -g pane-active-border-style "fg=colour27"
|
|
||||||
set -g status-style "none,bg=colour159"
|
|
||||||
set -g message-style "fg=colour18,bg=colour45"
|
|
||||||
set -g pane-border-style "fg=colour45"
|
|
||||||
set -g status-right-length "100"
|
|
||||||
set -g status-left-length "100"
|
|
||||||
setw -g window-status-activity-style "none"
|
|
||||||
setw -g window-status-separator ""
|
|
||||||
setw -g window-status-style "none,fg=colour27,bg=colour159"
|
|
||||||
set -g status-left "#[fg=colour255,bg=colour27] #S #[fg=colour27,bg=colour159,nobold,nounderscore,noitalics]"
|
|
||||||
set -g status-right "#[fg=colour45,bg=colour159,nobold,nounderscore,noitalics]#[fg=colour18,bg=colour45] %Y-%m-%d %H:%M #[fg=colour27,bg=colour45,nobold,nounderscore,noitalics]#[fg=colour255,bg=colour27] #h "
|
|
||||||
setw -g window-status-format "#[fg=colour27,bg=colour159] #I #[fg=colour27,bg=colour159] #W "
|
|
||||||
setw -g window-status-current-format "#[fg=colour159,bg=colour45,nobold,nounderscore,noitalics]#[fg=colour18,bg=colour45] #I #[fg=colour18,bg=colour45] #W #[fg=colour45,bg=colour159,nobold,nounderscore,noitalics]"
|
|
|
@ -1,26 +0,0 @@
|
||||||
{
|
|
||||||
"session_name": "acorn",
|
|
||||||
"windows": [{
|
|
||||||
"window_name": "ide",
|
|
||||||
"panes": [
|
|
||||||
"vim -R package.json",
|
|
||||||
"ls",
|
|
||||||
"git status"
|
|
||||||
],
|
|
||||||
"layout": "main-horizontal",
|
|
||||||
"main-pane-height": 32,
|
|
||||||
"start_directory": "~/code/acorn-glen"
|
|
||||||
}, {
|
|
||||||
"window_name": "servers",
|
|
||||||
"start_directory": "~/code/acorn-glen",
|
|
||||||
"layout": "main-horizontal",
|
|
||||||
"panes": [{
|
|
||||||
"shell_command": [ "cd ~/code/acorn-glen", "echo 'yarn dev'" ]
|
|
||||||
}, {
|
|
||||||
"shell_command": [ "sleep 4", "echo 'yarn relay --watch'" ]
|
|
||||||
}, {
|
|
||||||
"shell_command": [ "sleep 4", "echo 'yarn start'" ]
|
|
||||||
}]
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
"session_name": "general",
|
|
||||||
"windows": [{
|
|
||||||
"window_name": "ytop",
|
|
||||||
"panes": ["ytop -c default-dark"]
|
|
||||||
}, {
|
|
||||||
"window_name": "newsboat",
|
|
||||||
"panes": ["newsboat"]
|
|
||||||
}, {
|
|
||||||
"window_name": "ddgr",
|
|
||||||
"panes": ["ddgr --unsafe --noua"]
|
|
||||||
}, {
|
|
||||||
"panes": ["echo 'session \"general\"'"]
|
|
||||||
}],
|
|
||||||
"start_directory": "~"
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
{
|
|
||||||
"session_name": "turnip",
|
|
||||||
"windows": [{
|
|
||||||
"window_name": "ide",
|
|
||||||
"panes": [
|
|
||||||
"echo 'vim -R package.json'",
|
|
||||||
"ls",
|
|
||||||
"echo 'git was here'"
|
|
||||||
],
|
|
||||||
"layout": "main-horizontal",
|
|
||||||
"main-pane-height": 32,
|
|
||||||
"start_directory": "~/code/turnip-glen"
|
|
||||||
}, {
|
|
||||||
"window_name": "servers",
|
|
||||||
"start_directory": "~/code/turnip-glen",
|
|
||||||
"layout": "main-horizontal",
|
|
||||||
"panes": [{
|
|
||||||
"shell_command": [ "cd ~/code/cornish-glen", "yarn dev" ]
|
|
||||||
}, {
|
|
||||||
"shell_command": [ "sleep 4", "yarn relay --watch" ]
|
|
||||||
}, {
|
|
||||||
"shell_command": [ "sleep 4", "yarn start" ]
|
|
||||||
}]
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
let b:ale_linters = {'javascript': ['eslint']}
|
|
98
a/vim/.vimrc
98
a/vim/.vimrc
|
@ -1,98 +0,0 @@
|
||||||
" Make backspace behave in a sane manner.
|
|
||||||
set backspace=indent,eol,start
|
|
||||||
|
|
||||||
" Tab indentation: see `:help tabstop`
|
|
||||||
set shiftwidth=2
|
|
||||||
set tabstop=2
|
|
||||||
" set softtabstop=2
|
|
||||||
set expandtab
|
|
||||||
" Consider installing the Smart Tabs plugin
|
|
||||||
|
|
||||||
" Default: split right
|
|
||||||
set splitright
|
|
||||||
|
|
||||||
" Show whitespace
|
|
||||||
set listchars=eol:¬,tab:>-,trail:~,extends:>,precedes:<,space:·
|
|
||||||
|
|
||||||
" Show line numbers
|
|
||||||
set number
|
|
||||||
set relativenumber
|
|
||||||
|
|
||||||
" Allow hidden buffers, don't limit to one file per window/split
|
|
||||||
set hidden
|
|
||||||
|
|
||||||
" Sane vim split naviagation (via Gaslight blog)
|
|
||||||
nnoremap <c-j> <c-w>j
|
|
||||||
nnoremap <c-k> <c-w>k
|
|
||||||
nnoremap <c-h> <c-w>h
|
|
||||||
nnoremap <c-l> <c-w>l
|
|
||||||
|
|
||||||
" Disable filetype detection
|
|
||||||
filetype off
|
|
||||||
|
|
||||||
" vim-plug
|
|
||||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
|
||||||
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
|
||||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
||||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
|
||||||
endif
|
|
||||||
call plug#begin('~/.vim/plugged')
|
|
||||||
Plug 'vim-airline/vim-airline'
|
|
||||||
Plug 'vim-airline/vim-airline-themes'
|
|
||||||
Plug 'edkolev/tmuxline.vim'
|
|
||||||
Plug 'christoomey/vim-tmux-navigator'
|
|
||||||
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
|
||||||
Plug '/usr/local/opt/fzf'
|
|
||||||
Plug 'junegunn/fzf.vim'
|
|
||||||
Plug 'dense-analysis/ale'
|
|
||||||
Plug 'Valloric/YouCompleteMe'
|
|
||||||
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
|
|
||||||
Plug 'pangloss/vim-javascript'
|
|
||||||
Plug 'MaxMEllon/vim-jsx-pretty'
|
|
||||||
Plug 'leafgarland/typescript-vim'
|
|
||||||
Plug 'HerringtonDarkholme/yats.vim'
|
|
||||||
Plug 'Quramy/tsuquyomi'
|
|
||||||
Plug 'severij/vadelma'
|
|
||||||
Plug 'tpope/vim-surround'
|
|
||||||
Plug 'rust-lang/rust.vim'
|
|
||||||
call plug#end()
|
|
||||||
|
|
||||||
" NERDTree on ctrl+n
|
|
||||||
let NERDTreeShowHidden=1
|
|
||||||
map <silent> <C-n> :NERDTreeToggle<CR>
|
|
||||||
|
|
||||||
" close NERDTree after opening a file
|
|
||||||
" let g:NERDTreeQuitOnOpen=1
|
|
||||||
|
|
||||||
" Tsuquyomi
|
|
||||||
autocmd FileType typescript nmap <buffer> <Leader>t : <C-u>echo tsuquyomi#hint()<CR>
|
|
||||||
|
|
||||||
" Airline
|
|
||||||
let g:airline_powerline_fonts = 1
|
|
||||||
let g:airline_theme = 'light'
|
|
||||||
let g:airline#extensions#tmuxline#enabled = 0
|
|
||||||
|
|
||||||
" Tmuxline
|
|
||||||
let g:tmuxline_theme = 'iceberg'
|
|
||||||
|
|
||||||
" YouCompleteMe <> TypeScript
|
|
||||||
if !exists("g:ycm_semantic_triggers")
|
|
||||||
let g:ycm_semantic_triggers = {}
|
|
||||||
endif
|
|
||||||
let g:ycm_semantic_triggers['typescript'] = ['.']
|
|
||||||
|
|
||||||
" Enable file type detection and do language-dependent indenting
|
|
||||||
filetype plugin indent on
|
|
||||||
|
|
||||||
" Switch syntax highlighting on
|
|
||||||
syntax enable
|
|
||||||
|
|
||||||
" Set color scheme
|
|
||||||
set background=light
|
|
||||||
colorscheme vadelma
|
|
||||||
|
|
||||||
" Temporary file locations
|
|
||||||
set backupdir=.backup/,~/.backup/,/tmp//
|
|
||||||
set directory=.swp/,~/.swp/,/tmp//
|
|
||||||
set undodir=.undo/,~/.undo/,/tmp//
|
|
||||||
|
|
153
a/zsh/.zshrc
153
a/zsh/.zshrc
|
@ -1,153 +0,0 @@
|
||||||
# Path to your oh-my-zsh installation.
|
|
||||||
export ZSH=$HOME/.oh-my-zsh
|
|
||||||
|
|
||||||
# Set name of the theme to load.
|
|
||||||
# Look in ~/.oh-my-zsh/themes/
|
|
||||||
# Optionally, if you set this to "random", it'll load a random theme each
|
|
||||||
# time that oh-my-zsh is loaded.
|
|
||||||
ZSH_THEME=""
|
|
||||||
|
|
||||||
# Suppress display of name of default user in prompt
|
|
||||||
DEFAULT_USER=$USER
|
|
||||||
prompt_context() {}
|
|
||||||
|
|
||||||
# Uncomment the following line to use case-sensitive completion.
|
|
||||||
# CASE_SENSITIVE="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
|
||||||
# DISABLE_AUTO_UPDATE="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to change how often to auto-update (in days).
|
|
||||||
# export UPDATE_ZSH_DAYS=13
|
|
||||||
|
|
||||||
# Uncomment the following line to disable colors in ls.
|
|
||||||
# DISABLE_LS_COLORS="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to disable auto-setting terminal title.
|
|
||||||
export DISABLE_AUTO_TITLE="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to enable command auto-correction.
|
|
||||||
# ENABLE_CORRECTION="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
|
||||||
# COMPLETION_WAITING_DOTS="true"
|
|
||||||
|
|
||||||
# Uncomment the following line if you want to disable marking untracked files
|
|
||||||
# under VCS as dirty. This makes repository status check for large repositories
|
|
||||||
# much, much faster.
|
|
||||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
|
||||||
|
|
||||||
# Uncomment the following line if you want to change the command execution time
|
|
||||||
# stamp shown in the history command output.
|
|
||||||
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
|
||||||
HIST_STAMPS="yyyy-mm-dd"
|
|
||||||
|
|
||||||
# Would you like to use another custom folder than $ZSH/custom?
|
|
||||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
|
||||||
|
|
||||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
|
||||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
|
||||||
# Add wisely, as too many plugins slow down shell startup.
|
|
||||||
plugins=(git nvm vi-mode)
|
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
|
||||||
|
|
||||||
# User configuration
|
|
||||||
|
|
||||||
export PATH="/Users/adamcooper/Library/Python/3.7/bin:/Users/adamcooper/.cargo/bin:$(brew --prefix coreutils)/libexec/gnubin:/opt/local/bin:/opt/local/sbin:/usr/local/sbin:$PATH"
|
|
||||||
|
|
||||||
# export MANPATH="/usr/local/man:$MANPATH"
|
|
||||||
|
|
||||||
# You may need to manually set your language environment
|
|
||||||
# export LANG=en_US.UTF-8
|
|
||||||
|
|
||||||
# Preferred editor for local and remote sessions
|
|
||||||
# if [[ -n $SSH_CONNECTION ]]; then
|
|
||||||
# export EDITOR='vim'
|
|
||||||
# else
|
|
||||||
# export EDITOR='mvim'
|
|
||||||
# fi
|
|
||||||
export VISUAL=vim
|
|
||||||
export EDITOR=$VISUAL
|
|
||||||
|
|
||||||
export BROWSER=w3m
|
|
||||||
|
|
||||||
# Compilation flags
|
|
||||||
# export ARCHFLAGS="-arch x86_64"
|
|
||||||
|
|
||||||
# ssh
|
|
||||||
# export SSH_KEY_PATH="~/.ssh/dsa_id"
|
|
||||||
|
|
||||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
|
||||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
|
||||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
|
||||||
# For a full list of active aliases, run `alias`.
|
|
||||||
#
|
|
||||||
# Example aliases
|
|
||||||
# alias zshconfig="mate ~/.zshrc"
|
|
||||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
|
||||||
|
|
||||||
# Replace native OS X ctags with Homebrew ctags
|
|
||||||
alias ctags=`brew --prefix`/bin/ctags
|
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
|
||||||
|
|
||||||
[ -z "$PS1" ] && return
|
|
||||||
|
|
||||||
# Why are these not exports?
|
|
||||||
# enable git unstaged indicators - set to a non-empty value
|
|
||||||
GIT_PS1_SHOWDIRTYSTATE="."
|
|
||||||
|
|
||||||
# enable showing of untracked files - set to a non-empty value
|
|
||||||
GIT_PS1_SHOWUNTRACKEDFILES="."
|
|
||||||
|
|
||||||
# enable stash checking - set to a non-empty value
|
|
||||||
GIT_PS1_SHOWSTASHSTATE="."
|
|
||||||
|
|
||||||
# enable showing of HEAD vs its upstream
|
|
||||||
GIT_PS1_SHOWUPSTREAM="auto"
|
|
||||||
|
|
||||||
BLACK=$(tput setaf 0)
|
|
||||||
RED=$(tput setaf 1)
|
|
||||||
GREEN=$(tput setaf 2)
|
|
||||||
YELLOW=$(tput setaf 3)
|
|
||||||
LIME_YELLOW=$(tput setaf 190)
|
|
||||||
POWDER_BLUE=$(tput setaf 153)
|
|
||||||
BLUE=$(tput setaf 4)
|
|
||||||
MAGENTA=$(tput setaf 5)
|
|
||||||
CYAN=$(tput setaf 6)
|
|
||||||
WHITE=$(tput setaf 7)
|
|
||||||
BRIGHT=$(tput bold)
|
|
||||||
NORMAL=$(tput sgr0)
|
|
||||||
BLINK=$(tput blink)
|
|
||||||
REVERSE=$(tput smso)
|
|
||||||
UNDERLINE=$(tput smul)
|
|
||||||
|
|
||||||
## NVM ##
|
|
||||||
# Functionality now handled by Oh My Zsh plugin
|
|
||||||
# export NVM_DIR="$HOME/.nvm"
|
|
||||||
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
|
||||||
# [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
|
||||||
|
|
||||||
# Starship
|
|
||||||
eval "$(starship init zsh)"
|
|
||||||
|
|
||||||
## FZF ##
|
|
||||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
|
||||||
export FZF_DEFAULT_COMMAND="fd --hidden . $HOME" # Includes hidden files
|
|
||||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
|
||||||
export FZF_ALT_C_COMMAND="fd -t d . $HOME"
|
|
||||||
|
|
||||||
# Tmuxp completion #
|
|
||||||
eval "$(_TMUXP_COMPLETE=source_zsh tmuxp)"
|
|
||||||
|
|
||||||
# ddgr colors
|
|
||||||
export DDGR_COLORS="MBdexy"
|
|
||||||
|
|
||||||
# exa colors
|
|
||||||
export LS_COLORS="*.md=30"
|
|
||||||
export EXA_COLORS="uu=33;43;1"
|
|
||||||
|
|
||||||
# Consolidate PATH
|
|
||||||
export PATH="$(consolidate-path "$PATH")"
|
|
22
m/TODO.md
22
m/TODO.md
|
@ -1,22 +0,0 @@
|
||||||
- FIXED The both method of installing fzf has left me without the `:Files` func-
|
|
||||||
tionality.
|
|
||||||
- FIXED diff-so-fancy
|
|
||||||
- FIXED What's really not working is nvm. If you install it with bash, zsh can't see
|
|
||||||
it.
|
|
||||||
- add source $HOME/.cargo/env - does this persist or must I add it to .zshrc?
|
|
||||||
- chsh not working?
|
|
||||||
|
|
||||||
- N.B. .bashrc Linux, .bash_profile Mac
|
|
||||||
- FIXED After the install script runs, the user needs to install the vim plugins by
|
|
||||||
opening vim and running :PlugInstall - how do you get the pid of the latest
|
|
||||||
process or a particular process?
|
|
||||||
- FIXED tmux powerline doesn't work out of the box
|
|
||||||
- FIXED? nvm - not working right? Time to add the filigree!
|
|
||||||
- FIXED Maybe we need a post-install script for nvm install lts/dubnium and nvm
|
|
||||||
use lts/dubnium, and then npm install -g typescript, and then exhort the user
|
|
||||||
to run vim and ycm.
|
|
||||||
- FIXED make aptitude install vim et al automatically accept without user input
|
|
||||||
- FIXED same with rust
|
|
||||||
- FIXED do existence tests before mv
|
|
||||||
|
|
||||||
- Make sure ssh is working now lol
|
|
|
@ -1,13 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Usage: PATH="$(consolidate-path "$PATH")"
|
|
||||||
#
|
|
||||||
# Remove duplicate entries from PATH.
|
|
||||||
|
|
||||||
result=":"
|
|
||||||
IFS=:
|
|
||||||
for p in $1; do
|
|
||||||
[[ "$result" == *:"$p":* ]] || result="${result}${p}:"
|
|
||||||
done
|
|
||||||
|
|
||||||
result="${result#:}"
|
|
||||||
echo "${result%:}"
|
|
|
@ -1,61 +0,0 @@
|
||||||
Cheat Sheets
|
|
||||||
============
|
|
||||||
|
|
||||||
> **NOTE**: This repo is best used by placing a bookmark in your address bar.
|
|
||||||
|
|
||||||
This is a collection of cheat sheets that I have compiled over the years that I
|
|
||||||
put together while learning various tools. They contain some good information
|
|
||||||
and a few gems that I have learned along the way. Feel free to contribute.
|
|
||||||
|
|
||||||
## Contents
|
|
||||||
|
|
||||||
- [Bash]
|
|
||||||
- [Git]
|
|
||||||
- [GnuPG]
|
|
||||||
- [irssi]
|
|
||||||
- [JIRA]
|
|
||||||
- [mutt]
|
|
||||||
- [nmap]
|
|
||||||
- [openssl]
|
|
||||||
- [tmux]
|
|
||||||
- [uml]
|
|
||||||
- [vim]
|
|
||||||
- [zsh]
|
|
||||||
- [other]
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img
|
|
||||||
alt="Creative Commons License" style="border-width:0"
|
|
||||||
src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br /><span
|
|
||||||
xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Cheat Sheets</span>
|
|
||||||
by <a xmlns:cc="http://creativecommons.org/ns#" href="http://joshuaestes.me"
|
|
||||||
property="cc:attributionName" rel="cc:attributionURL">Joshua Estes</a> is
|
|
||||||
licensed under a <a rel="license"
|
|
||||||
href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons
|
|
||||||
Attribution-ShareAlike 4.0 International License</a>. Based on a work at <a
|
|
||||||
xmlns:dct="http://purl.org/dc/terms/"
|
|
||||||
href="https://github.com/JoshuaEstes/CheatSheets"
|
|
||||||
rel="dct:source">https://github.com/JoshuaEstes/CheatSheets</a>.
|
|
||||||
Permissions beyond the scope of this license may be available at <a
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
href="https://github.com/JoshuaEstes/CheatSheets/blob/master/LICENSE"
|
|
||||||
rel="cc:morePermissions">https://github.com/JoshuaEstes/CheatSheets/blob/master/LICENSE</a>.
|
|
||||||
|
|
||||||
See [LICENSE] for full license.
|
|
||||||
|
|
||||||
|
|
||||||
[Bash]: https://github.com/JoshuaEstes/CheatSheets/blob/master/bash.md
|
|
||||||
[Git]: https://github.com/JoshuaEstes/CheatSheets/blob/master/git.md
|
|
||||||
[GnuPG]: https://github.com/JoshuaEstes/CheatSheets/blob/master/gnupg.md
|
|
||||||
[irssi]: https://github.com/JoshuaEstes/CheatSheets/blob/master/irssi.md
|
|
||||||
[JIRA]: https://github.com/JoshuaEstes/CheatSheets/blob/master/jira.md
|
|
||||||
[mutt]: https://github.com/JoshuaEstes/CheatSheets/blob/master/mutt.md
|
|
||||||
[nmap]: https://github.com/JoshuaEstes/CheatSheets/blob/master/nmap.md
|
|
||||||
[openssl]: https://github.com/JoshuaEstes/CheatSheets/blob/master/openssl.md
|
|
||||||
[tmux]: https://github.com/JoshuaEstes/CheatSheets/blob/master/tmux.md
|
|
||||||
[uml]: https://github.com/JoshuaEstes/CheatSheets/blob/master/uml.md
|
|
||||||
[vim]: https://github.com/JoshuaEstes/CheatSheets/blob/master/vim.md
|
|
||||||
[zsh]: https://github.com/JoshuaEstes/CheatSheets/blob/master/zsh.md
|
|
||||||
[other]: https://github.com/JoshuaEstes/CheatSheets/blob/master/other.md
|
|
||||||
[LICENSE]: https://github.com/JoshuaEstes/CheatSheets/blob/master/LICENSE
|
|
|
@ -1,75 +0,0 @@
|
||||||
Bash Cheat Sheet
|
|
||||||
================
|
|
||||||
|
|
||||||
## Moving
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|----------|--------------------------------|
|
|
||||||
| ctrl + a | Goto BEGINNING of command line |
|
|
||||||
| ctrl + e | Goto END of command line |
|
|
||||||
| ctrl + b | move back one character |
|
|
||||||
| ctrl + f | move forward one character |
|
|
||||||
| alt + f | move cursor FORWARD one word |
|
|
||||||
| alt + b | move cursor BACK one word |
|
|
||||||
|
|
||||||
## Other
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|----------|--------------------------------|
|
|
||||||
| ctrl + d | Delete the character under the cursor |
|
|
||||||
| ctrl + l | Clear the screen (same as clear command) |
|
|
||||||
| ctrl + p | Fetch the previous command from the history list, moving back in the list (same as up arrow) |
|
|
||||||
| ctrl + n | Fetch the next command from the history list, moving forward in the list (same as down arrow) |
|
|
||||||
| ctrl + u | Clear all BEFORE cursor |
|
|
||||||
| ctrl + k | Clear all AFTER cursor |
|
|
||||||
| ctrl + r | Search backward starting at the current line and moving 'up' through the history as necessary |
|
|
||||||
| crtl + s | Search forward starting at the current line and moving 'down' through the history as necessary |
|
|
||||||
| ctrl + c | kill whatever is running |
|
|
||||||
| ctrl + d | Exit shell (same as exit command) |
|
|
||||||
| ctrl + w | delete the word BEFORE the cursor |
|
|
||||||
| ctrl + t | swap the last two characters before the cursor |
|
|
||||||
| ctrl + y | paste (if you used a previous command to delete) |
|
|
||||||
| ctrl + z | Place current process in background |
|
|
||||||
| ctrl + _ | undo |
|
|
||||||
| esc + t | Swap last two words before the cursor |
|
|
||||||
| esc + . | |
|
|
||||||
| esc + _ | |
|
|
||||||
| alt + [Backspace] | delete PREVIOUS word |
|
|
||||||
| alt + < | Move to the first line in the history |
|
|
||||||
| alt + > | Move to the end of the input history, i.e., the line currently being entered |
|
|
||||||
| alt + ? | |
|
|
||||||
| alt + * | |
|
|
||||||
| alt + . | print the LAST ARGUMENT (ie "vim file1.txt file2.txt" will yield "file2.txt") |
|
|
||||||
| alt + c | |
|
|
||||||
| alt + d | |
|
|
||||||
| alt + l | |
|
|
||||||
| alt + n | |
|
|
||||||
| alt + p | |
|
|
||||||
| alt + r | |
|
|
||||||
| alt + t | |
|
|
||||||
| alt + u | |
|
|
||||||
| ~[TAB][TAB] | List all users |
|
|
||||||
| $[TAB][TAB] | List all system variables |
|
|
||||||
| @[TAB][TAB] | List all entries in your /etc/hosts file |
|
|
||||||
| [TAB] | Auto complete |
|
|
||||||
| !! | Run PREVIOUS command (ie `sudo !!`) |
|
|
||||||
| !vi | Run PREVIOUS command that BEGINS with vi |
|
|
||||||
| cd - | change to PREVIOUS working directory |
|
|
||||||
|
|
||||||
# Kill a job
|
|
||||||
|
|
||||||
n = job number, to list jobs, run `jobs`
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kill %n
|
|
||||||
```
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kill %1
|
|
||||||
```
|
|
||||||
|
|
||||||
## References
|
|
||||||
|
|
||||||
1. http://cnswww.cns.cwru.edu/php/chet/readline/readline.html
|
|
|
@ -1,8 +0,0 @@
|
||||||
Disable/enable System Integrity Protection
|
|
||||||
|
|
||||||
* Restart the computer
|
|
||||||
* Hold down `Command-R` to reboot into Recovery Mode
|
|
||||||
* Click `Utilities`
|
|
||||||
* Select `Terminal`
|
|
||||||
* Enter `csrutil [ disable | enable ]`
|
|
||||||
* Restart the computer into Standard Mode
|
|
|
@ -1,9 +0,0 @@
|
||||||
cURL Cheat Sheet
|
|
||||||
================
|
|
||||||
|
|
||||||
## Basics
|
|
||||||
### Get request
|
|
||||||
|
|
||||||
```bash
|
|
||||||
curl https://domain.com
|
|
||||||
```
|
|
|
@ -1,5 +0,0 @@
|
||||||
# defaults
|
|
||||||
|
|
||||||
Change the default location of screenshots:
|
|
||||||
|
|
||||||
defaults write com.apple.screencapture location <directory> && killall SystemUIServer
|
|
|
@ -1,152 +0,0 @@
|
||||||
Git Cheat Sheet
|
|
||||||
===============
|
|
||||||
|
|
||||||
## Subtree Example
|
|
||||||
|
|
||||||
### Add sub-project as remote
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git remote add -f RemoteName RemoteUrl
|
|
||||||
```
|
|
||||||
|
|
||||||
### Run `git subtree` command
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git subtree add --prefix Path/To/Put/Code NameOfRemote master --squash
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Pull subtree as needed
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git fetch NameOfRemote master
|
|
||||||
git subtree pull --prefix Path/To/Put/Code NameOfRemote master --squash
|
|
||||||
```
|
|
||||||
|
|
||||||
### Reference
|
|
||||||
|
|
||||||
* http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree
|
|
||||||
|
|
||||||
## Create a branch without a parent
|
|
||||||
|
|
||||||
Very useful when you are updating a project that you are rewriting. For example,
|
|
||||||
say you are using semantic versioning and are wanting to start a new major
|
|
||||||
version.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git checkout --orphan BRANCH
|
|
||||||
```
|
|
||||||
|
|
||||||
## Delete All Branches that have been merged
|
|
||||||
|
|
||||||
Great for cleaning up local branches that aren't being used any more.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git checkout master
|
|
||||||
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
|
|
||||||
```
|
|
||||||
|
|
||||||
## Ignore changes to a file that is being tracked
|
|
||||||
|
|
||||||
### Ignore
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git update-index --assume-unchanged [directory|file]
|
|
||||||
```
|
|
||||||
|
|
||||||
### Unignore
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git update-index --no-assume-unchanged [directory|file]
|
|
||||||
```
|
|
||||||
|
|
||||||
## How to ignore dirty submodules
|
|
||||||
|
|
||||||
Edit your ``.git/config`` and add ``ignore = dirty``.
|
|
||||||
|
|
||||||
```text
|
|
||||||
[submodule "path/to/submodule"]
|
|
||||||
path = path/to/submodule
|
|
||||||
url = git://github.com/username/repo.git
|
|
||||||
ignore = dirty
|
|
||||||
```
|
|
||||||
|
|
||||||
## Clone a repo and give name other than origin
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone -o upstream https://repo.git
|
|
||||||
```
|
|
||||||
|
|
||||||
## Ignore Files for Repository without using `.gitignore`
|
|
||||||
|
|
||||||
Add the file `.git/info/exclude` and fill it with the contents you want to ignore. This will ONLY apply to the
|
|
||||||
repository and will not be tracked by git.
|
|
||||||
|
|
||||||
## Squash Commits
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git log
|
|
||||||
```
|
|
||||||
|
|
||||||
Count the number of commits that you have made, let's say the previous 5 are your commits.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git rebase -i HEAD~5
|
|
||||||
```
|
|
||||||
|
|
||||||
The first commit leave as `pick` the rest will need to be changed to `squash`. After that you will be able to
|
|
||||||
leave a new commit message or just leave as is to keep the commit messages from all previous commits.
|
|
||||||
|
|
||||||
## Search for a specific line of code/file in the history
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git log -S[search term]
|
|
||||||
```
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git log -SThatOneFile.php
|
|
||||||
```
|
|
||||||
|
|
||||||
## Copy file from one branch to current branch
|
|
||||||
|
|
||||||
Copy a file from `branch` and put into staging.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git checkout BRANCH path/to/file.ext
|
|
||||||
|
|
||||||
# Real Life Examples
|
|
||||||
git checkout origin/featureBranch web/js/random.js
|
|
||||||
# Pulls into your current branch web/js/random.js from
|
|
||||||
# origin/featureBranch
|
|
||||||
```
|
|
||||||
|
|
||||||
## Git Grepping for fun and profit!
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# Basic grep (case sensitive)
|
|
||||||
$ git grep 'search term'
|
|
||||||
|
|
||||||
# Case Insensitive search
|
|
||||||
$ git grep -i 'search term'
|
|
||||||
|
|
||||||
# Search within a directory
|
|
||||||
$ git grep 'search term' src/
|
|
||||||
|
|
||||||
# Search only files with `php` extension
|
|
||||||
$ git grep 'search term' -- '*.php'
|
|
||||||
|
|
||||||
# Grep in the 'src/` directory, only yml files
|
|
||||||
$ git grep 'search term' -- 'src/**.yml'
|
|
||||||
```
|
|
||||||
|
|
||||||
## Push Branch to Remote Repository to a different branch name
|
|
||||||
|
|
||||||
```shell
|
|
||||||
git push origin localBranchName:remoteBranchName
|
|
||||||
```
|
|
||||||
|
|
||||||
Use Case: I will often use rebase, I will cut a branch off the branch I want to rebase and
|
|
||||||
do the rebase on the newly created branch. Once I am done, I will check the diff and see if
|
|
||||||
I screwed up. If it's all good, `git push -f` **NOTICE**: DO NOT `git push -f` unless you know
|
|
||||||
what you are doing.
|
|
|
@ -1,64 +0,0 @@
|
||||||
GnuPG Cheat Sheet
|
|
||||||
=================
|
|
||||||
|
|
||||||
## Listing Key Pairs
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gpg --list-keys
|
|
||||||
```
|
|
||||||
|
|
||||||
For listing keys with the fingerprint, run
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gpg --fingerprint
|
|
||||||
```
|
|
||||||
|
|
||||||
## Generate New Key Pair
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gpg --gen-key
|
|
||||||
```
|
|
||||||
|
|
||||||
## Encrypt a message on command line
|
|
||||||
|
|
||||||
```bash
|
|
||||||
echo "Put message here" | gpg --armor --encrypt --recipient Joshua > FILE.gpg
|
|
||||||
```
|
|
||||||
|
|
||||||
This will put the encrypted text into `FILE.gpg` which you can send to someone or keep for
|
|
||||||
later use. For decrypting the message, see the next section.
|
|
||||||
|
|
||||||
## Decrypt a message from the command line
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cat FILE.gpg | gpg
|
|
||||||
```
|
|
||||||
|
|
||||||
Displays the decrypted text on the command line.
|
|
||||||
|
|
||||||
## Only display user X's key information
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gpg --fingerprint Joshua
|
|
||||||
```
|
|
||||||
|
|
||||||
## Signing Messages
|
|
||||||
|
|
||||||
```bash
|
|
||||||
echo "This is a top secret message" | gpg --clearsign
|
|
||||||
```
|
|
||||||
|
|
||||||
## Signing Text Files
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gpg --clearsign example.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
This will create `example.txt.asc` file.
|
|
||||||
|
|
||||||
## Verify Signatures
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gpg --verifiy example.txt.asc
|
|
||||||
```
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
Grep
|
|
||||||
====
|
|
||||||
|
|
||||||
## Ignore case
|
|
||||||
|
|
||||||
```shell
|
|
||||||
grep -i pattern
|
|
||||||
```
|
|
|
@ -1,11 +0,0 @@
|
||||||
Irssi Cheat Sheet
|
|
||||||
=================
|
|
||||||
|
|
||||||
M = Meta Key, meta key is either the left alt or esc key.
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|----------|-------------|
|
|
||||||
| M + p | Scroll up in window
|
|
||||||
| M + n | Scroll down in window
|
|
||||||
| ctrl + p | Previous window
|
|
||||||
| ctrl + n | Next window
|
|
|
@ -1,8 +0,0 @@
|
||||||
Jira Cheat Sheet
|
|
||||||
================
|
|
||||||
|
|
||||||
## Find by Mentions of current user within the past 7 days
|
|
||||||
|
|
||||||
```sql
|
|
||||||
comment ~ currentUser() AND updatedDate >= -7d
|
|
||||||
```
|
|
|
@ -1,39 +0,0 @@
|
||||||
# ln
|
|
||||||
|
|
||||||
make a symlink to `foo.txt`
|
|
||||||
|
|
||||||
ln -s foo.txt link-to-foo.txt
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Basic Usage
|
|
||||||
|
|
||||||
Make anchor a link to target:
|
|
||||||
|
|
||||||
ln -s <target> <anchor>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Symbolic Links (symlinks)
|
|
||||||
|
|
||||||
Make it symbolic with the `-s` flag:
|
|
||||||
|
|
||||||
$ ln -s foo.txt link-to-foo.txt
|
|
||||||
$ ls -lF
|
|
||||||
total 8
|
|
||||||
-rw-r--r-- 1 tyrion group 0 Feb 3 14:13 foo.txt
|
|
||||||
lrwxr-xr-x 1 tyrion group 7 Feb 3 14:14 link-to-foo.txt@ -> foo.txt
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Hard Links
|
|
||||||
|
|
||||||
Omit the `-s` flag:
|
|
||||||
|
|
||||||
$ ln foo.txt hard-link-to-foo.txt
|
|
||||||
$ ls -lF
|
|
||||||
total 0
|
|
||||||
-rw-r--r-- 2 tyrion group 0B Feb 3 14:13 foo.txt
|
|
||||||
-rw-r--r-- 2 tyrion group 0B Feb 3 14:13 hard-link-to-foo.txt
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
# lsof
|
|
||||||
|
|
||||||
Examine the process using a specified `port`:
|
|
||||||
|
|
||||||
lsof -i:3000 | grep LISTEN
|
|
|
@ -1,226 +0,0 @@
|
||||||
Mutt Cheat Sheet
|
|
||||||
================
|
|
||||||
|
|
||||||
## General
|
|
||||||
|
|
||||||
These key bindings will work on almost any menu you are in.
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|------------|-------------|
|
|
||||||
| * | Move to last entry
|
|
||||||
| = | Move to first entry
|
|
||||||
| : | Enter muttrc command
|
|
||||||
| > | Scroll down one line
|
|
||||||
| < | Scroll up one line
|
|
||||||
| [ | Scroll up half a page
|
|
||||||
| ] | Scroll down half a page
|
|
||||||
| ? | Help
|
|
||||||
| ; | Apply next function to tagged messages only
|
|
||||||
| ! | Invoke command in subshell
|
|
||||||
| return | Select the current entry
|
|
||||||
| esc + / | Search up
|
|
||||||
| / | Search down
|
|
||||||
| H | Move to top of page
|
|
||||||
| j | Move to next entry
|
|
||||||
| k | Move to previous entry
|
|
||||||
| ctrl + l | Redraw screen
|
|
||||||
| L | Move to bottom of page
|
|
||||||
| M | Move to middle of page
|
|
||||||
| n | Move to next match of search
|
|
||||||
| q | Exit menu
|
|
||||||
| t | Tag current entry
|
|
||||||
| z | Move to next page
|
|
||||||
| Z | Move to previous page
|
|
||||||
|
|
||||||
## Index Menu
|
|
||||||
|
|
||||||
When you first open mutt you are in the index menu.
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|---------------|-------------|
|
|
||||||
| & | Link tagged message to current one
|
|
||||||
| # | Break the thread in two
|
|
||||||
| % | Toggle whether mailbox will be rewritten
|
|
||||||
| . | List mailboxes with new mail
|
|
||||||
| $ | Save changes to mailbox
|
|
||||||
| @ | Display full address of sender
|
|
||||||
| | | Pipe message to a shell command
|
|
||||||
| esc + tab | Jump to previous new or unread message
|
|
||||||
| return | Display message
|
|
||||||
| tab | Jump to next new or unread message
|
|
||||||
| a | Create alias from message sender
|
|
||||||
| b | Remail message to another user
|
|
||||||
| esc + c | Open a different folder (Read Only)
|
|
||||||
| c | Open a different folder
|
|
||||||
| esc + C | Make text/plain copy
|
|
||||||
| C | Copy message to another file/mailbox
|
|
||||||
| esc + d | Delete all messages in subthread
|
|
||||||
| d | Delete current message
|
|
||||||
| ctrl + D | Delete all messages in thread
|
|
||||||
| D | Delete messages matching a pattern
|
|
||||||
| esc + e | Use the current message as a template for a new one
|
|
||||||
| e | Edit the raw message
|
|
||||||
| ctrl + E | Edit attachment content type
|
|
||||||
| f | Forward message with comments
|
|
||||||
| ctrl + F | Wipe passphrase from memory
|
|
||||||
| F | Toggle the important flag for message
|
|
||||||
| g | Reply to all
|
|
||||||
| G | Retrive mail from POP server
|
|
||||||
| h | Display message and toggle header weeding
|
|
||||||
| j | Move to next undeleted message
|
|
||||||
| esc + k | Mail a PGP key
|
|
||||||
| k | Move to previous undeleted message
|
|
||||||
| ctrl + K | Extract supported public keys
|
|
||||||
| esc + l | Show current limit pattern
|
|
||||||
| l | Only show messages matching a pattern
|
|
||||||
| L | Reply to specific mailing list
|
|
||||||
| m | Compose new message
|
|
||||||
| esc + n | Jump to next subthread
|
|
||||||
| ctrl + N | Jump to next thread
|
|
||||||
| N | Toggle new flag
|
|
||||||
| o | Sort messages
|
|
||||||
| O | Sort messages in reverse order
|
|
||||||
| Q | Query external program for addresses
|
|
||||||
| q | Save changes to mailbox and quit
|
|
||||||
| r | Reply to message
|
|
||||||
| ctrl + P | Jump to previous thread
|
|
||||||
| esc + p | Jump to previous subthread
|
|
||||||
| p | Print current message
|
|
||||||
| esc + P | Check for classic PGP
|
|
||||||
| P | Jump to parent message in thread
|
|
||||||
| ctrl + R | Mark current thread as read
|
|
||||||
| R | Recall a postponed message
|
|
||||||
| esc + r | Mark current subthread as read
|
|
||||||
| esc + s | Save text/plain copy and delete
|
|
||||||
| s | Save message/attachment to mailbox/file
|
|
||||||
| esc + t | Tag current thread
|
|
||||||
| ctrl + T | Untag messages matching a pattern
|
|
||||||
| T | Tag messages matching pattern
|
|
||||||
| esc + u | Undelete all messages in subthread
|
|
||||||
| u | Undelete current entry
|
|
||||||
| ctrl + U | Undelete all messages in thread
|
|
||||||
| U | Undelete messages matching pattern
|
|
||||||
| esc + v | Collapse/uncollapse current thread
|
|
||||||
| v | Show mime attachments
|
|
||||||
| esc + V | Collapse/uncollapse all threads
|
|
||||||
| V | Show mutt version number and date
|
|
||||||
| w | Set a status flag
|
|
||||||
| W | Clear status flags from message
|
|
||||||
|
|
||||||
## Pager Menu
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|---------|-------------|
|
|
||||||
| # | |
|
|
||||||
| a | |
|
|
||||||
| b | |
|
|
||||||
| c | |
|
|
||||||
| esc + c | |
|
|
||||||
| C | |
|
|
||||||
| esc + C | |
|
|
||||||
| d | |
|
|
||||||
| ctrl + D | |
|
|
||||||
| esc + d | |
|
|
||||||
| w | |
|
|
||||||
| W | |
|
|
||||||
| e | |
|
|
||||||
| ctrl + E | |
|
|
||||||
| f | |
|
|
||||||
| F | |
|
|
||||||
| g | |
|
|
||||||
| h | |
|
|
||||||
| j | |
|
|
||||||
| J | |
|
|
||||||
| k | |
|
|
||||||
| K | |
|
|
||||||
| & | |
|
|
||||||
| L | |
|
|
||||||
| ctrl + L | |
|
|
||||||
| m | |
|
|
||||||
| n | |
|
|
||||||
| N | |
|
|
||||||
| ctrl + N | |
|
|
||||||
| esc + n | |
|
|
||||||
| o | |
|
|
||||||
| O | |
|
|
||||||
| p | |
|
|
||||||
| ctrl + P | |
|
|
||||||
| esc + p | |
|
|
||||||
| Q | |
|
|
||||||
| q | |
|
|
||||||
| r | |
|
|
||||||
| R | |
|
|
||||||
| ctrl + R | |
|
|
||||||
| esc + r | |
|
|
||||||
| esc + e | |
|
|
||||||
| s | |
|
|
||||||
| S | |
|
|
||||||
| esc + s | |
|
|
||||||
| t | |
|
|
||||||
| T | |
|
|
||||||
| u | |
|
|
||||||
| esc + u | |
|
|
||||||
| ctrl + U | |
|
|
||||||
| v | |
|
|
||||||
| V | |
|
|
||||||
| \\ | |
|
|
||||||
| @ | |
|
|
||||||
| | | |
|
|
||||||
| ? | |
|
|
||||||
| space | |
|
|
||||||
| - | |
|
|
||||||
| ^ | |
|
|
||||||
| $ | |
|
|
||||||
| ! | |
|
|
||||||
| : | |
|
|
||||||
| . | |
|
|
||||||
| / | |
|
|
||||||
| esc + / | |
|
|
||||||
| return | |
|
|
||||||
| P | |
|
|
||||||
| esc + P | |
|
|
||||||
| esc + k | |
|
|
||||||
| ctrl + K | |
|
|
||||||
| ctrl + F | |
|
|
||||||
|
|
||||||
## Useful key remaps
|
|
||||||
|
|
||||||
These need to be placed in your `muttrc` file. I use vim and so I want to use some of the
|
|
||||||
same commands to manage my mail.
|
|
||||||
|
|
||||||
```muttrc
|
|
||||||
# Does not replace and currently mapped keys and acts like the vim command gg and takes
|
|
||||||
# you to the top of the page
|
|
||||||
bind index gg first-entry
|
|
||||||
|
|
||||||
# Replaces the retrieval of mail from a POP server. This will take you to the bottom of
|
|
||||||
# the page, just like it does in vim
|
|
||||||
bind index G last-entry
|
|
||||||
```
|
|
||||||
|
|
||||||
## Flags
|
|
||||||
|
|
||||||
When viewing messages in the index menu, you will see various flags such as `N` which mean
|
|
||||||
the messages is new and `D` which means that the message is to be deleted. This is a short
|
|
||||||
list of those flags.
|
|
||||||
|
|
||||||
| flag | description |
|
|
||||||
|------|-------------|
|
|
||||||
| ! | Message is flagged
|
|
||||||
| * | Message is tagged
|
|
||||||
| + | Message is To: you and only you
|
|
||||||
| C | Message is Cc: to you
|
|
||||||
| d | Message has attachments marked for deletion
|
|
||||||
| D | Marked for deletion
|
|
||||||
| F | Message is From: you
|
|
||||||
| K | Contains PGP key
|
|
||||||
| L | Message is sent to a subscribed mailing list
|
|
||||||
| n | Thread contains new messages (Only when thread is collapsed)
|
|
||||||
| N | Message is new
|
|
||||||
| o | Thread contains old messages (Only when thread is collapsed)
|
|
||||||
| O | Message is old
|
|
||||||
| P | Message is PGP encrypted
|
|
||||||
| r | Message has been replied to
|
|
||||||
| s | Message is signed
|
|
||||||
| S | Message is signed and verified
|
|
||||||
| T | Message is to you and has others in To: or Cc:
|
|
|
@ -1,8 +0,0 @@
|
||||||
Nmap Cheat Sheet
|
|
||||||
================
|
|
||||||
|
|
||||||
## Scan a Port
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nmap -p 80 google.com
|
|
||||||
```
|
|
|
@ -1,25 +0,0 @@
|
||||||
OpenSSL Cheat Sheet
|
|
||||||
===================
|
|
||||||
|
|
||||||
## Generate Self-Signed Certificate and Private Key
|
|
||||||
|
|
||||||
```shell
|
|
||||||
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048 && openssl rsa -passin pass:x -in server.pass.key -out server.key && openssl req -new -key server.key -out server.csr
|
|
||||||
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
|
|
||||||
```
|
|
||||||
|
|
||||||
- Use `server.crt` and `server.key`
|
|
||||||
|
|
||||||
### Encypt/Decrypt file
|
|
||||||
|
|
||||||
```
|
|
||||||
# Encrypt
|
|
||||||
openssl aes-128-cbc -a -e -pass pass:test -in vars -out vars.enc
|
|
||||||
# Puts encrypted data into vars.enc file
|
|
||||||
|
|
||||||
# Decrypt
|
|
||||||
openssl aes-128-cbc -a -d -pass pass:test -in vars.enc
|
|
||||||
# Outputs decrypted data to STDOUT
|
|
||||||
```
|
|
||||||
|
|
||||||
NOTE: See `openssl passpharse arguments` for information on using the password on the commandline. It can be changed to a file or an environment variable.
|
|
|
@ -1,28 +0,0 @@
|
||||||
Other Cheat Sheets
|
|
||||||
==================
|
|
||||||
|
|
||||||
## Using `less` instead of tail
|
|
||||||
|
|
||||||
```shell
|
|
||||||
less +F -R /path/to/logfile.log
|
|
||||||
```
|
|
||||||
|
|
||||||
* To scroll up and down, press `<ctrl>+c`
|
|
||||||
* Return to tail mode, press `F`
|
|
||||||
|
|
||||||
The `+F` says to follow? The `-R` will process any ANSII color codes.
|
|
||||||
|
|
||||||
## SSH Config File
|
|
||||||
|
|
||||||
```
|
|
||||||
# ~/.ssh/config
|
|
||||||
Host test
|
|
||||||
HostName testing.example.com
|
|
||||||
Port 22222
|
|
||||||
User joshua
|
|
||||||
IdentityFile ~/.ssh/test.example.com.key
|
|
||||||
```
|
|
||||||
|
|
||||||
Next, all you need to do to ssh into the server is `ssh test` and that's it.
|
|
||||||
|
|
||||||
> **NOTE** `HostName` may be an IP Address instead of a domain name
|
|
|
@ -1,10 +0,0 @@
|
||||||
# pdftk
|
|
||||||
|
|
||||||
join a bunch of pdfs
|
|
||||||
|
|
||||||
pdftk file01.pdf file02.pdf file03.pdf cat output combined_file.pdf
|
|
||||||
|
|
||||||
|
|
||||||
Add a password to a pdf
|
|
||||||
|
|
||||||
pdftk file.pdf output file_pw.pdf user_pw Passw0rd!
|
|
|
@ -1,6 +0,0 @@
|
||||||
# rename (concept, not command)
|
|
||||||
|
|
||||||
rename `index.jsx` to `index.tsx` one level down
|
|
||||||
|
|
||||||
for i in **/index.jsx; do mv -v $i ${i/jsx/tsx}; done
|
|
||||||
|
|
|
@ -1,111 +0,0 @@
|
||||||
# tar
|
|
||||||
|
|
||||||
extract .tar file
|
|
||||||
|
|
||||||
tar vfx archive.tar
|
|
||||||
|
|
||||||
|
|
||||||
unzip and extract .tar.gz or .tgz file
|
|
||||||
|
|
||||||
tar vfxz g_zipped_archive.tar.gz
|
|
||||||
|
|
||||||
|
|
||||||
turn directory into a .tar file
|
|
||||||
|
|
||||||
tar vfc tarred_directory.tar directory
|
|
||||||
|
|
||||||
|
|
||||||
turn directory into g-zipped directory
|
|
||||||
|
|
||||||
tar vfcz z_zipped_directory.tar.gz directory
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Basic Usage
|
|
||||||
|
|
||||||
`vf` means verbosely list files (`v`) and use a file (`f`), not `stdin`.
|
|
||||||
These appear in most commands.
|
|
||||||
|
|
||||||
Untar a file:
|
|
||||||
|
|
||||||
tar vfx <tar-file-to-extract>
|
|
||||||
|
|
||||||
|
|
||||||
Create a tar file from a directory:
|
|
||||||
|
|
||||||
tar vfc <name-of-tar-file> <directory-to-tar>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Remembering the Flags
|
|
||||||
|
|
||||||
`tar` is very finicky. Flags don't need to be prepended by a hyphen, but are
|
|
||||||
instead bundled into the first word on the command line. A leading hyphen will
|
|
||||||
break some implementations or require an order. For example, `tar vfx` might
|
|
||||||
work while with a hyphen it would require `tar -xvf`, with the `x` flag first.
|
|
||||||
You can get maximum portability is you never use the hyphens, so examples here
|
|
||||||
are shown without the hyphen.
|
|
||||||
|
|
||||||
You'll almost always want `vf`. `v` verbosely lists files as they are
|
|
||||||
manipulated, and `f` means you're reading from a file, not `stdin`. You can
|
|
||||||
remember `vf` if you remember that `tar` is Very Finicky: `vf`.
|
|
||||||
|
|
||||||
Extract things from a tar file with `x` for extraction. Compress things to a
|
|
||||||
tar file with `c` for compress.
|
|
||||||
|
|
||||||
And you'll have to just remember that g-zipping is `z` and b-zipping is `j`.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Tarring
|
|
||||||
|
|
||||||
Compress directory (`c`) into g-zipped (`z`) directory:
|
|
||||||
|
|
||||||
tar vfcz z_zipped_directory.tar.gz directory
|
|
||||||
|
|
||||||
|
|
||||||
Compress directory (`c`) into b-zipped (`j`) directory:
|
|
||||||
|
|
||||||
tar vfcj b_zipped_directory.tar.bz2 directory
|
|
||||||
|
|
||||||
|
|
||||||
Compress directory (`c`) into xz-zipped (`J`) directory:
|
|
||||||
|
|
||||||
tar vfcJ xz_zipped_directory.tar.xz directory
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Untarring
|
|
||||||
|
|
||||||
Untar (`x`) and unzip a g-zipped (`z`) file:
|
|
||||||
|
|
||||||
tar vfxz g_zipped_archive.tar.gz
|
|
||||||
|
|
||||||
|
|
||||||
Untar (`x`) and unzip a b-zipped (`j`) file:
|
|
||||||
|
|
||||||
tar vfxj b_zipped_archive.tar.bz2
|
|
||||||
|
|
||||||
|
|
||||||
Untar (`x`) and unzip an xz-zipped (`J`) file:
|
|
||||||
|
|
||||||
tar vfxJ xz_zipped_archive.tar.xz
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Partial Untarring
|
|
||||||
|
|
||||||
Extract only part of the contents (`directory/foo.txt`) from a .tar file:
|
|
||||||
|
|
||||||
tar vfx archived_directory.tar directory/foo.txt
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Display Contents
|
|
||||||
|
|
||||||
List (`t`) the contents of a tar file without untarring it:
|
|
||||||
|
|
||||||
$ tar vft tarred_directory.tar
|
|
||||||
drwxr-xr-x 0 tyrion group 0 Feb 4 14:54 directory/
|
|
||||||
-rw-r--r-- 0 tyrion group 0 Feb 4 14:54 directory/bar.txt
|
|
||||||
-rw-r--r-- 0 tyrion group 0 Feb 4 14:54 directory/foo.txt
|
|
|
@ -1,92 +0,0 @@
|
||||||
Tmux Cheat Sheet
|
|
||||||
================
|
|
||||||
|
|
||||||
`ctrl + b` is default to enter before you enter the commands. `M` = Left Alt key
|
|
||||||
or ESC key
|
|
||||||
|
|
||||||
## Windows
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|---------|-------------|
|
|
||||||
| c | Create a new window.
|
|
||||||
| & | Kill the current window.
|
|
||||||
| n | Change to the next window.
|
|
||||||
| p | Change to the previous window.
|
|
||||||
| , | Rename the current window.
|
|
||||||
| w | Choose the current window interactively.
|
|
||||||
| M-n | Move to the next window with a bell or activity marker.
|
|
||||||
| M-p | Move to the previous window with a bell or activity marker.
|
|
||||||
|
|
||||||
## Panes
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|---------|------------ |
|
|
||||||
| " | Split the current pane into two, top and bottom.
|
|
||||||
| % | Split the current pane into two, left and right.
|
|
||||||
| x | Kill the current pane.
|
|
||||||
| ; | Move to the previously active pane.
|
|
||||||
| o | Select the next pane in the current window.
|
|
||||||
| ! | Break the current pane out of the window.
|
|
||||||
| q | Briefly display pane indexes.
|
|
||||||
|
|
||||||
## Other
|
|
||||||
|
|
||||||
| command | description |
|
|
||||||
|---------|-------------|
|
|
||||||
| d | Detach the current client.
|
|
||||||
| $ | Rename the current session.
|
|
||||||
| [ | Enter copy mode to copy text or view the history.
|
|
||||||
| f | Prompt to search for text in open windows.
|
|
||||||
| r | Force redraw of the attached client.
|
|
||||||
| L | Switch the attached client back to the last session.
|
|
||||||
| : | Enter the tmux command prompt
|
|
||||||
| ? | List all key bindings
|
|
||||||
| f | Search window titles and goto that window
|
|
||||||
| i | Briefly display window information
|
|
||||||
| r | Force redraw of the attached client.
|
|
||||||
| s | Select a new session for the attached client interactively.
|
|
||||||
| t | Show the time.
|
|
||||||
| = | Choose which buffer to paste interactively from a list.
|
|
||||||
| ] | Paste the most recently copied buffer of text.
|
|
||||||
| . | Move window
|
|
||||||
|
|
||||||
## Create a new session
|
|
||||||
|
|
||||||
Any of these will work.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
tmux
|
|
||||||
tmux new
|
|
||||||
tmux new-session
|
|
||||||
```
|
|
||||||
|
|
||||||
## Reattach to a session
|
|
||||||
|
|
||||||
Any of these commands will work.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
tmux at
|
|
||||||
tmux attach
|
|
||||||
tmux attach-session
|
|
||||||
```
|
|
||||||
|
|
||||||
## List sessions
|
|
||||||
|
|
||||||
Any of these commands will work.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
tmux ls
|
|
||||||
tmux list-sessions
|
|
||||||
```
|
|
||||||
|
|
||||||
## How to copy and paste
|
|
||||||
|
|
||||||
1. Enter copy-mode `C-b [`
|
|
||||||
2. Move to text, press `Space` to select text, move cursor to highlight text
|
|
||||||
3. Press `Enter`
|
|
||||||
4. Back at the command prompt, press `C-b ]` and the text you selected is pasted
|
|
||||||
|
|
||||||
## References
|
|
||||||
|
|
||||||
* http://man.openbsd.org/OpenBSD-current/man1/tmux.1
|
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
UML Cheat Sheet
|
|
||||||
===============
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
<<interface>>
|
|
||||||
<<abstract>>
|
|
||||||
<<concrete>>
|
|
||||||
|
|
||||||
- private
|
|
||||||
# protected
|
|
||||||
+ public
|
|
||||||
|
|
||||||
name : type = default value
|
|
||||||
```
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
```
|
|
||||||
<<abstract>>
|
|
||||||
Name\Space\To\ClassAbstract
|
|
||||||
---
|
|
||||||
- $privateAttribute : string = ''
|
|
||||||
# $protected : integer = 1
|
|
||||||
+ $public : string = 'DefaultValue'
|
|
||||||
---
|
|
||||||
+ getPrivateAttribute() : string
|
|
||||||
+ getValueForKey($key : string) : mixed
|
|
||||||
+ get($key : string, $default : mixed = null) : mixed
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
Class A "uses" Class B
|
|
||||||
[Class A]- - - ->[Class B]
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
Class A "has a" Class B
|
|
||||||
[Class A]---->[Class B]
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
Company "owns" Employee
|
|
||||||
[Company]⃟----[Employee]
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
Ford "is a" Car
|
|
||||||
[Car]◁----[Ford]
|
|
||||||
```
|
|
|
@ -1,5 +0,0 @@
|
||||||
# vim
|
|
||||||
|
|
||||||
paste from clipboard into vim
|
|
||||||
|
|
||||||
"*yy OR "+yy (clarify this)
|
|
|
@ -1,5 +0,0 @@
|
||||||
# youtube-dl
|
|
||||||
|
|
||||||
Download a video and convert it to MP4
|
|
||||||
|
|
||||||
youtube-dl -v -o '%(title)s.%(ext)s' --restrict-filenames --recode-video mp4 qXYh8DmBZek
|
|
|
@ -1,4 +0,0 @@
|
||||||
Zsh Cheat Sheet
|
|
||||||
===============
|
|
||||||
|
|
||||||
Still haven't got around to digging in a reading the man pages for this yet.
|
|
|
@ -1,3 +0,0 @@
|
||||||
[eg-config]
|
|
||||||
examples-dir = ~/builds/eg/eg/examples
|
|
||||||
custom-dir = ~/.eg_custom
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +0,0 @@
|
||||||
[user]
|
|
||||||
name = Adam Cooper
|
|
||||||
email = amcooper@gmail.com
|
|
||||||
[core]
|
|
||||||
pager = diff-so-fancy | less --tabs=4 -RFX
|
|
58
m/install.sh
58
m/install.sh
|
@ -1,58 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
echo "Upgrading packages**"
|
|
||||||
sudo aptitude update
|
|
||||||
sudo aptitude upgrade --assume-yes
|
|
||||||
echo "**Installing packages: vim, tmux, python3, cmake, stow, fonts-powerline, snapd, etc.**"
|
|
||||||
sudo aptitude install --assume-yes git curl zsh vim tmux python3 python3-pip build-essential python3-dev python3-setuptools python3-wheel cmake stow fonts-powerline snapd lastpass-cli
|
|
||||||
echo "**Installing powerline and tmuxp**"
|
|
||||||
pip3 install powerline-status
|
|
||||||
pip3 install --user tmuxp
|
|
||||||
echo "**Installing plug.vim**"
|
|
||||||
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
||||||
echo "**Installing diff-so-fancy**"
|
|
||||||
curl -fsSL -o ~/.local/bin/diff-so-fancy https://raw.githubusercontent.com/so-fancy/diff-so-fancy/master/third_party/build_fatpack/diff-so-fancy
|
|
||||||
sudo chmod 755 ~/.local/bin/diff-so-fancy
|
|
||||||
echo "**Installing Rust**"
|
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- -v -y
|
|
||||||
echo "source $HOME/.cargo/env" >> ./zsh/.zshrc
|
|
||||||
echo "**Backing up config files**"
|
|
||||||
[[ -f ~/.zshrc ]] && mv -v ~/.zshrc ~/.zshrc.bak
|
|
||||||
[[ -f ~/.vimrc ]] && mv -v ~/.vimrc ~/.vimrc.bak
|
|
||||||
[[ -f ~/.tmux.conf ]] && mv -v ~/.tmux.conf ~/.tmux.conf.bak
|
|
||||||
[[ -f ~/.git-completion ]] && mv -v ~/.git-completion ~/.git-completion.bak
|
|
||||||
[[ -f ~/.gitconfig ]] && mv -v ~/.gitconfig ~/.gitconfig.bak
|
|
||||||
[[ -f ~/.oysttyerrc ]] && mv -v ~/.oysttyerrc ~/.oysttyerrc.bak
|
|
||||||
[[ -f ~/.oysttyerkey ]] && mv -v ~/.oysttyerkey ~/.oysttyerkey.bak
|
|
||||||
[[ -f ~/.egrc ]] && mv -v ~/.egrc ~/.egrc.bak
|
|
||||||
[[ -f /usr/local/bin/consolidate-path ]] && mv -v /usr/local/bin/consolidate-path /usr/local/bin/consolidate-path.bak
|
|
||||||
echo "**Installing new config files**"
|
|
||||||
stow -t ~ zsh
|
|
||||||
stow -t ~ vim
|
|
||||||
stow -t ~ tmux
|
|
||||||
stow -t ~ git
|
|
||||||
stow -t ~ newsboat
|
|
||||||
stow -t ~ eg
|
|
||||||
stow -t ~ oysttyer
|
|
||||||
stow -t /usr/local/bin bin
|
|
||||||
echo "**Installing Heroku CLI**"
|
|
||||||
sudo snap install --classic heroku
|
|
||||||
echo "**Installing glances**"
|
|
||||||
pip3 install glances
|
|
||||||
echo "**Installing ddgr**"
|
|
||||||
pip3 install ddgr
|
|
||||||
echo "**Installing NVM**"
|
|
||||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
|
|
||||||
echo "**Installing Yarn**"
|
|
||||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
|
||||||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
|
|
||||||
sudo apt-get update && sudo apt-get install --no-install-recommends yarn
|
|
||||||
echo "**Installing Oh My Zsh**"
|
|
||||||
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
|
|
||||||
echo "**Installing zsh-nvm**"
|
|
||||||
git clone https://github.com/lukechilds/zsh-nvm ~/.oh-my-zsh/custom/plugins/zsh-nvm
|
|
||||||
echo "**Switching to zsh**"
|
|
||||||
chsh -s /bin/zsh
|
|
||||||
echo "[TODO] **Download and install bat cb eg exa fd newsboat consolidate-path**"
|
|
||||||
echo "**Please restart the system and run ~/dotfiles/post-install.sh**"
|
|
||||||
/bin/zsh
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
browser "surf-open.sh %u"
|
|
||||||
color background black white
|
|
||||||
color listnormal black white
|
|
||||||
color listfocus white blue
|
|
||||||
color listnormal_unread magenta white
|
|
||||||
color listfocus_unread white blue bold
|
|
||||||
color info white blue
|
|
||||||
color article black white
|
|
||||||
max-items 4096
|
|
||||||
keep-articles-days 45
|
|
|
@ -1,37 +0,0 @@
|
||||||
http://feeds.guardian.co.uk/theguardian/world/rss "nuggets"
|
|
||||||
http://www.wsws.org/rss/en.xml "nuggets"
|
|
||||||
http://www.democracynow.org/democracynow.rss "nuggets"
|
|
||||||
http://news.ycombinator.com/rss "tech"
|
|
||||||
https://lobste.rs/rss "tech"
|
|
||||||
http://www.languagehat.com/index.rdf "linguistics"
|
|
||||||
http://www.opengeodata.org/?feed=rss2 "tech"
|
|
||||||
http://feeds.arstechnica.com/arstechnica/index/ "tech"
|
|
||||||
http://feeds.feedburner.com/TheCssAwards "tech"
|
|
||||||
http://feeds.feedburner.com/CssTricks "tech"
|
|
||||||
https://protonvpn.com/blog/feed/ "tech"
|
|
||||||
https://cloudblog.withgoogle.com/rss/ "tech"
|
|
||||||
https://spreadprivacy.com/feed "tech"
|
|
||||||
https://protonmail.ch/blog/feed/ "tech"
|
|
||||||
http://www.bleepingcomputer.com/feed/ "tech"
|
|
||||||
https://os.phil-opp.com/rss.xml "tech"
|
|
||||||
https://mondediplo.com/backend "nuggets"
|
|
||||||
http://feeds.feedburner.com/Metafilter "nuggets"
|
|
||||||
http://feeds.feedburner.com/InTheseTimes "nuggets"
|
|
||||||
http://whowhatwhy.com/feed/ "nuggets"
|
|
||||||
http://jacobinmag.com/feed/ "nuggets"
|
|
||||||
http://www.thebaffler.com/blog/rss "nuggets"
|
|
||||||
http://www.dissentmagazine.org/feed "nuggets"
|
|
||||||
https://www.govtrack.us/events/events.rss?feeds=bill%3As116-1489 "nuggets"
|
|
||||||
https://harpers.org/feed/ "nuggets"
|
|
||||||
http://feeds.propublica.org/propublica/nerds "nuggets"
|
|
||||||
http://feeds.propublica.org/propublica/main "nuggets"
|
|
||||||
http://www.counterpunch.org/feed/ "nuggets"
|
|
||||||
http://thenewinquiry.com/rss "nuggets"
|
|
||||||
http://editor.currentaffairs.org/feed/ "nuggets"
|
|
||||||
https://www.truthdig.com/feed/ "nuggets"
|
|
||||||
http://googletesting.blogspot.com/feeds/posts/default "webdev"
|
|
||||||
http://javascriptweekly.com/rss "webdev"
|
|
||||||
http://feeds.feedburner.com/Bludice "webdev"
|
|
||||||
https://reactjs.org/feed.xml "webdev"
|
|
||||||
https://theintercept.com/feed/?lang=en "nuggets"
|
|
||||||
https://wallabag.theadamcooper.com/amcooper/iNav2v9Pb8t5ja9/unread.xml "webdev"
|
|
|
@ -1 +0,0 @@
|
||||||
ck=X&cs=X&at=14814274-sTXAoAlc9gpgjRR451UsnG0ZLRodvDD6rfeOmJGHZ&ats=V8MtTSuNb5HKy1JGFC2q3T3DhdpfGbjdRKCCFeo0zc9Z8
|
|
|
@ -1,11 +0,0 @@
|
||||||
# keyf=/Users/adamcooper/.oysttyerkey
|
|
||||||
oauthkey=17N3a4JBR8jJsbBBdwxfAqM5a
|
|
||||||
oauthsecret=pIuaI8sDqwMH7eqthVpqTAA1zY37pB3MY4EfrVFHnSLOpElg0T
|
|
||||||
ansi=1
|
|
||||||
separator= * * * * * * * * * * *
|
|
||||||
doublespace=1
|
|
||||||
vcheck=1
|
|
||||||
urlopen=surf-open.sh %U
|
|
||||||
synch=1
|
|
||||||
mentions=1
|
|
||||||
verify=1
|
|
|
@ -1,15 +0,0 @@
|
||||||
# Post-install script
|
|
||||||
echo "**Installing Node and NPM with NVM**"
|
|
||||||
echo "source $HOME/.nvm/nvm.sh" >> ./zsh/.zshrc
|
|
||||||
stow -t ~ -R zsh
|
|
||||||
nvm install lts/dubnium
|
|
||||||
nvm use default
|
|
||||||
echo "**Installing Typescript**"
|
|
||||||
npm install -g typescript
|
|
||||||
echo ""
|
|
||||||
echo "All that\'s left is the vim plugins. Install them by running:"
|
|
||||||
echo " $ vim -c \":PlugInstall\""
|
|
||||||
echo "and then compile YouCompleteMe: "
|
|
||||||
echo " $ python3 ~/.vim/plugged/YouCompleteMe/install.py --ts-completer --rust-completer"
|
|
||||||
echo "and you're off to the races."
|
|
||||||
|
|
|
@ -1,64 +0,0 @@
|
||||||
# 256 colors for vim
|
|
||||||
set -g default-terminal "screen-256color"
|
|
||||||
|
|
||||||
# Set default shell to zsh
|
|
||||||
set-option -g default-shell /bin/zsh
|
|
||||||
|
|
||||||
# Tmuxline
|
|
||||||
if-shell "test -f ~/.tmuxline_theme_snapshot" "source ~/.tmuxline_theme_snapshot"
|
|
||||||
|
|
||||||
# Start window numbering at 1
|
|
||||||
set-option -g base-index 1
|
|
||||||
set-window-option -g pane-base-index 1
|
|
||||||
|
|
||||||
# Cycle panes with C-b C-b
|
|
||||||
unbind ^B
|
|
||||||
bind ^B select-pane -t :.+
|
|
||||||
|
|
||||||
# Reload config wtih a key
|
|
||||||
bind-key r source-file ~/.tmux.conf \; display "Config reloaded!"
|
|
||||||
|
|
||||||
# Mouse works as expected
|
|
||||||
set -g mouse on
|
|
||||||
# set -g mode-mouse on
|
|
||||||
# set -g mouse-select-pane on
|
|
||||||
# set -g mouse-resize-pane on
|
|
||||||
# set -g mouse-select-window on
|
|
||||||
|
|
||||||
# Scrolling works as expected
|
|
||||||
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
|
|
||||||
|
|
||||||
# Use the system clipboard
|
|
||||||
# set-option -g default-command "reattach-to-user-namespace -l zsh"
|
|
||||||
|
|
||||||
# Clear the pane and its history
|
|
||||||
bind -n C-k send-keys C-l \; clear-history
|
|
||||||
|
|
||||||
# Smart pane switching with awareness of vim splits
|
|
||||||
# From github.com/christoomey/vim-tmux-navigator
|
|
||||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
|
||||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
|
||||||
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
|
||||||
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
|
||||||
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
|
|
||||||
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
|
|
||||||
bind-key -n C-\\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
|
|
||||||
bind-key -T copy-mode-vi C-h select-pane -L
|
|
||||||
bind-key -T copy-mode-vi C-j select-pane -D
|
|
||||||
bind-key -T copy-mode-vi C-k select-pane -U
|
|
||||||
bind-key -T copy-mode-vi C-l select-pane -R
|
|
||||||
bind-key -T copy-mode-vi C-\\ select-pane -l
|
|
||||||
|
|
||||||
# C-l is taken oer by vim style pane navigation (not sure where this comes from or whether I still need it)
|
|
||||||
bind C-l send-keys 'C-l'
|
|
||||||
|
|
||||||
# Use vim keybindings in copy mode
|
|
||||||
setw -g mode-keys vi
|
|
||||||
|
|
||||||
# Setup 'v' to begin selection as in Vim
|
|
||||||
# bind-key -t vi-copy v begin-selection
|
|
||||||
# bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
|
|
||||||
|
|
||||||
# Update default binding of `Enter` to also use copy-pipe
|
|
||||||
# unbind -t vi-copy Enter
|
|
||||||
# bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
|
|
|
@ -1,21 +0,0 @@
|
||||||
# This tmux statusbar config was created by tmuxline.vim
|
|
||||||
# on Tue, 14 Jul 2020
|
|
||||||
|
|
||||||
set -g status-justify "left"
|
|
||||||
set -g status "on"
|
|
||||||
set -g status-left-style "none"
|
|
||||||
set -g message-command-style "fg=colour52,bg=colour214"
|
|
||||||
set -g status-right-style "none"
|
|
||||||
set -g pane-active-border-style "fg=colour202"
|
|
||||||
set -g status-style "none,bg=colour228"
|
|
||||||
set -g message-style "fg=colour52,bg=colour214"
|
|
||||||
set -g pane-border-style "fg=colour214"
|
|
||||||
set -g status-right-length "100"
|
|
||||||
set -g status-left-length "100"
|
|
||||||
setw -g window-status-activity-style "none"
|
|
||||||
setw -g window-status-separator ""
|
|
||||||
setw -g window-status-style "none,fg=colour166,bg=colour228"
|
|
||||||
set -g status-left "#[fg=colour255,bg=colour202] #S #[fg=colour202,bg=colour228,nobold,nounderscore,noitalics]"
|
|
||||||
set -g status-right "#[fg=colour214,bg=colour228,nobold,nounderscore,noitalics]#[fg=colour52,bg=colour214] %Y-%m-%d %H:%M #[fg=colour202,bg=colour214,nobold,nounderscore,noitalics]#[fg=colour255,bg=colour202] #h "
|
|
||||||
setw -g window-status-format "#[fg=colour166,bg=colour228] #I #[fg=colour166,bg=colour228] #W "
|
|
||||||
setw -g window-status-current-format "#[fg=colour228,bg=colour214,nobold,nounderscore,noitalics]#[fg=colour52,bg=colour214] #I #[fg=colour52,bg=colour214] #W #[fg=colour214,bg=colour228,nobold,nounderscore,noitalics]"
|
|
|
@ -1,25 +0,0 @@
|
||||||
{
|
|
||||||
"session_name": "acorn",
|
|
||||||
"windows": [{
|
|
||||||
"window_name": "ide",
|
|
||||||
"panes": [
|
|
||||||
"vim -R package.json",
|
|
||||||
"ls",
|
|
||||||
"git status"
|
|
||||||
],
|
|
||||||
"layout": "main-horizontal",
|
|
||||||
"start_directory": "~/code/acorn-glen"
|
|
||||||
}, {
|
|
||||||
"window_name": "servers",
|
|
||||||
"start_directory": "~/code/acorn-glen",
|
|
||||||
"layout": "main-horizontal",
|
|
||||||
"panes": [{
|
|
||||||
"shell_command": [ "cd ~/code/acorn-glen", "echo 'yarn dev'" ]
|
|
||||||
}, {
|
|
||||||
"shell_command": [ "sleep 4", "echo 'yarn relay --watch'" ]
|
|
||||||
}, {
|
|
||||||
"shell_command": [ "sleep 4", "echo 'yarn start'" ]
|
|
||||||
}]
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"session_name": "general",
|
|
||||||
"windows": [{
|
|
||||||
"panes": ["/etc/update-motd.d/90-custom"]
|
|
||||||
}],
|
|
||||||
"start_directory": "~"
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"session_name": "morning",
|
|
||||||
"windows": [{
|
|
||||||
"window_name": "newsboat",
|
|
||||||
"panes": ["newsboat"]
|
|
||||||
}, {
|
|
||||||
"window_name": "ddgr",
|
|
||||||
"panes": ["ddgr --colors=ecdgxy Patrice Lumumba"]
|
|
||||||
}, {
|
|
||||||
"window_name": "oysttyer",
|
|
||||||
"panes": ["oysttyer"]
|
|
||||||
}, {
|
|
||||||
"window_name": "general",
|
|
||||||
"panes": ["date"]
|
|
||||||
}],
|
|
||||||
"start_directory": "~"
|
|
||||||
}
|
|
||||||
|
|
96
m/vim/.vimrc
96
m/vim/.vimrc
|
@ -1,96 +0,0 @@
|
||||||
" Make backspace behave in a sane manner.
|
|
||||||
set backspace=indent,eol,start
|
|
||||||
|
|
||||||
" Spaces indentation
|
|
||||||
set expandtab
|
|
||||||
set tabstop=2
|
|
||||||
" set softtabstop=2
|
|
||||||
set shiftwidth=2
|
|
||||||
" Consider installing the Smart Tabs plugin
|
|
||||||
|
|
||||||
" Show whitespace
|
|
||||||
set listchars=eol:¬,tab:>-,trail:~,extends:>,precedes:<,space:·
|
|
||||||
|
|
||||||
" Show line numbers
|
|
||||||
set number
|
|
||||||
set relativenumber
|
|
||||||
|
|
||||||
" Default: split right
|
|
||||||
set splitright
|
|
||||||
|
|
||||||
" Allow hidden buffers, don't limit to one file per window/split
|
|
||||||
set hidden
|
|
||||||
|
|
||||||
" Sane vim split naviagation (via Gaslight blog)
|
|
||||||
nnoremap <c-j> <c-w>j
|
|
||||||
nnoremap <c-k> <c-w>k
|
|
||||||
nnoremap <c-h> <c-w>h
|
|
||||||
nnoremap <c-l> <c-w>l
|
|
||||||
|
|
||||||
" Disable filetype detection
|
|
||||||
filetype off
|
|
||||||
|
|
||||||
" vim-plug
|
|
||||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
|
||||||
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
|
||||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
||||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
|
||||||
endif
|
|
||||||
|
|
||||||
call plug#begin('~/.vim/plugged')
|
|
||||||
Plug 'vim-airline/vim-airline'
|
|
||||||
Plug 'vim-airline/vim-airline-themes'
|
|
||||||
Plug 'edkolev/tmuxline.vim'
|
|
||||||
Plug 'christoomey/vim-tmux-navigator'
|
|
||||||
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
|
||||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
|
||||||
Plug 'junegunn/fzf.vim'
|
|
||||||
Plug 'dense-analysis/ale'
|
|
||||||
Plug 'Valloric/YouCompleteMe'
|
|
||||||
Plug 'pangloss/vim-javascript'
|
|
||||||
Plug 'MaxMEllon/vim-jsx-pretty'
|
|
||||||
Plug 'leafgarland/typescript-vim'
|
|
||||||
Plug 'HerringtonDarkholme/yats.vim'
|
|
||||||
Plug 'Quramy/tsuquyomi'
|
|
||||||
Plug 'rust-lang/rust.vim'
|
|
||||||
Plug 'severij/vadelma'
|
|
||||||
Plug 'tpope/vim-surround'
|
|
||||||
call plug#end()
|
|
||||||
|
|
||||||
" NERDTree on ctrl+n
|
|
||||||
let NERDTreeShowHidden=1
|
|
||||||
map <silent> <C-n> :NERDTreeToggle<CR>
|
|
||||||
|
|
||||||
" close NERDTree after opening a file
|
|
||||||
" let g:NERDTreeQuitOnOpen=1
|
|
||||||
|
|
||||||
" Tsuquyomi
|
|
||||||
autocmd Filetype typescript nmap <buffer> <Leader>t : <C-u>echo tsuquyomi#hint()<CR>
|
|
||||||
|
|
||||||
" Airline
|
|
||||||
let g:airline_powerline_fonts = 1
|
|
||||||
let g:airline_theme = 'light'
|
|
||||||
|
|
||||||
" Tmuxline
|
|
||||||
let g:tmuxline_theme = 'airline_visual'
|
|
||||||
|
|
||||||
" YouCompleteMe <> TypeScript
|
|
||||||
if !exists("g:ycm_semantic_triggers")
|
|
||||||
let g:ycm_semantic_triggers = {}
|
|
||||||
endif
|
|
||||||
let g:ycm_semantic_triggers['typescript'] = ['.']
|
|
||||||
|
|
||||||
" Enable file type detection and do language-dependent indenting
|
|
||||||
filetype plugin indent on
|
|
||||||
|
|
||||||
" Switch syntax highlighting on
|
|
||||||
syntax enable
|
|
||||||
|
|
||||||
" Set color scheme
|
|
||||||
set background=light
|
|
||||||
colorscheme vadelma
|
|
||||||
|
|
||||||
" Temporary file locations
|
|
||||||
set backupdir=.backup/,~/.backup/,/tmp//
|
|
||||||
set directory=.swp/,~/.swp/,/tmp//
|
|
||||||
set undodir=.undo/,~/.undo/,/tmp//
|
|
161
m/zsh/.zshrc
161
m/zsh/.zshrc
|
@ -1,161 +0,0 @@
|
||||||
## Vi keybindings for the shell ##
|
|
||||||
bindkey -v
|
|
||||||
|
|
||||||
## History navigation by search pattern
|
|
||||||
bindkey '^[0A' history-beginning-search-backward
|
|
||||||
bindkey '^[0B' history-beginning-search-forward
|
|
||||||
|
|
||||||
## bash history timestamps ##
|
|
||||||
export HISTTIMEFORMAT="%a %Y-%m-%d %T "
|
|
||||||
|
|
||||||
# Path to your oh-my-zsh installation.
|
|
||||||
export ZSH=$HOME/.oh-my-zsh
|
|
||||||
|
|
||||||
# Set name of the theme to load.
|
|
||||||
# Look in ~/.oh-my-zsh/themes/
|
|
||||||
# Optionally, if you set this to "random", it'll load a random theme each
|
|
||||||
# time that oh-my-zsh is loaded.
|
|
||||||
ZSH_THEME=""
|
|
||||||
|
|
||||||
# Suppress display of name of default user in prompt
|
|
||||||
DEFAULT_USER=$USER
|
|
||||||
prompt_context() {}
|
|
||||||
|
|
||||||
# Uncomment the following line to use case-sensitive completion.
|
|
||||||
# CASE_SENSITIVE="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
|
||||||
# DISABLE_AUTO_UPDATE="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to change how often to auto-update (in days).
|
|
||||||
# export UPDATE_ZSH_DAYS=13
|
|
||||||
|
|
||||||
# Uncomment the following line to disable colors in ls.
|
|
||||||
# DISABLE_LS_COLORS="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to disable auto-setting terminal title.
|
|
||||||
export DISABLE_AUTO_TITLE="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to enable command auto-correction.
|
|
||||||
# ENABLE_CORRECTION="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
|
||||||
# COMPLETION_WAITING_DOTS="true"
|
|
||||||
|
|
||||||
# Uncomment the following line if you want to disable marking untracked files
|
|
||||||
# under VCS as dirty. This makes repository status check for large repositories
|
|
||||||
# much, much faster.
|
|
||||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
|
||||||
|
|
||||||
# Uncomment the following line if you want to change the command execution time
|
|
||||||
# stamp shown in the history command output.
|
|
||||||
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
|
||||||
# HIST_STAMPS="mm/dd/yyyy"
|
|
||||||
|
|
||||||
# Would you like to use another custom folder than $ZSH/custom?
|
|
||||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
|
||||||
|
|
||||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
|
||||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
|
||||||
# Add wisely, as too many plugins slow down shell startup.
|
|
||||||
plugins=(git zsh-nvm vi-mode)
|
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
|
||||||
|
|
||||||
# User configuration
|
|
||||||
|
|
||||||
export PATH="$HOME/.cargo/env:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/local/go/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"
|
|
||||||
# export PATH="$HOME/.local/bin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/local/go/bin:$PATH"
|
|
||||||
|
|
||||||
## Add Visual Studio Code (code)
|
|
||||||
# export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
|
|
||||||
|
|
||||||
# export MANPATH="/usr/local/man:$MANPATH"
|
|
||||||
|
|
||||||
# You may need to manually set your language environment
|
|
||||||
# export LANG=en_US.UTF-8
|
|
||||||
|
|
||||||
# Preferred editor for local and remote sessions
|
|
||||||
# if [[ -n $SSH_CONNECTION ]]; then
|
|
||||||
# export EDITOR='vim'
|
|
||||||
# else
|
|
||||||
# export EDITOR='mvim'
|
|
||||||
# fi
|
|
||||||
export VISUAL=vim
|
|
||||||
export EDITOR=$VISUAL
|
|
||||||
|
|
||||||
export BROWSER=surf-open.sh
|
|
||||||
|
|
||||||
# Compilation flags
|
|
||||||
# export ARCHFLAGS="-arch x86_64"
|
|
||||||
|
|
||||||
# ssh
|
|
||||||
# export SSH_KEY_PATH="~/.ssh/dsa_id"
|
|
||||||
|
|
||||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
|
||||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
|
||||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
|
||||||
# For a full list of active aliases, run `alias`.
|
|
||||||
#
|
|
||||||
# Example aliases
|
|
||||||
# alias zshconfig="mate ~/.zshrc"
|
|
||||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
|
||||||
|
|
||||||
[ -z "$PS1" ] && return
|
|
||||||
|
|
||||||
# Why are these not exports?
|
|
||||||
# enable git unstaged indicators - set to a non-empty value
|
|
||||||
GIT_PS1_SHOWDIRTYSTATE="."
|
|
||||||
|
|
||||||
# enable showing of untracked files - set to a non-empty value
|
|
||||||
GIT_PS1_SHOWUNTRACKEDFILES="."
|
|
||||||
|
|
||||||
# enable stash checking - set to a non-empty value
|
|
||||||
GIT_PS1_SHOWSTASHSTATE="."
|
|
||||||
|
|
||||||
# enable showing of HEAD vs its upstream
|
|
||||||
GIT_PS1_SHOWUPSTREAM="auto"
|
|
||||||
|
|
||||||
BLACK=$(tput setaf 0)
|
|
||||||
RED=$(tput setaf 1)
|
|
||||||
GREEN=$(tput setaf 2)
|
|
||||||
YELLOW=$(tput setaf 3)
|
|
||||||
LIME_YELLOW=$(tput setaf 190)
|
|
||||||
POWDER_BLUE=$(tput setaf 153)
|
|
||||||
BLUE=$(tput setaf 4)
|
|
||||||
MAGENTA=$(tput setaf 5)
|
|
||||||
CYAN=$(tput setaf 6)
|
|
||||||
WHITE=$(tput setaf 7)
|
|
||||||
BRIGHT=$(tput bold)
|
|
||||||
NORMAL=$(tput sgr0)
|
|
||||||
BLINK=$(tput blink)
|
|
||||||
REVERSE=$(tput smso)
|
|
||||||
UNDERLINE=$(tput smul)
|
|
||||||
|
|
||||||
## NVM ##
|
|
||||||
export NVM_DIR="$HOME/.nvm"
|
|
||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
|
||||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
|
||||||
|
|
||||||
# Starship
|
|
||||||
eval "$(starship init zsh)"
|
|
||||||
|
|
||||||
## FZF ##
|
|
||||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
|
||||||
export FZF_DEFAULT_COMMAND="find ." # Includes hidden files
|
|
||||||
|
|
||||||
# exa colors
|
|
||||||
export LS_COLORS="*.md=37"
|
|
||||||
export EXA_COLORS="uu=33;45;1"
|
|
||||||
|
|
||||||
# tmuxp completion
|
|
||||||
eval "$(_TMUXP_COMPLETE=source_zsh tmuxp)"
|
|
||||||
|
|
||||||
source /home/adam/.cargo/env
|
|
||||||
source /home/adam/.nvm/nvm.sh
|
|
||||||
|
|
||||||
# Consolidate PATH
|
|
||||||
export PATH="$(consolidate-path "$PATH")"
|
|
Loading…
Reference in a new issue