Nano has experimental undo/redo feature. As you’ll see from the nano manual (type “man nano” in a Terminal to read that), you’ll need to start nano with the -u option
$ nano -u somefile.txt
… and then you can use Alt-U to undo and Alt-E to redo.
It’s little bit frustrating that you have to type the “-u” option every time when you want to edit a file, but hopefully there is a solution and its name is “alias”.
Aliases are a way for you to customize the commands by giving them aliases (nicknames). You can use them to remember commands with a lot of options or make their names shorter and easier to type. To setup aliases, all you need is to open the ~/.bash_aliases file and type in:
alias nano='nano -u'
If you want to add more aliases, enter each of them on separate line.
Now, typing “nano” is equal as typing “nano -u”. Tricky, yeah?
Ok, ladies and gentlemen!
I needed local development server closer as possible to the production one. I downloaded and Installed Ubuntu, but didn’t know how to get Apache, MySQL and PHP installed. After a few hours of reading random blogs found on Google and head banging I succeed.
My requirements was:
- Set up multiple subdomains automatically (i.e. Virtual Document Root)
- Password protect all my subdomains when they are accessed outside my home network but access them directly, without need to provide password, when I am connected to my local network and develop.
- To separate the error logs by virtual host (subdomain).
Below is a laundry list of commands to help you configure your own perfect Ubuntu server, too.
On my laptop I wanted to mount some shared directories (via samba), located on my office network and accessible trough OpenVPN. I need them to work remotely (there is in my office local development server, used from all my colleagues). Connecting to the VPN and mounting the shares was straightforward. I just have had to install smbfs (Samba file system utilities) and put the following line in my /etc/fstab:
//192.168.91.1/deals /mnt/deals-old cifs credentials=/etc/samba/deals-user,noexec,noperm 0 0
Setting up Git can be tricky on Windows and this tutorial will save you few hours head bangs. This guide will take you through the steps to install and configure Git on Windows and use it as remote repo.
1) Install Git for Windows http://msysgit.github.com/
2) Right click on “My Computer” icon and select “Properties”. Than choose “Advanced system settings” from the menu on left. On the newly opened window select “Advanced” tab and click “Environment Variables”. On “User variables for <username>” section click on “Path” and than click the “Edit” button. Add the following to the path variable, using ; as delimeter:
on x86 Windows;
C:\Program Files\Git\bin;C:\Program Files\Git\libexec\git-core;C:\Program Files\Git\cmd
or on x64 Windows:
C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\libexec\git-core;C:\Program Files (x86)\Git\cmd
3) Install WinSSHD (http://www.bitvise.com/winsshd)
4) Right click tray icon -> Settings -> Edit -> Access Control -> Windows Groups -> Everyone -> Edit
5) Change “terminal shell” to
"C:\Program Files (x86)\Git\bin\sh.exe" -il
6. Change “exec request prefix” to
"C:\Program Files (x86)\Git\bin\sh.exe" -c "