Presentations with Markdown: revealjs

Being an active contributor to the PiAndMore and other conferences, I happen to make quite a few presentations a year. In the past I was using the good old Microsoft Powerpoint - which has its strengths, but also its drawbacks. Positioning text and graphics were never my taste (I use LaTeX, btw) - so I set out to find a new way to create presentations - and found revealjs back in 2018.

What is revealjs? Basically: Write your presentations in Markdown. Show in a Webbrowser - or export as PDF. TL;DR? Navigate through the demo.

However, using revealjs by its own was cumbersome, I was missing a live preview - and while all of this was available at its freemium service slides.com - I do not want to be dependant on online connection - nor share every presentation with the world (some might involve senstive data... so no).

That was when I started to use hacker-slides - a small Go implementation for all OS types, with a Live Preview, local/offline usage. It was near perfect, other than issues like having problems with carriage return and similar signs at some points (usage other Windows...) and some other stuff (I lost some presentations when I opened up too many at the same time and edited different presentations in different tabs). It was also the first project where I changed some Go code for my local copy. However, the final nail in the coffin was that this project is not really maintained anymore.

Enter vscode-reveal - it works in VSCode or Codium - has live preview and all the features you need. Your basic, local, revealjs powered, operating system independant presentation-making-machine.

I have used it for the latest PiAndMore - and I am not going back to anything else (at least for the time being) - so maybe you want to give it a try?

Use Sonarqube with sonar-cxx

Installation

  • Download SonarQube from https://www.sonarqube.org/downloads/
    • If you are using Java 8, you need to download SonarQube 6.7.x LTS (look for Historical Downloads on the website)
    • If you are using Java 11 - SonarQube 7.9.x LTS (look for Long term support area on the website)
  • Unpack the SonarQube ZIP file
  • Download the latest sonar-c-plugin.jar and sonar-cxx-plugin.jar from https://github.com/SonarOpenCommunity/sonar-cxx/releases
  • Insert both jar files into the SONARQUBE_HOME/extensions/plugins extensions directory (within the unpacked ZIP file)
  • Start SonarQube and Login
    • On Windows 10, e.g. via SONARQUBE_HOME/bin/windows-x86-64/StartSonar.bat
    • Go to http://127.0.0.1:9000 as soon as "SonarQube is up" is announced
    • Default login is user admin, password admin
  • Navigate to Administration -> Marketplace and make sure the plugins "C (Community)" and "C++ (Community)" are installed

Configuration - General

  • Additional configuration can be done under Administration -> Configuration -> General Settings within the "C (Community)" and "C++ (Community)" areas

Configuration - Quality Profiles

  • You need to enable for which kinds of problems both plugins should scan. This needs to be done initially, as otherwise they will not detect anything by default.
  • Example for C (Community)
    • Go to Quality Profiles, click on the downwards arrow next to the "Sonar way (Built-in)" profile within the "C (Community)" area. Click Copy. Give it a catchy name, like "Sonar way - C"
    • A new quality profile pops up, you see the Rules (Bugs, Vulnerabilities, Code Smells) in the left table. You can click "Activate more". In the next table, you see the rules sorted by the same types. You can click all three types on the left side and mark them this way - if you want and then click on "Bulk Change" and "Activate In "Sonar way - C"" to activate all rules within our newly created Quality Profile. You have to acknowledge the change and SonarQube will report back as soon as the changes are done.
    • You can now navigate back to Quality Profiles, click on the downwards arrow next to the "Sonar way - C" profile within the "C (Community)" area and click on "Set as Default".
    • With this change, your newly created profile will now be used for the next scans.

Prepare first scan of C Code

# must be unique in a given SonarQube instance
sonar.projectKey=TestApplication
# defaults to 'not provided'
#sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Defaults to .
sonar.sources=.
#----- Default SonarQube server
#sonar.host.url=http://localhost:9000
# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
# project is c, please scan with c plugin (one needs to be enabled)
sonar.language=c
# project is c++, please scan with c++ plugin (one needs to be enabled)
#sonar.language=c++

First scan of C Code

  • Open up a shell within the project folder with the sonar-project.properties file
  • Within this shell, execute SonarScanner by starting its sonar-scanner exectubale, e.g. "D:\sonar-scanner-4.5.0.2216-windows\bin\sonar-scanner.bat"
  • The scanner will now work through the project and once its done, send the data to the SonarQube server, where it will be computed and shown as project

More infos

BeagleLogic

To get your Beaglebone Black (BBB) to work as an Logic Analyzer, you can use BeagleLogic:

1.) Download latest version of BeagleLogic
from: https://beaglelogic.readthedocs.io/en/latest/beaglelogic_system_image.html
Released on 2017-07-13, sha256sum = be67e3b8a21c054cd6dcae7c50e9e518492d5d1ddaa83619878afeffe59c99bd
https://goo.gl/RiXGBs

2.) Burn it onto sdcard with Etcher

3.) Put SDCard into BeagleBone Black

