I needed to get some quick random numbers that would represent a time on the form HH:SS. In my case the time should be between 10:00 and 12:55. I did this in bash with:
# If the random number is 1, then LAST-number is set to 0.
# Else it would be set to 5.
if [ $(( $RANDOM % 2 )) -eq 1 ];then
# Print a number between 10 or 12,
# then a semicolon, then a number between 0-5,
# and finally either 0 or 5.
echo "0"$(( $RANDOM % 2 + 10 ))":"$(( $RANDOM % 6 ))$LAST
We have a Postgresql server open to many different people at our organization. In order to add a ldap authentication you can add these 3 lines to your current pg_hba.conf file:
host all username 127.0.0.1/32 ldap ldapserver="ourserver.uib.no" ldapbasedn="ou=people,dc=uib,dc=no"
host all username 129.177.XXX.YYY/32 ldap ldapserver="ourserver.uib.no" ldapbasedn="ou=people,dc=uib,dc=no"
local all username ldap ldapserver="ourserver.uib.no" ldapbasedn="ou=people,dc=uib,dc=no"
where the first one will allow users that access the server from localhost (either from a shell or 127.0.0.1 connections). The second line […]
Today I learned never to use an email list containg many email addresses in a From header when sending an email, unless absolutely necessary. You can guess why.
I have Linux Mint installed on my computer, and made several movies with Kdenlive. Works quite well. Here is a video about Kdenlive… And this is also interesting: http://on.aol.com/video/how-to-overlay-text-in-kdenlive-161786395
I wanted to know how many A4 pages I would have to print on a printer, if I wanted to print all the articles in a Mediawiki installation. We have a Mediawiki installation with a total number of 1,418 content pages. I already managed to export all the articles to their respective PDF files. This […]
We had to rewrite some specific domain names in our WordPress multisite. Most of our domains are on this form: something.w.uib.no In our case that is nice, because we also have a valid ssl certificate which supports *.w.uib.no. But in addition we have other domain names on the form: something.uib.no which we don’t have a […]
Here at the University of Bergen (UiB) we have an archive that we call Bergen Open Research Archive, short: BORA The adress is: https://bora.uib.no It is run with DSpace in a Tomcat context, with Apache frontend with reverse proxy, and backend database Postgresql. Everything on a Redhat Enterprise Linux Redhat 6 server. More about DSpace […]
If you are thinking of creating a PDF file from all your posts in your WordPress blog, you can try this: First, use the Tools – Export to create a xml file. Save it. Then go to: http://blogbooker.com/wordpress.php Upload your xml file, and Blogbooker will create it, and you can download the result afterwards. Here […]
Someone asked me how they could make a “copy” of their existing blog. This is easy if you use WordPress export and import. Here at University of Bergen, people can create their own blogs at: https://w.uib.no/sso/ After creating the new blog, then posts, pages and other stuff can be exportet from the old one under […]
If you don’t want to have comments from people and potential spammers, you can remove the comments from all your pages. Here is how to: Go to admin Dashboard >> Pages. Select All at the top of the listings. Bulk Actions >> Edit >> Apply When the options box appears, choose Comments >> Do Not […]