Thursday, July 31, 2014

CentOS: missing repo

If you get this error with yum:
yum install ...
Error: Cannot find a valid baseurl for repo: base
Then:
vi /etc/yum.repos.d/CentOS-Base.repo
and add
baseurl=http://vault.centos.org/6.3/os/i386/
given that 6.3 is your CentOS version

Thursday, July 24, 2014

CentOS / VirtualBox: copy paste shit from/to Windows and urxvt

#! /usr/bin/perl

sub on_sel_grab {
    my $query = quotemeta $_[0]->selection;
    $query =~ s/\n/\\n/g;
    $query =~ s/\r/\\r/g;
    system( "echo -en " . $query . " | xsel -ibp" );
}
I called it clipboard, saved it to /usr/lib64/urxvt/perl/, and enabled in ~/.Xdefaults:
urxvt*perl-ext-common:      default,matcher,clipboard

Thursday, July 10, 2014

Perl: Epoch to date

perl -e 'print scalar gmtime 1404982047'
Thu Jul 10 08:47:27 2014

Monday, July 7, 2014

Set up Word 2010 / 2013 styles

If when re-opeing your doc, Word decided to turn your existing styles into shit (e.g. 3.4 became 1.49), start all the way from the start:
  • Enable Developer menu: File | Options | Customize Ribbon then tick the Developer checkbox in the right hand side list
  • Then in the new Developer menu, push the Document Template button, and untick the Automatically update document styles checkbox
  • Then follow this tutorial: How to create numbered headings or outline numbering in Word

Friday, July 4, 2014

Blocked loading mixed active content

A workaroung in FF is:
Go to about:config
and
security.mixed_content.block_active_content = false