OS X Terminal text stacking on top of itself

PS1 environment variable determines what shell’s prompt will look like. man bash gives full documentation on it. (There are actually several of them, for different modes). There are number of files that may be setting it, usually one of ~/.profile, ~/.bashrc, /etc/profile or /etc/bashrc. If you’re going to have color codes or other control sequences … Read more

Maven home (M2_HOME) not being picked up by IntelliJ IDEA

type in Terminal: $ mvn –version then get following result: Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 16:51:28+0300) Maven home: /opt/local/share/java/maven3 Java version: 1.6.0_65, vendor: Apple Inc. Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Default locale: ru_RU, platform encoding: MacCyrillic OS name: “mac os x”, version: “10.9.4”, arch: “x86_64”, family: “mac” here in second line we have: Maven home: /opt/local/share/java/maven3 type … Read more

Drop database return “Error dropping database errno: 66” in MySQL

mysql> drop database DB_NAME; ERROR 1010 (HY000): Error dropping database (can’t rmdir ‘./DB_NAME’, errno: 66) Find the database directory: mysql -e “select @@datadir” -> /usr/local/mysql/data/ Go to the DataBase folder: cd /usr/local/mysql/data/ Delete DB folder of the DB with the issue (in this case: sudo rm -rf DB_NAME)

How to solve Xcode 4.1 (LION) GPS error?

Xcode 4.2 solved this problem adding custom gps position! The file is an XML like this: <?xml version=”1.0″?> <gpx version=”1.1″ creator=”Xcode”> <wpt lat=”45,49939″ lon=”9,12114″> <name>Milano</name> </wpt> </gpx> you can add this file in your project or New->File->GPX. While you’re running your app, activate the console and select your custom position file: it’s all. enjoy.

Installing Sublime Text’s command line tool ‘subl’ in terminal, permission denied?

I am assuming that you don’t have the bin directory. You can do the following: cd mkdir bin sudo ln -s “/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl” ~/bin/subl ln -s will create a alias of the subl file in your bin directory and you will be able to run the command. If this still doesn’t work you will … Read more

How do you get php working on Mac OS X?

(Edit: This method appears to work fine for 10.9 (Mavericks), 10.10 (Yosemite) and 10.11 (El Capitan), so I figured I’d mention that for any new influx of slightly frustrated OS X updaters 😀 ) Edit your /etc/apache2/httpd.conf and make sure the line: LoadModule php5_module libexec/apache2/libphp5.so …exists. I think it’s commented out by default in the … Read more