This site has been archived and will no longer be updated.
You can find my new profile at neilpahl.com. My new blog is at 808.ninja.
Fri, 29 Jun 2012:
This is pretty much a sumary of what was already said at ...
http://git-scm.com/book/en/Git-on-the-Server-Setting-Up-the-Server
... plus a few customizations and a suggested method of how to init a bare git repo for a user that is restricted by git-shell.
Step 1)
Install Git server:
sudo apt-get install git-server
after installing git-server create a user account which will own the shared repo. Usually just using 'git' is ok, but if you are serving to different organizations, then you would liek to give them their own username so that they cannot access all the other projects ( I would prefix their username with git so that I can recognize why that user is on my system... something like gitjsdesign). If you're on a shared server or cloud, you can protect the data by encrypting their home folder... using (in Ubuntu at least)..
adduser --encrypt-home gitjsdesign
without encryption, you can use:
adduser gitjsdesign
step 2)
ask gitjsdesign to use ssh and create a public key which they can send(email) you. Add their public key to the authorized_keys file at /home/gitjsdesign/.ssh/authorized_keys. add your own public key in there too.
step3)
protect your shell by restricting their access.
find our where the git-shell is:
which git-shell
lets say we got /usr/bin/git-shell
now we edit the /etc/passwd file
sudo vi /etc/passwd
then change
gitsjdesign:x:1000:1000:,,,:/home/gitsjdesign:/bin/sh
to
gitsjdesign:x:1000:1000:,,,:/home/gitsjdesign:/usr/bin/git-shell
step 4)
create the project repo.
using your regular user account, go to the home directory of the git user,
cd /home/gitjsdesign/
initialize a bare repo... ** run sudo as gitjsdeign so that they own it.
sudo -u gitjsdesign git init ourProject.git --bare
Now, the user can go to their project root and run
git init git add . git commit -m 'initial commit' git remote add origin gitjsdesign@gitserver:ourProject.git git push origin master
Fri, 29 Jun 2012:
I forked heiflo's github project so that I can customize it a bit and use it as my skeleton liftweb projects in the future while not having to worry about it being updated and breaking my comfortable configurations. Mainly, I just wanted to change the jetty port...
repo found here:
https://github.com/neildaemond/lift-basic-2.4-sbt-0.11.2.git
Feel free to clone/fork as you please
Thu, 28 Jun 2012:
I gave sbt 0.11.3 a go and lifty broke. I guess moving to the newest versions of sbt isn't the greatest idea, since it carries the potential for breaking its plugins. However, did I really need lifty anyways? Now I'm thinking not really.
Thanks to heiflo on github who has a nice project going that has a skeleton project using lift 2.4, and sbt 0.11.2. This project contains all the configurations and such sorted out for the new versions of sbt. I just need to clone the project from https://github.com/heiflo/lift-basic-2.4-sbt-0.11.2, cd into the directory and run ./sbt
The first load takes a while to download the dependancies, but then you are set. Now onto the coding...
Mon, 25 Jun 2012:
So I've began reading Hacking Exposed 3 - Web Applications. Also, I've been developing websites using the Processwire CMS which, in my opinion, is THE best CMS for any website developer who wants to make truely customized and perfectly tailored designs. I ended up using this CMS after EXTENSIVE research into Drupal, Wordpress, and even some of the smaller ones like Get Simple. I tried them all out and found that (minus the available plugins for wordpress and drupal) is much more simple, flexible and powerfull. With some enginuity, you'll blow the compeditors out of the water with its jquery inspired API. I use is for my personal site, but focusing on functionality, I have not taken the time to make my personal site all that pretty in design... eventually I will.
So, my goal with this log is to work through the techniques and principles mentions in this text while testing out the Processwire CMS. I'm sure it I won't find anything really sine the creator of Processwire, Ryan Cramer, is VERY SOLID and SUPER helpful on the forums (I'm talking about elegant responses within the hour, usually).
Mind you, this project is one amoungst many open ones I have, so I will work on it in my spare time.
Sat, 16 Jun 2012:
Ok, so I'm going to let lifty build my project and directory structure... but, I'll make it start with the project-blank recipe.
So far, I installed sbt 0.10 and put the suggested build.sbt and project/plugins.sbt into the project's root folder. But it turns out that lifty can take care of all that now anyways (they were out of sync before the 1.7.5-SNAPSHOT).
But, it turns out that lifty was more convinient than I thought. I origionally used the 1.7.4 version, but it had issues with it and sbt .10, so the 1.7.5-SNAPSHOT version ended up working. Installing lifty is easy, as all you need to do is create the following global sbt settings:
~/.sbt/plugins/build.sbt
resolvers += Resolver.url("sbt-plugin-snapshots", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots/"))(Resolver.ivyStylePatterns)
addSbtPlugin("org.lifty" % "lifty" % "1.7.5-SNAPSHOT")
(leave a one line space between both statements)
~/.sbt/build.sbt
seq( Lifty.liftySettings : _*)
And that's it to installing Lifty! Now we jsut have to teach lifty the recipes~
Since lifty will handle the .sbt files, we just need to create a new folder to house a new Lift project, cd into that folder and run sbt.
Once you reach the sbt console, teach your lifty plugin the default recipes with:
lifty learn lift https://raw.github.com/Lifty/lifty/master/lifty-recipe/lifty.json
and then you can create and run a blank lift project with:
> lifty create lift project-blank > reload > container:start
or the sample project:
> lifty create lift project > reload > container:start
to run the container (jetty) on a different port using sbt .10, you need to add this line to your build.sbt (be sure to leave a blank line between statements):
port in container.Configuration := 8081
Next, I found the exploring lift book to be quite clear. Starting out, and with a weaker scala background, I get lost sometimes when documentation dive right into the classes and packages that lift offers. This text uses Maven instead of sbt, but I was able to skip forward to learn the fundamentals of lift. The loose order in which I'll read this book:
- Chapter 4: Templates in Lift
- Chapter 7: Sitemap
- Chapter 5: Snippets
- Chapter 8: Mapper and Records
- Chapter 6 : Forms
Then i'll look into the advanced topics to get AJAX and COMET going