How to focus rake tests:
it 'does some sort of testing', :focus => true do
run_integration_specs(spec_path: 'spec/gocli/integration', tags: 'focus') or
rspec --tag focus spec/my_spec.rb
How to run bosh integration tests as a one-off in fly:
SPEC_PATH=spec/gocli/integration DB=postgresql CONCOURSE_TARGET=production be rake fly:integration
How to run BRATS as a one-off:
- When running older versions of concourse, using the
-xflag, and referencing tmp directories as inputs, make sure togit init . && git add -N .to have it not be mad af. - You probably want to run priviledged with
-p - Check the task yml and sh (specifically the exports) for all the fun answers.
Tmux:
Ctrl + Space + SSessions
Vim:
Qutiting:
ZZ
:wq
:x
:cq - exit with an error code so git doesn't commit
Basic Movements:
wstart of next wordbstart of previous wordeend of next wordgeend of prev word
Inserting/Appending:
Shift + amove to end of line and appendShift + imove to first char of line and insert
Line Movements:
0start of current line^start of first word of current line$end of current line
Buffer Movements:
ggtop of bufferGbottom of buffer<N>G or <N>ggmove to line N
Moving Lines:
-
Alt + JorAlt + Kmove the selected (or under cursor) line(s) up and down :D -
*will select the word/whatever under the cursor and find the next instance of it -
nnext instance of that thing
Collapsing:
-
z + cto collapse -
z + oto open -
z + ato collapse or open -
z + Mcollapse all levels (everything) -
z + Ropen all levels (everything) -
z + mcollapse a level / increase fold level -
z + ropen a level
Context-Aware splitting and joining
g + Ssplit the line onto multiple lines based on contextg + Jjoin the line onto a single line based on context
Ctrl + v to visually select
Ctrl + n to add cursors on each line
After visually selecting, use I to apply an insert to multiple lines
Alt + m select everything under the cursor
Casing:
c + r + _ or c + r + s changes case to snake case
c + r + c changes case to camel case
daa delete around argument
ctags and navigating to function declarations:
:!ctags -Rto generate the ctags (while in nvim)Ctrl + ]go to declarationg + ]list declarations- In go
g + dwill go to the definition (without the use of ctags)
Navigating quick fixes in vim unimpaired:
[ + q last/prev/up an item in the list
] + q next/down an item in the list
Searching for stuff under the cursor:
Space + s + gwith no argumentsCtrl + r + Ctrl + wwill paste whats under the cursor
Read in contents of file under cursor
:r
Checking resources on bosh-io-release resources:
fly -t TEAM check-resource --resource=PIPELINE/RESOURCE --from=version:261.4
Checking Pivotal Network (Pivnet) resources:
fly -t TEAM cr -r PIPELINE/RESOURCE -f product_version:2.4.6#2019-04-16T20:20:23.919Z
One can get the correct product version via https://network.pivotal.io/api/v2/products/p-isolation-segment/releases/, combine version key with software_files_updated_at
Checking time resources:
fly -t <your target> check-resource -r PIPELINE/RESOURCE --from "time:2000-01-01T00:00:00Z" # the important part
export version="0.1.0-build.$(date '+%s')"; ./build.sh <( echo "${version}" ) .; om upload-product -p "pas-for-kubernetes-${version}.pivotal"
export version="2.12.0-build.$(date '+%s')";echo "$version" > $PWD/version; STUB_RELEASES=true ./bin/build <( echo "${version}" ) .; smith om -- upload-product -p "srt-${version}.pivotal
Alt + Ngoes to the next instance of the errors.