How to open Clion straight out of the terminal

How to open Clion straight out of the terminal With the open command in MacOS you can open applications directly from the terminal, if you are a in a certain directory and you would like to open it in clion without starting clion first and then select the directory again, you can just run open -a Clion . 馃槉

November 28, 2019 路 1 min 路 Moritz Gnisia

Create markdown tables in the terminal

Functions are definitely a nice tool in fish to help you work more efficient and utilize them in the daily life. Recently during a lab course one had to describe the function of different cpp-files. As Markdown is the way to comment them in gitlab or github I thought that it might be beneficial to have the possibility to create a markdown table just in the terminal. In fish you can easily write your function or if you are more familiar with bash, just use the latter. A brief description of the script: ...

November 27, 2019 路 1 min 路 Moritz Gnisia

Entering two commands in PyCharm simultaneously

Entering two commands in PyCharm simultaneously When you are working with matplotlib the default workflow is two create first the image itself with plt.plot() and then plt.show(). Those commands are usually entered after each other. However you can also enter them simultaneously by just concatenating them with a semicolon. So you can run plt.show([1,2,3]); plt.show() and the image if you run PyCharm in the scientific mode will popup immediately.

November 15, 2019 路 1 min 路 Moritz Gnisia

Opening PDFs in the same tab in Skim

Opening PDFs in the same tab in Skim Skim is a nice and useful programm for PDF annotations. However if you open multiple PDFs, macOS always opens them in new Skim windows. If you want to change this behavior run the following command: defaults write -app Skim AppleWindowTabbingMode -string always There are different options available and you can find a list here

November 6, 2019 路 1 min 路 Moritz Gnisia

How to use VSCode for writing compiler commands

How to use VSCode for writing compiler commands Simplify writing compiler commands Motivation While learning C/C++ I found that writing the compiler commands for the terminal is tedious job especially if you write many files. To simplify this process you can use the snippets of vscode. Solution The steps are as follows: Open the command palette Enter Configure User Snippet Select the language for which you would like to configure your the snippets, I choose C A .json File will open and you can configure your snippets for all C programms For writing the compiler commands I use the following snippet: "compile_pthread": { "prefix": "comp", "body": [ "$LINE_COMMENT gcc -o $TM_FILENAME_BASE -lpthread $TM_FILENAME && ./$TM_FILENAME_BASE ", ], "description": "Create compiler commands" } With the prefix comp I can write the compiler command for a specific c file. With the variable $LINE_COMMENT I create a line comment, $TM_FILENAME_BASE takes the file name and $TM_FILENAME is the full file name e.g. programm.c. I included the -lpthread option as I currently study parallel programming. ...

September 27, 2019 路 1 min 路 Moritz Gnisia