a journal, of things i'd like to remember.
Recently I decided to give Ubuntu 12.04 Beta 2 a try, the only problem was the Debian emacs-snapshot packages I’d been using don’t work in the newer version of ubuntu. So I had to remove the repos from my /etc/apt/souce.list file, in order to get apt-get working. I’ve been using Bastov’s emacs-prelude as a base for my emacs config, which requires emacs24, so I decided I try my hand at compling from source.
Download Source
At first I tried to clone the git repo off github, but my slow internet connection killed that idea. Instead I had to download the repo as zip which was a much more manageable file size (+- 40mb vs over 300mb)
Install build prerequisites
You’ll need to install the following packages to build from source:
sudo apt-get install build-essential texinfo libjpeg-dev libgif-dev libtiff4-dev libXpm-dev
sudo apt-get install libdbus-1-dev libgconf2-dev libgpm-dev libgtk2.0-dev
sudo apt-get install xaw3dg xaw3dg-dev libxpm4 libxpm-dev libpng12-0 libpng12-dev zlib1g-dev
sudo apt-get install libjpeg62-dev libm17n-dev libncurses5-dev libotf-dev librsvg2-dev
Compiling
The tutorial I was following assumed the source you had downloaded contained the ./configure script, but since the version I used was a clone of the bazaar repo on github you first need to run the autogen.sh script to generate the required files and directories.
We can now run the configure script located in Autogen folder:
cd autogen
./configure
This will configure the make file with the location of varied required resources. We’re now ready to compile:
sudo make
sudo sudo src/emacs -q
If everything has gone well the second command should open up emacs in a new window. Close emcas and type:
sudo make install
Done! You’ve just installed emacs from source.
By default emacs is installed /usr/local/bin
Add to $PATH
Finally lets add that location to our path variable so we can launch emacs from anywhere in the command line. We’ll need to add the following line to ~/bashrc file:
PATH=$PATH:/usr/local/bin/;export PATH
Asp.net data tokens allow you to create a route for a specific page and query string combination.
System.Web.Routing.RouteValueDictionary LodgeToken = new System.Web.Routing.RouteValueDictionary();
LodgeToken.Add(“Type”, “Lodges”);
routes.MapPageRoute(“Website.Lodges”, “Accommodation/Lodges”, “~/Web/Accommodation/Accommodation.aspx”, true, null, null, LodgeToken);
List<DateTime> years = newsItems.Where(x => x.Date.HasValue).Select(x => x.Date.Value).Distinct(new YearComparer()).ToList();
class YearComparer : IEqualityComparer<DateTime> { public bool Equals(DateTime x, DateTime y) { return x.Year.Equals(y.Year); } public int GetHashCode(DateTime obj) { return obj.Year.GetHashCode(); } }
Even though it says “Advanced”, I’ve found it a great help in learning bash scripting.