The problem: I have a Mac keyboard where the Alt/Win (i.e. Option/Command) keys are inverted compared to a regular PC keyboard, and I’d like to swap them. The answer: And another one which I call when I’m back on a normal keyboard:
After upgrading the kernel to 4.8.13-1-ARCH some of the vmware kernel modules failed to compile: /tmp/modconfig-6BT70S/vmmon-only/linux/hostif.c:1592:47: error: ‘NR_ANON_PAGES’ undeclared (first use in this function) /tmp/modconfig-BBuLH6/vmnet-only/netif.c:468:7: error: ‘struct net_device’ has no member named ‘trans_start’; did you mean ‘mem_start’? The fix:
Ever happened to be focused on something and miss the fact that your laptop is running out of battery? And to lose your work? Yesterday happened twice! “Really? Hmm… I need to fix this as soon as possible.” I googled a bit and this stackexchange post popped up. Nice, great! But being notified even when you’re … Continue reading Be notified when critical battery level is reached→
If you would need to set up your displays once every week or less using the GUI is just fine. I had to do it every morning and after a while it became really annoying. Turn off the HDMI display: Turn on the HDMI display and set it as primary display:
It looks like Marvel is generating some data everyday. Is there a way to reduce the amount of data generated by marvel? The short answer to the above question is Yes! If we want to remove all indices from February 2015:
At this point there are two approaches to achieve this. One is using pt-kill from Percona Toolkit, and the other one is to use a bash script with a lot of pipes :) Why would someone use the second approach? I don’t know, perhaps because there is no Percona Toolkit available. If you can/want to … Continue reading Kill all mysql queries having query time greater than 1 minute→
Recently one machine was swapping. No free space on the swap partition. Hmmm… Since this machine was used as a database server, obviously I suspected mysql. But why to guess when I could knew for sure which process was swapping… Wasn’t mysql but collectd btw :)
It happened many times to need a quick access to the remote console of a server like HP’s ILO and not be able to open a web browser just to access it. So let access it via SSH. Here goes. 2. Enter your ILO admin account and password. After that you will see the ILO prompt. hpILO-> 3. … Continue reading Access HP’s ILO remote console via SSH→
My storage is acting weird today and I’m trying to fix it with this command: And the result was: /dev/vg0/lv0: ***** FILE SYSTEM WAS MODIFIED ***** 6329 inodes used (0.01%, out of 107380736) 44 non-contiguous files (0.7%) 4 non-contiguous directories (0.1%) # of inodes with ind/dind/tind blocks: 0/0/0 Extent depth histogram: 6123/119 86511679 blocks used … Continue reading Check and mark badblocks on ext4 partitions→
At some point I counted my DROP rules in my firewall and the result was kinda frightening. A lot of subnets and even more IPs… What was really annoying was that there were a lot of IP addresses which belonged to an already blocked subnet, so I needed a script to check this for me. … Continue reading Check if an IP is in a subnet→