Cheatsheet generator

Mine sider

Cheatsheet generator

Jeg bruger næsten hele min arbejdsdag med en Linux terminal, men jeg min hjerne er åbenbart ikke bygget til, at huske kryptiske kommandoer. Efter inspiration fra en kollega har jeg lavet mig et program til hurtigt lave et “cheatsheet” og hurtigt finde mine ofte brugte kommandoer.

Programmet kan findes på github på :

Dette er min README fil.

If you like me are working with a Linux terminal all day long, but also have as poor a memory as me,you probably have a document with all the commands and cheats you use. This script can help you out,and can be used to easily store you cheats and easily retreat them again. This all from the command line.

Each cheatsheet is stored in it’s own file (a yaml text file, which you can edit in any text editor). You can order your cheats in sections with the -s optionFor each cheat you can have a ‘copyText’, which can we used to easy get the ‘copytext’ into the clipboard,so you can paste it e.g. into your command line

Examples: Example for printing help :

c –help

Usage: c [cheatSheet] [cpIndex] [option] [<String: Description of what to remember>]

-s, –section <string> Section header.

-c, –copytext <string> Insert new ‘copy’ text.

-d, –description Prints a description of this script.


Example : You want to store a cheat for how to checkout a project from git.

Command for adding cheat :

c git -h “projects” “How to checkout a new project” -c “git clone [url]”


Example : Show your ‘cheats’ for git

Command for showing cheat : c git

Result : ====================== default ================================

Result :  1 Cleanup everything (done at top dir) : git clean -df; git reset –hard


Example : Get the ‘copy text’ into clipboard

Command for getting copy text ‘1’ from the last shown cheats : git 1

Result : ‘git clean -df; git reset –hard’ copied to clipboard, now you can paste the ‘git clean -df; git reset –hard’ command

Setup Ruby for Windows

set PATH=%PATH%;C:\cheatsheet

<span class="pln">assoc </span><span class="pun">.</span><span class="pln">rb</span><span class="pun">=</span><span class="typ">RubyScript</span><span class="pln">
ftype </span><span class="typ">RubyScript</span><span class="pun">=</span><span class="pln">ruby</span><span class="pun">.</span><span class="pln">exe </span><span class="pun">%</span><span class="lit">1</span> <span class="pun">%*


Som sagt bruger jeg næsten hele min arbejdsdag med en Linux terminal, og jeg arbejder i et  scrum team, så jeg har brug for at huske hvad jeg har arbejdet på i løbet af dagen. Der findes flere programmer/scripts til dette, men jeg synes at de er “over-engineered”, så jeg har lavet et lille script til hurtigt, at gemme hvad jeg lige har arbejdet på.

Programmet kan findes på github på :

Dette er min README fil.

If you like me are working in Scrum team, and have to give a daily update, but sometime can’t remember what you did yesterday, it is nice to have quick way to store the tasks you have done in a worksheet text file. There are plenty of similar tools ‘out there’, but I found them all ‘over-engineered’, so I made this simply command line tool which doesn’t have a lot of fancy features, but can simply store the tasks easily in a file from the command line. The worksheet text file is stored in the file directory containing this script.


Example: Add new task to your worksheet. E.g. that you fixed a bug ws I fixed bug number xxxx

Example: Show the 10 lines of your work-sheet (just before go to daily scrum meeting 🙂

Command line : ws

Wednesday 2017-February-8: Checking Bugzilla about LEDs for Serval board
Wednesday 2017-February-8: Code review
Wednesday 2017-February-8: MFI tool
Wednesday 2017-February-8: FAN controller
Wednesday 2017-February-8: Greeen ethernet transfer

Monday 2017-February-6: 3.60 JR1 i2c investagation
Monday 2017-February-6: Port smoke test
Monday 2017-February-6: sfp link flap