Books I’m reading at the moment… January 2019

January 7th, 2019

The Chronicles of Thomas Covenant part VI by Stephen R. Donaldson (https://en.wikipedia.org/wiki/The_Chronicles_of_Thomas_Covenant)
So I’ve finished part VI which is somehow an end to the chronicles because (spoiler alert!) at the end of part VI, TC actually dies. Which is unfortunate because it makes me wonder what happends in the parts VII to X… *sigh* – to be continued, I guess

星空を願った狼の by Shiina Takasato (https://ja.wikipedia.org/wiki/%E9%AB%98%E9%87%8C%E6%A4%8E%E5%A5%88)
http://iss.ndl.go.jp/books/R100000002-I026521234-00
50 more pages to go….

Desperation by Stephen King
(https://en.wikipedia.org/wiki/Desperation_(novel))

红豚 by a friend of a co-worker

PADI Tec Deep Diver Manual
Not sure if I will ever do this… but it’s interesting to read about it, at least at the moment.

限りなく透明に近いブルー (https://en.wikipedia.org/wiki/Almost_Transparent_Blue)

Yes, I’m getting spread a little bit but it’ll get better again. And I have a number of other e-books waiting to be read – sci-fi stuff, lots of it.

A slightly cautious “happy 2019”

January 7th, 2019

Ah, well…. another year… I wonder what will happen this year. Anyway, if we’re really to talk about resolutions, I’ve decided to pursue my goals more vehemently although I’m somewhat afraid of the consequences for the people around me.

Nonetheless, to all of you out there: happy 2019, may your dreams come true!

phone number? f*** u, twitter

December 20th, 2018

For some reasons I spent a lot of time recently thinking I would like to try twitter. Probably it’s because there is twitter desktop client availabe in linux distributions… corebird

So I signed up on twitter using my email address. After a couple of days, the account was suspended for “breaking the rules” – which is pretty amazing given that I’ve never twitted anything so far.

the only way to un-suspend the account? (re-animate?) provide a (mobile) phone number. well, fark you… not going to happen.

I’ve tried to find alternatives… there seem to be some but I’m not going to spend time creating fake phone numbers just to try to stay ahead in a game of cats and mice for a short while as twitter seems to be really strict about it and blocking phone number blocks and not allowing this and that.

update: fixed two typos

Books I’m reading at the moment… December 2018

December 2nd, 2018

The Chronicles of Thomas Covenant part IV by Stephen R. Donaldson (https://en.wikipedia.org/wiki/The_Chronicles_of_Thomas_Covenant)

The Chronicles of Thomas Covenant part V by Stephen R. Donaldson (https://en.wikipedia.org/wiki/The_Chronicles_of_Thomas_Covenant)

星空を願った狼の by Shiina Takasato (https://ja.wikipedia.org/wiki/%E9%AB%98%E9%87%8C%E6%A4%8E%E5%A5%88)
http://iss.ndl.go.jp/books/R100000002-I026521234-00
I was reading this previously but lost interest throughout (when I bought it, I was told “it’s funny”… maybe it is not in a terry-prattchet-funny-way). Maybe I’ll make it to the end this time

Desperation by Stephen King
(https://en.wikipedia.org/wiki/Desperation_(novel))

红豚 by a friend of a co-worker… correct name to follow 🙂

American Gods by Neil Gaiman
(https://en.wikipedia.org/wiki/American_Gods)
I picked this up in used books shop. I “know” Neil Gaiman from his collaboration on Good Omens (https://en.wikipedia.org/wiki/Good_Omens) with the late Terry Pratchett. It’s good to hold a physical book in the hand while reading because I mostly read e-books on my tablet, but it’s just not the same.

PADI Tec Deep Diver Manual
Not sure if I will ever do this… but it’s interesting to read about it, at least at the moment.

Books I’m reading at the moment… November 2018

November 3rd, 2018

攻殻機動隊 1.5 Human Error Processor by Masamune Shirow

The Last Ringbearer (https://en.wikipedia.org/wiki/The_Last_Ringbearer)

The Chronicles of Thomas Covenant part III by Stephen R. Donaldson (https://en.wikipedia.org/wiki/The_Chronicles_of_Thomas_Covenant)

The Long Walk by Stephen King / Richard Bachman
(https://en.wikipedia.org/wiki/The_Long_Walk)
I read that book in German as a teenager and I wanted to re-read it to see how it holds up and whether I would discover something new about it.

The Eyes of the Dragon by Stephen King
(https://en.wikipedia.org/wiki/The_eyes_of_the_dragon)
I read this book at around the same time as the Long Walk and it was a nice re-read.

American Gods by Neil Gaiman
(https://en.wikipedia.org/wiki/American_Gods)
I picked this up in used books shop. I “know” Neil Gaiman from his collaboration on Good Omens (https://en.wikipedia.org/wiki/Good_Omens) with the late Terry Pratchett. It’s good to hold a physical book in the hand while reading because I mostly read e-books on my tablet, but it’s just not the same.

PADI Tec Deep Diver Manual
Not sure if I will ever do this… but it’s interesting to read about it, at least at the moment.

潜水士試験:合格

October 11th, 2018

What a mess that was… everything completely in Japanese and out of more than 300 testees, I was the only non-Asian person. Well, I passed and that’s what counts.

Above: I was testee #0047

Looking at the list, most people passed but there were some who failed. Anyway, most people used more or less the same textbooks, I will post mine here later. There does not seem to be so much variety of textbooks on this subject.

Next step: Find employment as part-time scuba diving instructor?

Anyway, time for a celebratory beer…

 

Books I’m reading at the moment… October 2018

October 9th, 2018

A Short History of Nearly Everything by Bill Bryson (https://en.wikipedia.org/wiki/A_Short_History_of_Nearly_Everything) – finished

The Chronicles of Thomas Covenant part I by Stephen R. Donaldson (https://en.wikipedia.org/wiki/The_Chronicles_of_Thomas_Covenant) – finished

攻殻機動隊 1.5 Human Error Processor by Masamune Shirow

The Chronicles of Thomas Covenant part II by Stephen R. Donaldson (https://en.wikipedia.org/wiki/The_Chronicles_of_Thomas_Covenant) – finished

The Last Ringbearer (https://en.wikipedia.org/wiki/The_Last_Ringbearer)

Scientific experiments I’d be interested in (I) – coffee

October 9th, 2018

Recently, I’ve been thinking about some experiments which I can’t do by myself but would very much like to know the results… therefor, a new series on this blog.

First up the question “can you trick the body into reacting to caffeine with a non-caffeinated fluid”?

Evidently, the body reacts to the chemical caffeine when coffee is drunk. What I would like to know is if it’s possible to trigger the same reaction by drinking a non-caffeinated fluid that tastes and looks the same as coffee.

Cons that it’s not possible:
-If the fluid does not contain caffeine, there will be no reaction because it’s a physical reaction triggered by the intake of such a fluid

Pros that it’s possible:
-There is such a thing as a placebo effect
-If you can quicken your beard growth by thinking about sex, why not invoke a bodily reaction to caffeine intake?

Pending further research…

My first self-created course on memrise.com

September 28th, 2018

I’ve been posting about memrise on a couple of occasions. This time rather than bragging how many words I’ve learned and how many points I made, I created my own course:

https://www.memrise.com/course/2053021/qian-shui-shi-shi-yan-nodan-yu/

It’s a Japanese -> English course supposed to help you with vocabulary required to help passing the Japanese dive theory test called 潜水士試験

(I have no idea why the URL uses the Mandarin pinyin pronounciation for the test… I’ve inputted Japanese kanji – I also opened a help call with memrise but no reaction so far)

Creating the course was not difficult but you need to prepare the list(s) ahead and put the colums in the right order if you want to mass-import the lists.

Good luck, give it a try yourself (the course as well as creating your own course ^^)

A script to allow non-admin users to install security updates on CentOS

September 27th, 2018

At work, I needed to come up with a script that allows non-admin users to install security updates on CentOS servers.

The only real dependency is yum-utils (because it uses the binary needs-restart to check the status of things) but you should also create a folder to store the script and of course a sudo command for the users to run.

Please also note the creative accumulation of several copied scripts to create the multiple choice menus…. I patched together some code samples found on the usual websites where coding is discussed.

HTH someone out there…

#!/bin/bash

######################################
## only root can run this (or sudo) ##
######################################

# Make sure only root can run our script
if [[ $EUID -ne 0 ]]; then
echo “This script must be run using sudo (“sudo /opt/yumcleanup/restartsetupscript”) or as root. Exiting…” 1>&2
exit 1
fi

###############
## functions ##
###############

display_help () {
echo “The script can be run without interaction using the following”
echo “command line option: –non-interactive”
echo “This will silently install security updates only and restart”
echo “affected services.”
echo ” ”
echo “Calling the script with –help will also display this help text”
echo “as does calling the script with an unknown option.”
exit
}

set_exports () {
export http_proxy=”http://my.proxy.server.local:11111″
export https_proxy=”http://my.proxy.server.local:11111″
export proxy=”http://my.proxy.server.local:11111″
}

unset_exports () {
unset http_proxy
unset https_proxy
unset proxy
}

outputs_preparation () {
`rm -f $outputs`
touch $outputs
chmod 600 $outputs
}

outputr_preparation () {
`rm -f $outputr`
touch $outputr
chmod 600 $outputr
}

outputs_filling () {
`$mybin -s >> $outputs`
}

outputr_filling () {
`$mybin -r >> $outputr`
}

services_restart () {
while read line
do
# Restarting $line
`/bin/systemctl stop $line`
`/bin/systemctl start $line`
done < $outputs
}

#################
## getopt test ##
#################

getopt –test > /dev/null
if [[ $? -ne 4 ]]; then
echo “I’m sorry, `getopt –test` failed in this environment.”
exit 1
fi

#######################
## setting variables ##
#######################

outputs=/tmp/myoutputs
outputr=/tmp/myoutputr
mybin=/bin/needs-restarting

getopt –test > /dev/null
if [[ $? -ne 4 ]]; then
echo “I’m sorry, `getopt –test` failed in this environment.”
exit 1
fi

LONGOPTIONS=non-interactive,help

PARSED=$(getopt –options=$OPTIONS –longoptions=$LONGOPTIONS –name “$0” — “$@”)
if [[ $? -ne 0 ]]; then
# e.g. $? == 1
# then getopt has complained about wrong arguments to stdout
echo “something wrong, showing help instead in one second”
display_help
exit 2
fi

# echo “$PARSED”

# read getopt’s output this way to handle the quoting right:
eval set — “$PARSED”

# now enjoy the options in order and nicely split until we see —
while true; do
case “$1” in
–non-interactive)
n=y
# echo “doing silent stuff now… TODO: disable this line”
# should do these steps: (probably better to put this in its own function)
set_exports
`yum -y -d0 –security update`
outputs_preparation
outputs_filling
services_restart
unset_exports
exit
shift
;;
–help)
h=y
# echo “displaying help in two seconds”
display_help
shift
;;
–)
#echo “instead of — showing help in three seconds”
#display_help
shift
break
;;
*)
echo “Programming error”
echo “displaying help instead in four seconds”
display_help
exit 3
;;
esac
done

set_exports
#export http_proxy=”http://my.proxy.server.local:11111″
#export https_proxy=”http://my.proxy.server.local:11111″
#export proxy=”http://my.proxy.server.local:11111″

# cleanup before we do anything
#`rm -f $outputs`
#`rm -f $outputr`

# install updates, ask user which type of updating he wants to do
echo “”
echo “Please select the type of updates you want to install: ”
echo “”
PS3=’Enter your choice: ‘
options=(“All updates (will most certainly require a reboot)” “Security updates only (reboot probably not required)” “All updates except kernel and kernel-related packages (reboot might be required)” “Quit (you will need to run the script again later)”)
select opt in “${options[@]}”
do
case $opt in
#”Option 1″)
“All updates (will most certainly require a reboot)”)
echo “Installing all updates… please wait”
`yum -y -d0 update` &
PIDD=`ps -ef|grep yum | grep -v yumclean |grep -v grep | awk ‘{print $2}’`
while sleep 8; do echo “still installing…” && kill -0 $PIDD 2>/dev/null || break; done
break
;;
#”Option 2″)
“Security updates only (reboot probably not required)”)
echo “Installing only security updates…. please wait”
`yum -y -d0 –security update` &
PIDD=`ps -ef|grep yum | grep -v yumclean |grep -v grep | awk ‘{print $2}’`
while sleep 8; do echo “still installing…” && kill -0 $PIDD 2>/dev/null || break; done
break
;;
#”Option 3″)
“All updates except kernel and kernel-related packages (reboot might be required)”)
echo “Installing all updates except kernel and kernel-related packages… please wait”
`yum –exclude=kernel* -y -d0 update` &
PIDD=`ps -ef|grep yum | grep -v yumclean |grep -v grep | awk ‘{print $2}’`
while sleep 8; do echo “still installing…” && kill -0 $PIDD 2>/dev/null || break; done
break
;;
#”Quit”)
“Quit (you will need to run the script again later)”)
echo “Quitting… bye!”
exit
;;
*) echo “invalid option $REPLY”;;
esac
done

unset_exports
#unset http_proxy
#unset https_proxy
#unset proxy

##############################
## section services restart ##
##############################

outputs_preparation
outputs_filling

# `$mybin -s >> $outputs`
# chmod 600 $outputs

if [ `wc -l $outputs | awk ‘{ print $1 }’` -ge 1 ]; then
echo “”
echo “The following services should be restarted:”
echo “******************************”
cat $outputs
echo “******************************”

while true
do
read -p “Do you want to restart the above services? (y/N)” answer

case $answer in
[yY]* ) #
echo “restarting services….”

while read line
do
echo Restarting $line
`/bin/systemctl stop $line`
`/bin/systemctl start $line`
done < $outputs

break;;

[nN]* )echo “exiting…” && break ;;

* ) echo “Please enter Y or N”;;
esac
done
else
echo “******************************”
echo “No services need to be restarted.”
echo “******************************”
fi

# section reboot

outputr_preparation
outputr_filling

# `$mybin -r >> $outputr`
# chmod 600 $outputr

echo “”
echo “Please check the following output and decide whether a reboot is required:”
echo “***************”
cat $outputr
echo “***************”

while true
do
echo “If you need to disable some kind of monitoring before rebooting the server,”
echo “please cancel this script (Ctrl+c) and disable the monitoring now,”
echo “then re-run this script again.”
read -p “Do you want to reboot the server in 60 seconds? (y/N)” answer

case $answer in
[yY]* ) #
echo “Scheduling reboot….”

shutdown -r -t 1

break;;

[nN]* )echo “exiting…” && exit;;

* ) echo “Please enter Y or N”;;
esac
done