React ES5 to ES6: props and state

Developing with React and ES5, state on a Component is configured using the getInitialState() function:

var ButtonComponent = React.createClass({

  getInitialState : function(){
    return({
      value1: this.props.value1,
      value2: this.props.value2
    });
 },

...

});

If you’re moving from ES5 TO ES6 and creating React components using ES6 classes, if you try to follow the same approach you’ll see an error like this:

To set the initial state on an ES6 React class, you establish it in the constructor like this:

constructor(props) {
  super(props);
  this.state = {
    value1 : this.props.value1,
    value2 : this.props.value2,
  };
 }

 

RT73 wifi driver on Debian 8 completely filled my hard disk with syslog messages

Just installed Debian Hamradio Pure Blend, and I thought a 20GB partition for / would be plenty, but after a day I was getting disk full errors. So I shrunk my /home partition and extended my / partition up to 50GB. A day later it was at 100% again (I had just deleted some log file files to free up some space):

kev@kh-debian:/var/log$ df -h

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda9        58G   53G  2.5G  96% /
/dev/sda10       20G  279M   19G   2% /home

Guessing something was up, I cd’d into /var/log to see what was showing up in my log files and was surprised to see this:

kev@kh-debian:/var/log$ ls -lS

total 49743852

-rw-r----- 1 root              adm  15123453253 Dec 24 18:37 syslog
-rw-r----- 1 root              adm  13204397200 Dec 24 18:37 kern.log
-rw-r----- 1 root              adm  12416440518 Dec 24 18:37 daemon.log
-rw-r----- 1 root              adm  10053382069 Dec 24 18:37 messages
-rw-r----- 1 root              adm    139506083 Dec 23 07:04 syslog.2.gz
-rw-rw-r-- 1 root              utmp      292292 Dec 24 18:33 lastlog

Ok, ok. That’s where my disk space has gone.

Looking in syslog, I’ve got these messages repeating about 100 times a second:

Dec 24 18:55:01 kh-debian wpa_supplicant[862]: wlan0: Failed to initialize driver interface
Dec 24 18:55:01 kh-debian NetworkManager[696]: <error> [1482634501.576472] [supplicant-manager/nm-supplicant-interface.c:856] interface_add_cb(): (wlan0): error adding interface: wpa_supplicant couldn't grab this interface.
Dec 24 18:55:01 kh-debian NetworkManager[696]: <info> (wlan0): supplicant interface state: starting -> down
Dec 24 18:55:01 kh-debian kernel: [ 2026.757616] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt73.bin'
Dec 24 18:55:01 kh-debian kernel: [ 2026.757646] rt73usb 1-7:1.0: firmware: failed to load rt73.bin (-2)
Dec 24 18:55:01 kh-debian kernel: [ 2026.757652] rt73usb 1-7:1.0: Direct firmware load failed with error -2
Dec 24 18:55:01 kh-debian kernel: [ 2026.757656] rt73usb 1-7:1.0: Falling back to user helper
Dec 24 18:55:01 kh-debian wpa_supplicant[862]: Could not set interface wlan0 flags (UP): Cannot allocate memory
Dec 24 18:55:01 kh-debian wpa_supplicant[862]: nl80211: Could not set interface 'wlan0' UP

 Following the install instructions here: https://wiki.debian.org/WiFi/rt73 – and then rebooted, problem solved. Log messages gone.

Getting USB thumb drives to work with PS4’s Media Player

Quick answer: make sure the thumb drive is formatted using a Master Boot Record (MBR) partition in either FAT32 or ExFAT format. The MBR partition format is key.

If formatting a device on a Mac, the default partitioning uses a GUID Partition Map. Make sure you change this to Master Boot Record and you’ll be all set.

More discussion in these posts:

http://community.us.playstation.com/t5/Games-Services/PS4-Media-Player-Not-Reading-any-files-on-USB/td-p/45224287

Why Can’t PS4 Media Player Read My Drive? (Yes I’ve tried the Obvious Stuff)
by inPS4