Setting up IR Reciever for XBMC on the Raspberry Pi

I pulled a no name brand, unmarked IR Receiver out of an old set top box that no longer worked. I took a guess at the pin out and was successful on the first go. The device is a 3 pin device. Pin layout pin 1 - Output pin 2 - Gnd pin 3 - Vcc ir-receiver-labels I initial hooked it up to the 3.3V line on the RPi but noticed it being quite flaky. Changed to the 5V pin an all good. gpio_pinout_diagram pin 1 IR --> Pi GPIO pin 2 (5V) pin 2 IR --> Pi GPIO pin 6 (GND) pin 3 IR --> Pi GPIO pin 12 (GPIO 18) Once it's all hooked up we need to setup XBMC and train a new remote. The interface between the hardware and the Raspberry Pi media centre is managed by a piece of software called LIRC (Linux Infrared Remote Control). To train your remote you will need SSH access to your Pi. Make sure you have disabled the "GPIO TSOP IR Receiver" option in XBMC as it will not allow you to use LIRC from SSH. SSH to your Pi and issue the following commands:
sudo modprobe lirc_rpi
sudo kill $(pidof lircd)
mode2 -d /dev/lirc0
Now hold the remote in front of the receiver and you should see a series of 'pulse' / 'space' messages appear each time you press a button. Lets setup LIRC to start on startup and to train your remote. The LIRC package provides a configuration file, /etc/lirc/hardware.conf
# /etc/lirc/hardware.conf
# Arguments which will be used when launching lircd
#Don't start lircmd even if there seems to be a good config file
#Don't start irexec, even if a good config file seems to exist.
#Try to load appropriate kernel modules
# Run "lircd --driver=help" for a list of supported drivers.
# usually /dev/lirc0 is the correct setting for systems using udev
# Default configuration files for your hardware if any
This will cause the lirc init script (/etc/init.d/lirc) to automatically insert the relevant kernel module (lirc_rpi), and launch lircd with the correct arguments (--driver=default --device=/dev/lirc0 --uinput) every time the RPi boots. To configure the remote, stop lirc and use the irrecord command to generate a configuration file:
/etc/init.d/lirc stop
First off get a list of valid buttons that lirc can map.
irrecord --list-namespace > ~/buttonmap.txt
You can browse the file ~/buttonmap.txt to see what 'keys' are available. Now run the irrecord command and follow the prompts.
irrecord -d /dev/lirc0 ~/lircd.conf
When training your remote follow the instructions carefully. Once you have mapped all your keys you can return to the Rasbmc Settings program and enable the option "Enable GPIO TSOP IR Receiver". At the same time, change the GPIO Remote Profile to "Custom (lircd.conf on pi's home folder)". Reboot your Pi and you should now have control of you Pi from your IR remote.

MikroTik: Netflow Interface numbers

This code will give you the internal in hexadecimal form.
{ :foreach i in=[/interface find] do={:put ($i.": ".[/interface get $i name]) }}

What is ADSL SNR, DB and Loop Attenuation mean?

SNR is Signal to Noise Ratio (aka Noise Margin or Signal to Noise Margin) Relative strength of the DSL signal to Noise ratio. 6dB is the lowest dB manufactures specify for modem to be able to synch. In some instances interleaving can help raise the noise margin to an acceptable level. The higher the number the better for this measurement. 6dB or below is bad and will experience no synch or intermittent synch problems 7dB-10dB is fair but does not leave much room for variances in conditions 11dB-20dB is good with no synch problems 20dB-28dB is excellent 29dB or above is outstanding Loop Att. is Line Attenuation Measure of how much the signal has degraded between the DSLAM and the modem. Maximum signal loss recommendation is usually about 60dB. The lower the dB the better for this measurement. 20dB and below is outstanding 20dB-30dB is excellent 30dB-40dB is very good 40dB-50dB is good 50dB-60dB is poor and may experience connectivity issues 60dB or above is bad and will experience connectivity issues Output Power How much power modem (upstream) or DSLAM (downstream) is using. Maximum recommended is about 15dB. The lower the power the better for this measurement.

Reset MySQL Slave Settings

For MySQL 5.0 and 5.1, run STOP SLAVE, CHANGE MASTER TO MASTER_HOST='' and then RESET SLAVE. For MySQL 5.5 and 5.6, run STOP SLAVE and then RESET SLAVE ALL. For all versions, DO NOT USE master-user, master-host and master-password settings in my.cnf/my.ini, this may cause huge problems (it’s no longer supported from MySQL 5.5 onwards). MySQL 5.0/5.1
mysql> stop slave;
Query OK, 0 rows affected (0.00 sec)
mysql> change master to master_host='';
Query OK, 0 rows affected (0.02 sec)
mysql> reset slave;
Query OK, 0 rows affected (0.04 sec)
mysql> show slave status\G
Empty set (0.00 sec)
MySQL 5.5+
mysql> stop slave;
Query OK, 0 rows affected (0,00 sec)
mysql> reset slave all;
Query OK, 0 rows affected (0,04 sec)
mysql> show slave status\G
Empty set (0,00 sec)
If you wish to stop a slave from starting it's slave threads on start up add the following to your my.cnf/my.ini (you can still start the slave via a start slave with this in place)