Linux Unity Spacebar Not Working Fix

If you have a game that uses Unity Engine like Immortal Redneck or Sundered, just to name 2 examples, and use multiple keyboards layouts in KDE5 ( not tested on other Desktop Environments ), you probably have noticed that the spacebar sometimes doesn’t work.
 
For mysterious reason, if you start the game with the secondary keyboard layout it doesn’t reconize some keys, so the fix is simple and somewhat effective, but you don’t find much information on the interwebs if you don’t know exactly what you are looking for, just change to the default keyboard layout before starting the game and voila.
 

Sources:

https://steamcommunity.com/app/510490/discussions/0/1694922980039139214/
https://bbs.archlinux.org/viewtopic.php?id=233050

Get Current ILo IP address without reboot

If you have ‘hponcfg’ installed and need to get the current ILo ip you can do it by running:


hponcfg -a -w /tmp/ilo.xml > /dev/null;egrep "<IP_ADDRESS VALUE=" /tmp/ilo.xml | cut -d '"' -f2;rm /tmp/ilo.xml

 
It will print a nice line with the current ILo ip of the local machine.

Sources:

https://community.hpe.com/t5/ProLiant-Servers-ML-DL-SL/how-to-obtain-iLO-IP-from-OS-without-reboot/td-p/5333543
https://community.hpe.com/hpeb/attachments/hpeb/itrc-298/3437/1/301692.pdf

Bad Idea of the day, Compiling PHP-52 for Debian 8

Sometimes you have to test a bad idea, or you just don’t want/can’t to let that 10+ years old ugly and unmaintained project die no matter what, and for that you might have to use a EOL unsupported PHP version

First install the necessary build tools, some of which you may not need:

apt-get install -y autoconf2.13 libbz2-dev libcurl4-openssl-dev libltdl-dev libmcrypt-dev libevent-dev libmhash-dev libmysqlclient-dev libpcre3-dev libpng12-dev libxml2-dev make patch xmlstarlet make patch libssl-dev libssl1.0.0

Continue reading “Bad Idea of the day, Compiling PHP-52 for Debian 8”

Bad Idea of the day, Disable Secure Repository check APT

Sometimes you are trying to install stuff from a really ancient repository that sometimes don’t have the necessary security functions in place, looking at you ‘HP Software Delivery Repository for mcp’, while this is generally a bad idea you can force apt to ignore the safety checks, and what could possibly wrong by doing it :), by appending “-o Acquire::Check-Valid-Until=false -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true” at the end of your apt command.
 

apt update -o Acquire::Check-Valid-Until=false -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true

Continue reading “Bad Idea of the day, Disable Secure Repository check APT”

Debian non-free firmware netinst ISOs

The latest images are always found at the link, it’s name should be something like “firmware-?.?.?-amd64-netinst.iso”:

http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current/amd64/iso-cd/

In case you happen to need an older version of the boot image, you can search for the specific version that you need on this link:

http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/archive/

Install php7.2 CentOS 6.X and 7.X

As PHP versions 5.6 and 7.0 reach End Of Life you might want to update to something newer and supported, unfortunately the official CentOS repositories don’t have PHP versions 7.1 or 7.2 yet, but with a third-party repository and a bit of fiddling it’s easy to update, and more importantly keep it updated, your server PHP version.
 
Just run as root:
Continue reading “Install php7.2 CentOS 6.X and 7.X”

Install php7.2 Debian Stretch

As PHP versions 5.6 and 7.0 reach End Of Life you might want to update to something newer and supported, unfortunately the official Debian Stretch repositories don’t have PHP versions 7.1 or 7.2 yet, but with a third-party repository and a bit of fiddling it’s easy to update, and more importantly keep it updated, your server PHP version.
 

Just run as root:
Continue reading “Install php7.2 Debian Stretch”

AWS S3 Backup Guide 2, aws-cli

If you already have aws-cli installed and want to send a file to Amazon S3 it’s really easy:

aws s3 cp ARCHIVE_TO_SEND s3://BUCKET_NAME/ARCHIVE_TO_SEND

 

Sending files ‘by hand’ is all good, but if you are serious about backups you need to automate the process, here is a quick and dirty backup script.
It lists, tars, bzips and individually uploads all the directories under the path you specify o the script.
 
You just need to set the variables at lines 5, 6, 7 and 8.
Continue reading “AWS S3 Backup Guide 2, aws-cli”

AWS S3 Backup guide 1, bash script

If you don’t have ( or don’t want ) aws-cli installed you can upload files under 5gb with the following script:

#!/bin/bash
# Size limit of 5gb, if you need to upload a bigger file use AWS Cli tools
# $1 Must be the full path of the file
file=$(basename $1)

# S3 authentication information
bucket="<NameOfTheAwsBucket>"
s3Key=""<AWSAccessUser>"
s3Secret="<AWSAccessKey>"
awspath=s3.amazonaws.com
resource="/${bucket}/${file}"

# as we are uploading a backup the need to be a tar archive
contentType="application/x-compressed-tar"
dateValue=$(date -R)
stringToSign="PUT\n\n${contentType}\n${dateValue}\n${resource}"


# Signature magic :)
signature=$(echo -en ${stringToSign} | openssl sha1 -hmac ${s3Secret} -binary | base64)

curl -X PUT -T "${file}" -H "Host: ${bucket}.s3.amazonaws.com" -H "Date: ${dateValue}" -H "Content-Type: ${contentType}" -H "Authorization: AWS ${s3Key}:${signature}" https://${bucket}.${awspath}/${file}

 
Continue reading “AWS S3 Backup guide 1, bash script”