4.) Hold "Boot" Button, plug in BBB with Mini USB Cable to your PC

5.) After 10 seconds or so, release "Boot" Button (this will just boot from SDcard with this trick)

6.) Wait some time and login to 192.168.7.2 via SSH
Username: debian
password: temppwd

7.) Test if BeagleLogic works
ls -l /dev/beaglelogic
There should be entry /dev/beaglelogic as answer, if not check the BeagleLogic Website

8.) Change uEnv.txt
sudo vi /boot/uEnv.txt
#go to following lines:
##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

remove # from #cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

#save and exit

9.) Shutdown
sudo shutdown now

10.) Boot again, this time with flasher
Hold "Boot" Button, plug in BBB with Mini USB Cable to your PC, after 10 seconds, release the button.
During the flash process of the eMMC, the 4 leds will make a "Knight Rider" like lightshow.
This will take some minutes. The BBB will shutdown afterwards (all LEDs off).

11.) Remove SDCard, replug Mini USB and boot without holding any buttons

12.) Wait some time and login to 192.168.7.2 via SSH
Username: debian
password: temppwd

13.) Open your webbrowser and go to: http://192.168.7.2:4000/#

Next:
- Upgrade
- this enables you to also use the BeagleLogic as "external analyzer" and control it from i.e. a Window System running a special version of pulseview 🙂
- More infos: https://goo.gl/L9QUrt
Connect to Ethernet / Internet
cd /opt/BeagleLogic/
git config http.sslVerify false
git pull
sudo apt update
sudo ./install.sh --upgrade
sudo reboot now

Useful infos:
https://beagleboard.org/getting-started#update
http://beagleboard.org/latest-images
https://beaglelogic.readthedocs.io/en/latest/beaglelogic_system_image.html
https://beaglelogic.readthedocs.io/en/latest/install.html

[Dell] Using the Update CDs to get Dell Servers to latest firmware

Dell has an very comfortable way of getting new firmware to nearly all of its server components: The bootable media / ISO or Update CDs. You can find them on this website and very useful. On a basic level, you pick your server, download the ISO, compare the MD5 checksum and burn the ISO onto a DVD. After that, you should get the Servicetag of your server and check for BIOS and iDRAC updates - these should be installed manually first. After that, boot from the DVD and let it install all the needed firmware. Basically, the DVD will cycle through all firmware of components ever installed in the series of your particular server and installs updates if needed. After another reboot, you're done :).

Thanks Dell for being so helpful to your users! 🙂

Gitkraken - your next Git Client

If you're in the NetOps/DevOps Teams, chances are high you need to develop code and use git. Well, on Windows Clients, I tended to use Atlassians Source Tree - however, that client became more and more buggy and unstable - unusable to say. Especially if I had to do an really big merge of my main to my deploy tag - it tended to crash most of the time.

So, without further ado: Enter Gitkraken. A nice, free, good looking and fast git client. Without dependencies.

Only downsides: It uses Electron - so it is basically a packaged Node JS server. It is - quite fast, however - and it does not need to install any other dependencies. The other "downside" is, if you want to use more than one GitHub Account, you need to pay for these kind of features.

However, as long as there is no "real" alternative to this product, I will remain using it :).

[Firefox 3.6] XMarks Problem

I have been using XMarks for very long time to synchronize my Bookmarks over all my PCs.
( Even since XMarks has been known as Foxmarks... )
But at some point, I got some really nasty problem:
The "Unsorted Bookmarks" Folder started to get "replicated":
Every sync or so, I got one more.
And more.
And more...
And I never found out why, until now:
I had serval sync profiles (Work, Home, Mobile, etc...) with restricted access to my Bookmarks.
Problem was: My Work PC didn't sync the Unsorted Bookmarks Folder - my other PCs did.
That means: Every time the Work PC did sync and saw the Unsorted Bookmarks Folder, it was "new" to him and without settings and it did download.
Next time, he did "Push" it as new Folder to the Web - not as correct Unsorted Folder, but only as a normal Favorite Folder called like that.
The Other PCs did grab that, create it a new, sync it... and so on -.-'.
Folder Storm or so.
After removing all the trash folders and enabling the Work PC Sync for the Unsorted Bookmarks, I hope it will work out...

Windows 2000 / XP Password Special

So, you logged out of Windows and need to get your password back? Thats for what this little collection is for.

Lets say you need to "crack" an Windows 2000 / XP Password. For i.e. login data. Then you should go for Ophcrack: http://ophcrack.sourceforge.net/

If you just want to login into Windows 2000 / XP / Linux etc. without using or cracking the password with admin rights, go for konboot: http://www.piotrbania.com/all/kon-boot/

And should you stumble across the problem of having forgotten your network drive passwords and login but still have access to Windows and got these pw saved, use Nir Soft Network Password Recovery: http://www.nirsoft.net/utils/network_password_recovery.html

Be advised ONLY to use these programs if they come from the orginal website as other websites do add keyloggers and other nice stuff to them. And only use these tools if you own the pc or have the rights to - check your local law!