Why does vi behave differently in Ubuntu than in CentOS?
Question I've been getting more and more comfortable using vi on a daily basis, but one thing that bothers me is that when I use it on Ubuntu it behaves differently than when I use it on CentOS (and probably other places). I actually prefer the way it works in CentOS.
Here are three things that are really bothering me on Ubuntu:
In CentOS insert mode there is a big bold notice at the bottom that I'm in INSERT mode, but in Ubuntu there is no notice so I can never tell which mode I'm in.…
Read more ⟶Android/Eclipse Installation on Ubuntu 11.04 - aapt and adb not working properly
Question I am a Linux n00b trying to setup my development environment in Eclipse. I have Eclipse and the Android SDK installed, but I am getting some errors when I start Eclipse or when I try to run ./aapt or ./adb. jason@ubuntu:~/usr/android-sdk-linux_x86/platform-tools$ ./aapt
./aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
jason@ubuntu:~/usr/android-sdk-linux_x86/platform-tools$ ./adb ./adb: error while loading shared libraries: libncurses.so.5: wrong ELF class: ELFCLASS64 That ELF class error makes me think I installed a wrong version of the software but I do not recall being asked to choose between x86 and x86-64.…
Read more ⟶docker-compose INTERNAL ERROR: cannot create temporary directory
Question Am trying to use docker-compose command and bring up container. But am facing error INTERNAL ERROR: cannot create temporary directory!. Am not able to pull, stop, rm or UP and container. Can anyone suggest how to resolve this?
Answer I was suffering from the same issue. It turned out that I'd ran out of Disk Space.
All I needed to do was clear down the old containers and images by running the below commands.…
Read more ⟶where does django install in ubuntu
Question I am looking for the init.py file for django. I tried whereis and find, but I get a lot of dirs.
Answer you can just print it out.
>>> import django
>>> print django.__file__
/var/lib/python-support/python2.5/django/__init__.pyc
>>>
or:
import inspect
import django
print inspect.getabsfile(django)
…
Read more ⟶diff command to get number of different lines only
Question Can I use the diff command to find out how many lines do two files differ in?
I don't want the contextual difference, just the total number of lines that are different between two files. Best if the result is just a single integer.
Answer diff can do all the first part of the job but no counting; wc -l does the rest:
diff -y --suppress-common-lines file1 file2 | wc -l…
Read more ⟶How to set nginx max open files?
Question Though I have done the following setting, and even restarted the server:
# head /etc/security/limits.conf -n2
www-data soft nofile -1
www-data hard nofile -1
# /sbin/sysctl fs.file-max
fs.file-max = 201558
The open files limitation of specific process is still 1024/4096:
# ps aux | grep nginx
root 983 0.0 0.0 85872 1348 ? Ss 15:42 0:00 nginx: master process /usr/sbin/nginx
www-data 984 0.0 0.2 89780 6000 ? S 15:42 0:00 nginx: worker process
www-data 985 0.…
Read more ⟶PhoneGap/Cordova Android Development
Question UPDATE 1:
This was everything I did in the end:
sudo aptitude install -y python-software-properties python g++ make
sudo add-apt-repository -y ppa:chris-lea/node.js
sudo aptitude update
sudo aptitude install nodejs
sudo aptitude install npm
sudo npm install -g cordova
sudo npm install -g phonegap
phonegap create my-app
cd my-app
export PATH=${PATH}:/home/oshirowanen/Downloads/adt-bundle-linux-x86_64-20131030/sdk/platform-tools:/home/oshirowanen/Downloads/adt-bundle-linux-x86_64-20131030/sdk/tools
sudo aptitude install ant
cordova platform add android
android create avd --name my_and --target 1
phonegap run android
Was any of that not neccessary?…
Read more ⟶