Aikataulu – Linux palvelimet ict4tn021-3010 torstai aamu – alkukevät 2020 – 5 op

English: Learn to manage your own Linux server – in 8 weeks. Beginners welcome. Student feedback excellent 4.7 out of 5. Course is in Finnish.

Posted in Courses | Tagged , , , , , , , , , , , , , , , | Comments Off on Aikataulu – Linux palvelimet ict4tn021-3010 torstai aamu – alkukevät 2020 – 5 op

Automatically Provision Vagrant Virtual Machines as Salt Slaves

Create a new, fully configured virtual computer in less than a minute. Keep configuration in version control. Manage trough configuration management system.

Posted in Uncategorized | Tagged , , , , , | Comments Off on Automatically Provision Vagrant Virtual Machines as Salt Slaves

Hello World Python3, Bash, C, C++, Go, Lua, Ruby, Java – Programming Languages on Ubuntu 18.04

Hello world! All programs start with a hello world. It tests that your environment is working, so that you can run your code. This is how you install and run the most important languages on Linux: Python 3, Bash, C, … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , | Comments Off on Hello World Python3, Bash, C, C++, Go, Lua, Ruby, Java – Programming Languages on Ubuntu 18.04

CPU Usage Percent – Python One-Liner for Load Average per CPU

Processor usage is 88%. But how do I get a number like this? For gurus, this Python one-liner prints CPU usage $ python3 -c “print(‘{:.0f}%’.format( float(‘$(cat /proc/loadavg)’.split()[0]) / float(‘$(nproc)’)*100 ) )” 12% The rest of us can read on how … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , | Comments Off on CPU Usage Percent – Python One-Liner for Load Average per CPU

Send Email with HTTP API – curl, ctrl-X E and Sendgrid API

Use interactive console and HTTP requests to access APIs. Here is an example of automatic mail sending with SendGrid and curl.

Posted in Uncategorized | Tagged , , , , | Comments Off on Send Email with HTTP API – curl, ctrl-X E and Sendgrid API

Short Bash prompt – export PS1="\W\$ "

You can have a nice, deep directory stucture – and still keep your prompt short and tidy.

Posted in Uncategorized | Tagged , , | Comments Off on Short Bash prompt – export PS1="\W\$ "

Shell Scripting

Table of Contents Shell Scripting Hello world – lspwd See also Shell Scripting Shell scripting automates repeating actions. It is reliable, used in server startup scripts in Linux. It is fast to use, simply write the same commands as you … Continue reading

Posted in Old Site | Tagged , , , | 3 Comments

aboutusers

  #!/bin/bash # aboutusers – print information about human users # (Actually a bash shell scripting example program) # (c) 2006-03-06 Tero Karvinen www.iki.fi/karvinen # GNU General Public License version 2   for DIR in /home/* do USER=$(basename $DIR); echo … Continue reading

Posted in Old Site | Tagged , , , | 1 Comment