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
-x
flag, 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 + S
Sessions
Vim:
Qutiting:
ZZ
:wq
:x
:cq
- exit with an error code so git doesn't commit
Basic Movements:
w
start of next wordb
start of previous worde
end of next wordge
end of prev word
Inserting/Appending:
Shift + a
move to end of line and appendShift + i
move to first char of line and insert
Line Movements:
0
start of current line^
start of first word of current line$
end of current line
Buffer Movements:
gg
top of bufferG
bottom of buffer<N>G or <N>gg
move to line N
Moving Lines:
-
Alt + J
orAlt + K
move 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 -
n
next instance of that thing
Collapsing:
-
z + c
to collapse -
z + o
to open -
z + a
to collapse or open -
z + M
collapse all levels (everything) -
z + R
open all levels (everything) -
z + m
collapse a level / increase fold level -
z + r
open a level
Context-Aware splitting and joining
g + S
split the line onto multiple lines based on contextg + J
join 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 -R
to generate the ctags (while in nvim)Ctrl + ]
go to declarationg + ]
list declarations- In go
g + d
will 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 + g
with no argumentsCtrl + r + Ctrl + w
will 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
:%
is a vim built in for:1,$
aka all the lines