January 30, 2011

 

how is this possible?

[root@localhost .ssh]# sudo -u shamil whoami
shamil
[root@localhost .ssh]# sudo -u shamil echo `whoami`
root

January 28, 2011

 

android dev: '?????? no permissions' trying to deploy to samsung galaxy tab

--
Update: this works until device disconnect only. After reconnect IDE could hang up :-)
Update: added string for HTC Desire Z
--
Ubuntu 10.04/android sdk 7(9? where the f%%k is sdk version? no version in readme! opensource sometimes is such an opensource.)

When you see such f%%% sh%%%:
./adb devices
List of devices attached
???????????? no permissions


To be able to deploy to samsung galaxy tab do the following:
1) create new file (51 is just some number below 99):
sudo vi /etc/udev/rules.d/51-android.rules
and put there:
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"

04e8 is samsung id
18d1 is for HTC Desire Z
2) restart adb daemon:
sudo ./adb kill-server
sudo ./adb devices
you now should see this:
* daemon not running. starting it now on port NNNN *
* daemon started successfully *
List of devices attached
10001c18352d device

If above still doesn't help add more detailed description for usb device in 51-android.rules like this

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0c91", MODE="0666"

here 0c91 is the HTC Desire Z product id. You can watch these details using 'lsusb' command:

Bus 002 Device 011: ID 0bb4:0c91 High Tech Computer Corp.

Labels: , , , , , , , , , ,

January 14, 2011

 

mysql config bind local replace script

AS IS! No guarantee.

-- bind-local-replace.sh
#!/bin/bash
sed -e '/^bind[-]address*/ s/^/#/' | sed '/[[]mysql[]]/a \
bind-address=127.0.0.1
'


--
Usage:
./bind-local-replace.sh < /etc/my.cnf > /tmp/my.cnf

and then manually check and then copy:
cp /tmp/my.cnf /etc/my.cnf

Labels: , , , ,

This page is powered by Blogger. Isn't yours?