Showing posts with label cheat sheet. Show all posts
Showing posts with label cheat sheet. Show all posts

Wednesday, February 26, 2020

Docker commands vs Docker life cycle - Basic level

Earlier I noticed that there's one problem with Docker support documentation. Unfortunately, while it is possible to find out the very basic scenarios in its Get Started section, you need to dig through the Internet for hours to find information about use cases. Use cases is an answer to the question "What are we trying to do here, anyway?".

So, I started to collect this information for myself and pair it with command sets. Below you can find a use case for setting up a docker image and performing some basic commands on it. I shall extend this collection later, if I'm lucky.

Sunday, May 19, 2019

Know your round numbers or how to get 2^X with bash

Since I haven't written anything valuable for a long time and still have no ideas how to fix it, here is an example of how bash can actually help you quickly get values of two to the power of something. So, here we go

pg@dana:~$ for i in {1..100}; do calc "2^$i" | xargs echo; done
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
65536
<...>
1267650600228229401496703205376


Just in case you want to get to the bottom of it, this mini-script uses:
-- my favorite calc application (package name apcalc)
-- cycles (for ... ; do... ; done)
-- ranges ({1..100})
-- redirection with xargs ( | xargs echo)

Enjoy your Linux!

PS: 'Round numbers' in relation to 2^X is actually an inside joke from the times when I couldn't afford to rent my own flat and had to share

Monday, November 26, 2018

Mnemonics for maven - three funny phrases to quickly remember what maven default lifecycle is

If you, like myself, often have to switch between different technical stacks, you may know what it feels like not to be able to recall something you put so much energy in just a little bit earlier. Time has come to do something about it.

As you probably remember maven supports three built-in lifecycles: default, clean and site. The latter two are more or less straightforward, but default one is not so. And today, tired of putting it off, I, finally, did these phrases to memorize phases of the defautl lifecycle.

Here they are:

Very Curious: This Parrot's Voice's Indefinitely Deep
Vault Closed To Put Valuables In Dens
Vessel Carries Ten Pink Velvet Ingenious Dogs

First letter of each capitalized word should map on this: Validate > Compile > Test > Package > Verify > Install > Deploy.

Of course, you still have to remember about goals and executions, not to mention the other two lifecycles and their phases, but that's the start.

Good luck.

PS: For more information on maven please checkout these:

Sunday, October 22, 2017

Some Examples of Bash for Use in Test

Time has come to finally write something of technical nature, not just another advice on how others should work to make me happy. So here is a cheatsheet for a tester who spends at least some of her time with nix console. For obvious reasons it wasn't my intention to cover everything, so please take it just as a memory refresher (or a source of ideas it you find it useful).

NB: It is assumed that as long as you understand what man is, you are fine (use it if my explanation is not enough).