system

Delete git branch both remote and local

30 Apr , 2012  

There are simple way to delete git branch locally and remote.
But first thing to do, you should move from branch that you will delete.
Just checkout master or development branch and start removing git branch.

1
2
3
git checkout <not-branch-name>
git branch -D <branch-name>
git push origin :<branch-name>

To create new github branch that clone from another branch and checkout automatically :

1
2
git checkout -b <new-branch>
git push origin <new-branch>

Simple!

,

configuration

Solve github ssh key Agent admitted failure to sign using the key. Permission denied (publickey).

20 Apr , 2012  

Today, I change my ssh key and I see this error when pushing commit into my Github repository :

1
2
Agent admitted failure to sign using the key.
Permission denied (publickey).

So, to solve this problem is pretty easy :

1
ssh-add ~/.ssh/id_rsa

,

Python module

Solve EnvironmentError: mysql_config not found Mysql-Python pip on Ubuntu

12 Apr , 2012  

If you installing MySQL-python from pip in Ubuntu and see this error :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Downloading/unpacking MySQL-python==1.2.3 (from -r requirements.txt (line 3))
  Downloading MySQL-python-1.2.3.tar.gz (70Kb): 70Kb downloaded
  Running setup.py egg_info for package MySQL-python
    sh: mysql_config: not found
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/home/ubuntu/.virtualenvs/trip/build/MySQL-python/setup.py", line 15, in <module>
        metadata, options = get_config()
      File "setup_posix.py", line 43, in get_config
        libs = mysql_config("libs_r")
      File "setup_posix.py", line 24, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    EnvironmentError: mysql_config not found
    Complete output from command python setup.py egg_info:
    sh: mysql_config: not found

Traceback (most recent call last):

  File "<string>", line 14, in <module>

  File "/home/ubuntu/.virtualenvs/trip/build/MySQL-python/setup.py", line 15, in <module>

    metadata, options = get_config()

  File "setup_posix.py", line 43, in get_config

    libs = mysql_config("libs_r")

  File "setup_posix.py", line 24, in mysql_config

    raise EnvironmentError("%s not found" % (mysql_config.path,))

EnvironmentError: mysql_config not found

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/ubuntu/.virtualenvs/trip/build/MySQL-python
Storing complete log in /home/ubuntu/.pip/pip.log
(trip) ubuntu@ubuntu:~/Tripvillas/tripvillas[yodi]$ pip install -r requirements.txt
Downloading/unpacking git+https://github.com/yuchant/django-mailer.git (from -r requirements.txt (line 11))
  Cloning https://github.com/yuchant/django-mailer.git to /tmp/pip-PUZNs4-build
  Running setup.py egg_info for package from git+https://github.com/yuchant/django-mailer.git
   
Downloading/unpacking http://labix.org/download/python-dateutil/python-dateutil-1.5.tar.gz (from -r requirements.txt (line 26))
  Downloading python-dateutil-1.5.tar.gz (232Kb): 232Kb downloaded
  Running setup.py egg_info for package from http://labix.org/download/python-dateutil/python-dateutil-1.5.tar.gz
   
Downloading/unpacking Django==1.3.1 (from -r requirements.txt (line 2))
  Running setup.py egg_info for package Django
   
Downloading/unpacking MySQL-python==1.2.3 (from -r requirements.txt (line 3))
  Running setup.py egg_info for package MySQL-python
    sh: mysql_config: not found
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
        metadata, options = get_config()
      File "setup_posix.py", line 43, in get_config
        libs = mysql_config("libs_r")
      File "setup_posix.py", line 24, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    EnvironmentError: mysql_config not found
    Complete output from command python setup.py egg_info:
    sh: mysql_config: not found

Traceback (most recent call last):

  File "<string>", line 14, in <module>
    metadata, options = get_config()

  File "setup_posix.py", line 43, in get_config

    libs = mysql_config("libs_r")

  File "setup_posix.py", line 24, in mysql_config

    raise EnvironmentError("%s not found" % (mysql_config.path,))

EnvironmentError: mysql_config not found

----------------------------------------

This mean you should install libmysqlclient-dev. On Ubuntu 11.10 Oneiric :

1
sudo apt-get install libmysqlclient-dev libmysqlclient-dev libmysqlclient16

configuration

How to solve problem HFSplus OS X partition sharing as home partition in Ubuntu

7 Apr , 2012  

I have dual-OS in my Macbook Pro, OS X Leopard and Ubuntu Oneiric. I want to share partition between OS X and Ubuntu. I use hfplus partition (without journaled) as user home in Ubuntu Oneiric. Then the problem begin.

When I adding launcher in Desktop (Ubuntu), it can’t be executed and throw error :

1
the application launcher ".desktop" has not been marked as trusted. if you do not know the source of this file, launching it may be unsafe.

After finding several articles, I try to change UID in this partition (/dev/sda3) into 501 :
http://ubuntuforums.org/showthread.php?t=1751009.

But it still doesn’t works. Using “chmod a+x” on *.desktop, chown ubuntu:ubuntu, allow permission in properties and another tricks giving no results.
More…

,