This is useful for using vsftpd when symlinks won’t work a mount will allow users to see other directories outside of the normal home directory.
mount –bind /var/ftp/music /home/userA/musicAuthor Archives: Ryan
Developing Simple
Make everything as simple as possible, but not simpler.
– Albert Einstein
Thought this could easily be applied to software engineering. It also goes along with the KISS (Keep It Simple Stupid) principle. It also says that sometimes trying to make things simple can be to complex. There is a line that we walk when developing software. By trying to become to creative in making a design simple, sometimes it can be to complex! I like to expand his quote and say, “Make it as simple as possible, but not simpler then possible”.
Grails findBy for hasMany Relationship
Interesting that this is not built into grails. As many people know who use grails you automatically get dynamic “findBy” methods on persisted objects. It is incredibly useful and provides easy access to attributes of a persisted class. The only problem is when you try to do the same thing on a “hasMany” relationship of that class. For example:
You can do:
1 | Airport.findByName("MSP") |
You cannot do:
1 | Airport.findByFlights(flight) |
What do you do? In my case, I decided to make it.
Here is my implementation:
Semantic Web
I have to admit, when I first heard about this I thought it was kind of crazy and impossible to think information could really be captured via html markup and other types of semantic writing. If you want to learn about the broader idea of the semantic web you can read an article posted by smashing magazine.
Apparently Google is going to start investing in this idea, at least in buying a company that is investing in this idea 🙂
Google just purchased Metaweb. Now that Google acquired Metaweb, they have really bought access to an impressive database of web entities. What are entities? Metaweb calls entities a word that is a person, place or thing. One entity can have many different types of names or different names referring to the same entity. For example, you could refer to my current employer in a number of ways: PTC, Parametric Technology Corporation, Parametric Technology, etc. What metaweb does is realize that everyone is talking about the same thing! They take this ever expanding database and open it up to the world with access to capture and access the entities.
Why does that matter? You will have to read into it a bit more but it is searching not just words like Google but the meta information which gives context to the words. This helps in numerous different ways. It allows for more direct SEO, searching, ability to pull in information from other places, etc.
Migrating Subversion
A little bit ago I needed to migrate all my subversion repositories over to my fresh new Ubuntu server. I personally manage the server so it also gets interesting trying to do upgrade Ubuntu by installing a fresh new install.
Migrating to another server
svnadmin dump REPOS_PATH > export.txt
htpasswd -b /svn/users/passwords username password
htpasswd /svn/users/passwords username
Create New Repository
svnadmin create /svn/repos/test
chown -R apache.apache /svn/repos/test
<Location /svn/thoughtsway>
DAV svn
SVNPath /home/svn/location_of_svn_repository
AuthType Basic
AuthName “<NAME_OF_YOUR_SERVER> Subversion System”
AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
Resources
- http://www.ferdychristant.com/blog/articles/DOMM-6NFJ6J
- http://www.subversionary.org/howto/setting-up-a-server-on-fedora-core-4
- http://www.polarion.org/index.php?page=overview&project=fasttrack
Spring Security Core Plug-in
This is key if you want to get the default LoginController / LogoutController working in grails 1.3.1+. At least until the new STS version comes out:
http://andrewclement.blogspot.com/2010/05/springsource-tool-suite-and-grails-13.html
Eclipse Helios on STS
Here is the latest that I have found!
“If all goes as planned we’ll release STS 2.3.3.M2 including the usual installers next week.”
Looks like they have it some what working in the nightly builds.
Eclipse Helios
The new version of Eclipse is out!
Here is a demo of the new Java features which is interesting to watch.
There are a lot of nice additions!
A couple things I have noticed so far:
- Support for formatting Annotations correctly!
- It has added additional out-of-the-box support for JavaScript.
- I was able to creat a new JavaScript formatter! I have been waiting for this feature so that our whole team can use the same formatting options like the Java formatter.
- I would not recommend installing Aptana yet as it is not fully compatible with the new version of Eclipse.
- I would recommend creating a new workspace if you previously installed Aptana. Otherwise, you will get errors trying to find Aptana specific settings (as it is not installed).
Connect To HSQLDB Grails Database
This is how you can connect to use the DBVisualize to connect to grails using the HSQL database. I wanted to learn more about GORM and to understand how it was generating the tables.
Datasource.groovy
1 2 3 4 5 6 | development { dataSource { dbCreate = "create-drop" // one of 'create', 'create-drop','update' url = "jdbc:hsqldb:file:devDB;shutdown=true" } } |
- Choose HSQLDB embedded as your Driver using the hsqldb.jar located under your Grails home directory ($GRAILS_HOME/lib)
- Update the Database URL to include your grails app base directory (jdbc:hsqldb:file:<grails app base>/devDB). Window users don’t have to specify the drive (ie. “C:”).
Sharepoint Email Setup
- Install SMTP Server
- Configure SMTP server by doing the following: http://technet.microsoft.com/en-us/library/cc772058(WS.10).aspx
When configuring the outgoing and incoming email.
Install SMTP ServerConfigure SMTP server by doing the following: http://technet.microsoft.com/en-us/library/cc772058(WS.10).aspx
Be careful because the exchange server you are trying to send the email from to your sharepoint instance may be blocking the emails from getting to sharepoint. If this is the case then you need to contact your sharepoint administrators to allow that email to be sent to your sharepoint instance.You can verify this by sending an email from a client that sets the email server as your sharepoint instance and then send the email directly to that machine. If it works that way then you can try going through your organizations exchange server.