How Do You Install Erlang on a Linux SUSE Server?

Problem scenario
You want to install Erlang on a Linux SUSE machine. What should you do?

Solution
Run this script with sudo (e.g., sudo bash /tmp/erlang.sh):

# Written by www.continualintegration.com
#/bin/bash

widgetversion=3.0.4

echo “This script can take 20 minutes to complete”

zypper -n install ncurses gcc-c++ autoconf make git python3 bzip2 gtk2 gtk3 gtk2-devel ncurses-utils ncurses-devel
cd /tmp/
curl -Ls https://github.com/wxWidgets/wxWidgets/releases/download/v$widgetversion/wxWidgets-$widgetversion.tar.bz2 /tmp/wxWidgets-$widgetversion.tar.bz2
cp /tmp/wxWidgets-$widgetversion.tar.bz2 /bin/
cd /bin/
bzip2 -d wxWidgets-$widgetversion.tar.bz2
tar -xf wxWidgets-$widgetversion.tar
#cd wxWidgets-$widgetversion

cd /bin/
git clone https://github.com/erlang/otp.git
cd otp
./otp_build autoconf
./configure
echo “This next portion may take 15 minutes”
date /tmp/datetime.txt
make
make install
ln -s /usr/local/lib/erlang/bin/erl /usr/bin/erl
ln -s /usr/local/bin/erlc /usr/bin/erlc
ln -s /etc/alternatives/python3 /usr/bin/python
echo “Script run completed.”
echo ” ”
echo “Many errors above (if there are any) may be ignorable”
echo “try the ‘erl’ command with no quotes to see if Erlang was installed”
echo ‘If you get to a carrot prompt,  » Read more..

How Do You Get Python to Parse Web Pages to Find a String?

Problem scenario
You know a string is buried in a series of web pages. How do you get Python to read the web pages and find the string?

Solution
Change the URLs as you desire. Change the “searchterm” variable assignment to the word of your choice. Then run this Python 3 program:

import re
import requests
listofurls = [‘http://www.continualintegration.com/’, ‘http://www.continualintegration.com/miscellaneous-articles/page/1/’, ‘http://www.continualintegration.com/miscellaneous-articles/page/2/’, ‘http://www.continualintegration.com/miscellaneous-articles/page/3/’,  » Read more..

How Do You Know the Entrenchments in the U.S. Constitution Exist?

Problem scenario
You read that there were two entrenchments in the U.S. Constitution. How do you know that they exist?

Answer
An entrenchment is the placement of something in a trench (according to Merriam-Webster’s Dictionary). This connotes a defensible and protected cavity (e.g., for warfare). Article V of the Constitution explains the entrenchments. Article V describes amending the Constitution,

 » Read more..

How Can a Linux Have a Load above 5 with a High Percentage of CPU Being Idle?

Problem scenario
You are using Linux, and you run top, and you see this:

top – 21:38:04 up 14 days, 12:12, 1 user, load average: 5.30, 5.10, 4.90
Tasks: 54 total, 15 running, 39 sleeping, 0 stopped, 0 zombie
%Cpu(s): 11.7 us, 13.7 sy, 0.0 ni, 74.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st

How can the load average be so high with so much CPU being idle?

 » Read more..

How Do You Back Up Many Emails from a Web-based Email Quickly?

Problem scenario
You want to back up many different emails from a web-based email. You cannot select several and print them all at once. What should you do?

Solution
Prerequisite

This assumes your web-based email can be configured to work with a desktop email client (such as Outlook).

Procedures
Install and configure Thunderbird, Outlook or an email client.

 » Read more..

How Do You Troubleshoot the Error ‘”/usr/share/collectd/types.db” no such file or directory’?

Problem scenario
You are running an aws ssm command. You receive a message about an error when parsing amazon-cloudwatch-agent.toml that also says ‘”/usr/share/collectd/types.db” no such file or directory’. What do you do?

Solution
Install collectd. If you are using a RedHat derivative of Linux (e.g., Fedora or CentOS), run this: sudo yum -y install collectd

 » Read more..