Monthly Archives: September 2016

Setting up xdebug on scotch box/vagrant on Arch linux

Install Vagrant

sudo pacman -S vagrant

To install virtualbox

mkdir works

git clone https://github.com/scotch-io/scotch-box.git works

cd works

vagrant up

install sublime 3

install package control on sublime 3

http://packagecontrol.io/installation

install openssh

vagrant ssh
sudo apt-get update
sudo apt-get -y install php5-dev php-pear build-essential
sudo pecl install xdebug

copy the xdebug.so location
you can also find it with find / -name ‘xdebug.so’

/usr/lib/php5/20131226/xdebug.so

in /etc/php5/apache2/php.ini

;;;;;;;;;;;;;;;;;;;;;;;;;
; Added to enable Xdebug ;
;;;;;;;;;;;;;;;;;;;;;;;;;;
;
zend_extension="[enter path here]"
xdebug.default_enable=1
xdebug.idekey="sublime.xdebug"
xdebug.remote_enable=1
xdebug.remote_autostart=0
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_host=10.0.2.2 ; IDE-Environments IP, from vagrant box.
;

sudo service php5-fpm restart
sudo service apache2 restart

refresh phpinfo to check xdebug

in sublime -> tools -> command pallete

install package

xdebug client

Project -> Save project as

works.sublime-project
{
"folders":
[
{
"path": "/home/username/works/public"
}
],
"settings": {
"xdebug": {
"url": "http://192.168.33.10/",
"port": 9000,
"path_mapping": {"/var/www/public/" : "/home/username/works/public/"},
"super_globals": true,
"close_on_stop": true
}
}
}

Fixing Sony MDR-XB400

Recently I sat on a Sony MDR XB400 Stereo Headphone. One side of the headphone popped out of the socket.

SonyMDRXB400-Broken1

Below are the steps to fix the issue.

Wedge a screw driver below the silver cap and push to remove the silver cap.

SonyMDRXB400-Broken2

A screw will be visible. Remove the screw.

SonyMDRXB400-Broken4

Put the pieces apart

SonyMDRXB400-Broken5

Wedge the screwdriver at the base of the holder to remove the cap.

SonyMDRXB400-Broken6

Here is the cap is removed.

SonyMDRXB400-Broken7

Once the cover is removed, slide the holder onto the headband.

SonyMDRXB400-Broken8

Stick things back and screw it tightly.

SonyMDRXB400-Broken3

Replace the silver cap back.

One thing to keep in mind is to keep the wires straight, you don’t want them looping.