Setup Solr Trunk Development Environment using Eclipse

You need to have the following software installed

  • subversion
  • ant
  • eclipse

Now the install procedure

  1. Checkout the source code
  2. cd to the trunk folder and run
  3. Start Eclipse and Import the Project
  4. Install the run-jetty plugin. Add the update site (http://run-jetty-run.googlecode.com/svn/trunk/updatesite) and install run-jetty
  5. Add a Run configuration for a Jetty Webapp
    • Jetty Version 6.1.26
    • Port 8080
    • Context /trunk
    • WebApp dir solr/webapp/web
    • Arguments/VM arguments
  6. Save and run that configuration
  7. Start any webbrowser and visit: http://localhost:8080/solr/

C# Entity Framework – Clear Context

Put the following code in the partial class of your entity context:

If you want to clear the context you just call the ClearEntities() method on the reference to the context

But be aware that this code does set all foreign key references to null in all entities that have been retrieved from the context before the method was called. You should not use any entities of the context anymore when you call this code.

ArchLinux doesn’t boot anymore after updating to Gnome 3.8 – Intel Graphics

Yesterday I updated my system to Gnome 3.8. Unfortunately I was not able to boot it anymore. I would only see the boot manager but then It would just hang with a black screen. Switching to a console (Ctrl + Alt + F2) didn’t work.

First of all you need to be able to work with your system. The easiest way to achieve that is starting it with runlevel 1.

Press the power button and wait until you see your bootmanager. For Gnome you can press "e". You are then in an editor where you can see what exactly gets executed if you boot the entry. To start the kernel with runlevel 1 you just need to add a "1" at the end of the line which starts with "linux".

After you press Ctrl + X your kernel boots in maintanance mode. This is only temporary. If you shut the system down and start it again it will start the same way as always. You can login with the root account.

Now cd into the directory “/etc/X11/xorg.conf.d”. You need to create a file 20-intel.conf with the following content:

This does disable the hardware acceleration. After that I was able to boot my system again.

But be aware that the performance is degraded! This is only a temporary fix until a new version of the driver/gnome is released which doesn’t have that problem anymore. So if new updates arrive try to delete the file from time to time and check if it does now work

Useful Linux Commands

Using mv to prefix files

The following command prefixes all files with the prefix 2013-10-22_. This is useful for small rename operations

# Files per Extension

Recursively lists all file extensions in the current folder and below, including a count how many files there are per extension.

Clean Commandline History

Count the number of files and folders (non recursive)

Count the number of files (recursively)

find . -type f | wc -l