Folder Color is a Nautilus extension that allows you to easily change the folder icon color to some predefined colors such as blue, pink, black, yellow, violet, orange, green, grey or red. With a small tweak, the extension also works with Nemo file manager.
Sunday, April 27, 2014
Saturday, April 26, 2014
Install and Configure Apache Tomcat in Netbeans Ubuntu
- If Tomcat is not installed yet, install it first
sudo apt-get install tomcat7
- And then configure like this
cd /usr/share/tomcat7
sudo mkdir common
cd common
sudo ln -s ../lib lib
cd ..
sudo mkdir conf
cd conf
sudo ln -s /etc/tomcat7/server.xml server.xml
sudo chmod o+rx /usr/share/tomcat7/conf
- Open service tab on upper left beside project tab
- Right click servers, add server
- Choose Apache Tomcat
- Browse server location in /usr/share/tomcat7
- Enter username and password you want, for example I add "admin" for the username and password
- Open terminal and execute
sudo nano /etc/tomcat7/tomcat-users.xml
- Add this on the top of </tomcat-users>
<role rolename="admin-gui"/>
<user username="admin" password="admin" roles="admin-gui"/>
- Press Ctrl + O and the enter
- Type this in terminal
sudo service tomcat7 restart
- Access your apache tomcat from browser in http://localhost:8080
- The root web directory located in /usr/share/tomcat7-root/default_root
Install Adobe Reader Ubuntu
- Get installer here
- Open the deb with gdebi or software center or dpkg
Friday, April 25, 2014
Source For Adding File System into Linux
- http://www.ibm.com/developerworks/library/l-fuse/
- http://www.cs.nmsu.edu/~pfeiffer/fuse-tutorial/
- http://pramode.net/articles/lfy/fuse/pramode.html
- http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=9&cad=rja&uact=8&ved=0CHUQFjAI&url=http%3A%2F%2Fstuff.mit.edu%2Fiap%2F2009%2Ffuse%2Ffuse.ppt&ei=01haU9mxGc_gsASPiICAAQ&usg=AFQjCNGlgaNYXpyb0eCXYPwo0o8LdQheAw&sig2=bP5GohtBG3DwG4G9ReAkfg&bvm=bv.65397613,d.cWc
- http://easytricksportal.blogspot.com/2013/11/filesystem-in-userspace-fuse-tutorial.html#.U1pYVY-Ro8o
- http://www.youtube.com/watch?v=XUDCAk8bi2w
- http://revista.python.org.ar/3/en/html/python_en_tu_fs.html
- http://pysnippet.blogspot.com/2009/11/fuse-filesystem-in-userspace-part-1.html
- creating a temporary file in python with FUSE
- http://www.willmcgugan.com/blog/tech/2011/3/20/creating-a-virtual-filesystem-with-python-and-why-you-need-one/
- http://stackoverflow.com/questions/23208634/writting-a-simple-filesystem-in-c-using-fuse
- http://www.gtoal.com/fusestuff/fuse-2.7.0/example/fusexmp.c.html
- http://www.slideshare.net/adorepump/building-file-systems-with-fuse?qid=d3633879-840b-4135-b61b-f118eef58512&v=default&b=&from_search=1
- http://www.slideshare.net/danny00076/fuse-filesystem-in-user-space?qid=aa9bf08a-29aa-4c6c-abf9-7a9511b6699b&v=default&b=&from_search=2
- http://biematas.wordpress.com/2011/01/25/system-file/
10 Super Powerful Linux Commands
We always say that the most powerful Linux tools are its Command lines. This is because you can do about everything right from your command line. You can easily explain your computer exactly what you require and it comes back to you with appropriate results. Infact there are some commands that make this tool even more powerful! Here we bring to you a list of 10 such commands that work like energy drinks for you Linux machines!
Thursday, April 24, 2014
Solving "perl: warning: Setting locale failed" in Ubuntu
It is happen because locale setting needs to be reconfigured. To do that, just type this in terminal
source
If it doesn't successfull, try to set locale firstsudo dpkg-reconfigure locales
and then type dpkg again.sudo locale-gen en_US en_US.UTF-8
source
Sunday, April 20, 2014
Install Squid Proxy Ubuntu Server
- Install Squid
sudo apt-get install squid
- Set squid to run after startup
update-rc.d squid3 defaults
- Open squid configuration file
sudo nano /etc/squid/squid.config
- Add this to the first line of squid.conf to use ipv4 only
dns_v4_first on
- Press Ctrl+w to search "http_access deny all"
- clear "#"
- Search "acl localnet" with Ctrl+w
- add line "acl localnet src your-ip-public"
- Press Ctrl+w to search "http_access allow"
- add line "http_access allow localnet"
- Press Ctrl+o and then press enter to save edited file
- restart squid service
NB:sudo service squid3 restart
- You can change localnet to whatever you want
- To change proxy port, search "http_port 3128" and change 3128 with port you want
Friday, April 11, 2014
How Priority Queue in Java is Working
Source Code
- import java.util.*;
- class PQ{
- static class PQsort implements Comparator<Integer>{ // inverse sort
- public int compare(Integer one, Integer two){
- return two - one; // unboxing
- }
- }
- public static void main(String[] args){
- int[] ia = {1,5,3,7,6,9,8}; // unordered data
- PriorityQueue<Integer> pq1 =
- new PriorityQueue<Integer>(); // use natural order
- for (int x : ia) // load queue
- pq1.offer(x);
- for (int x : ia) // review queue
- System.out.print(pq1.poll() + " ");
- System.out.println("");
- PQsort pqs = new PQsort(); // get a Comparator
- PriorityQueue<Integer> pq2 =
- new PriorityQueue<Integer>(10,pqs); // use Comparator
- for (int x : ia) // load queue
- pq2.offer(x);
- for (int x : ia) // review queue
- System.out.print(pq2.poll() + " ");
- System.out.println(" ");
- }
- }
Saturday, April 5, 2014
Backup and Restore Database MySQL
For backup all databases
mysqldump -u username -ppassword --all-databases > /tmp/alldatabases.sqlFor backup spesific database
mysqldump -u username -ppassword --databases databasename > /tmp/filename.sqlFor restore
mysql -u username -ppassword databasename < /tmp/filename.sql
Friday, April 4, 2014
Instaling Kubuntu Desktop without KDE Application
Just type this in terminal
sudo apt-get install --no-install-recommends kubuntu-desktop
Setting Proxy for apt-get in Ubuntu
- Open terminal
- Type this
sudo nano /etc/apt/apt.conf
- Add this line if there in no authentication in your proxy
Acquire::http::proxy "http://proxyserver:port/";
- Add this if there is authentication in your proxy
Acquire::http::proxy "http://username:password@proxyserver:port/";
- Press Ctrl+x and then press y
Subscribe to:
Posts (Atom)