bash

Cron every last Friday of month

Posted on

We wanted to run a script every last Friday of the month. The script was set to remind people about certain issues. Friday is a nice day to be reminded of things, right? Anyway, by putting this in the /etc/crontab file, one can achieve the request: 59 11 * * 5 username [ $(date +”\%m”) […]

bash

Downgrade to previous version: yum

Posted on

Sometime yum update just breaks everything. We experienced this, and had to go backup to previous versions. In RHEL6 and RHEL7 you can run this command:

which will give you a list of transactions ID’s. Now you just need to figure out how far you want to go back in the history, and do […]

Virtual server

Missing

Posted on

I had a Ubuntu version 16 running in a virtualbox, and wanted copy text from host to the virtual machine. But it didn’t work. It turns out you need to install the Guest Additions CD image. There is an option from the Devices -> Insert guest additions CD image, but I got then this error […]

Wordpress

Changing your theme

Posted on

Sometimes you just want to make smaller changes to your theme, it might be a logo that should be different, or a background color. Some themes doesn’t allow you to do this under Appearance – Customize, only in their PRO version. You could do it by altering the themes files, but if you are runnuing […]

bash

Convert multiple files from latin1 to utf8 with vim

Posted on

If you have several files that need to be converted to utf8, you can do it with vim. First start vim with:

Which will find all .htm and .html files from the current directory. Then in vim, use : to go into command mode. Run these two commands: :set nomore :bufdo set fileencoding=utf8 | […]

bash

Use Curl to read your imap emails

Posted on

You can use the bash command “curl” to read your imap emails like this:

Note: your password will be visible on the command line, so don’t use this on a public server. So it is actually better to create a file, for instance called secret, then write your password in it, and protect it […]

Uncategorized

Searching and writing

Posted on

How to do a good scientific search, and manage to write something that people will believe in? Here is a informational website that you should look into, it is really informative, and it will prepare and help you to write in an academic way so that people can understand. http://sokogskriv.no Good luck!