Creating a remote git repository from an existing local one.
This first thing to do is create a bare copy of your repository
git clone --bare repo repo.git Then copy the clone to the remote server
rsync -avz repo.git username@remote_host:/var/repos/ Move the existing code out of the way and clone the remote location
mv repos repos_orig
git clone ssh://remote_host/var/repos/repo.git repo Finally, check that the new clone is complete and working and remove the original copy.
LG42LH40 Lip-sync problems & how to fix
LG 42LH40 42-Inch 1080p 120Hz LCD HDTV, Gloss Black 1) press and hold the menu button on the side of the TV then press and hold the menu button on the remote until the display says "Enter Password" 2) enter four zeros from the remote control to get past the password screen (you should now see an "IN START" menu with all kinds of information listed) 4) look at the lower left corner where there should be a numbered menu -- menu option 4 should say "System" 5) use the down arrow until the word "System" is highlighted (pressing the number '4' will not take you down the menu) and press the enter key (you should now be on the System menu near the middle of the screen) 6) press the down arrow to option 9 "Lip Sync Adjust" and then press the left arrow to adjust the value to zero (mine was set to 20 from the factory) 7) press the return key to get out of the menu and bingo, you're done!
subversion/screen conflict
So, it looks like I might have found a bug in either screen or subversion on OS X 10.5.6
I tried to update a checkout of one of my rails apps on my mac mini only to be confronted with the following:
jody@tiny:~/Code/ruby/old/rsvp$ svn up
Bus error I thought this was odd as I have never changed my version of subversion. Then I thought, "have I ever checked out code from a repository while I was in a screen session"? The answer was no, so I quit the screen session and tried again:
jody@tiny:~/Code/ruby/rsvp$ svn up
At revision 236.
So, it would seem that whatever screen does when I am in a screen session is not compatible with subversion. Now to see if there is anybody out there that will know why this happens.
connectiontimeout time
Apache have released their latest httpd server version 2.2.10. While I am happy to have all the bug fixes that this provides, the biggest bonus for me is the addition of the connectiontimeout directive to the mod_proxy module. This directive allows me to distinguish between the length of time it takes to connect to the proxy server and the length of time it takes to return a response. This is a big deal for my setup as I have a lot of legacy applications behind my proxy that take a long time to return (in the order of minutes). This means that I have never been able to set the timeout on the proxy to less than 2 minutes. Having a high timeout has had a negative impact on the user experience when one of the machines behind the proxy breaks down. If the user is unlucky and the proxy tries to connect to that dead server, then they will have to wait for 2 minutes before the server fails over and they get a response. The connectiontimeout directive allows me to set a really low timeout in the order of 2-3 seconds, greatly reducing the time required for the proxy to decide that the backend machine is not available. Now the user will get a response from a machine that is working within 2-3 seconds instead of 2 minutes. I think you'll agree that is a vast improvement.
Now for the bad news. It would appear that you have to set the connectiontimeout directive for each member of a balancer group as opposed to setting it for the group. So my balancer group that looks like this:
<Proxy balancer://liveresin >
BalancerMember http://192.168.1.1:8000 route=1
BalancerMember http://192.168.1.2:8000 route=2
BalancerMember http://192.168.1.3:8000 route=3
BalancerMember http://192.168.1.4:8000 route=4
BalancerMember http://192.168.1.5:8000 route=5
ProxySet lbmethod=byrequests stickysession=JSESSIONID
</Proxy>
now looks like this:
<Proxy balancer://liveresin >
BalancerMember http://192.168.1.1:8000 route=1 connectiontimeout=3
BalancerMember http://192.168.1.2:8000 route=2 connectiontimeout=3
BalancerMember http://192.168.1.3:8000 route=3 connectiontimeout=3
BalancerMember http://192.168.1.4:8000 route=4 connectiontimeout=3
BalancerMember http://192.168.1.5:8000 route=5 connectiontimeout=3
ProxySet lbmethod=byrequests stickysession=JSESSIONID
</Proxy>
I am unhappy with this as I have to set the same directive 5 times. Would it not be better to set it once in the ProxySet directive and then if needed override it for individual nodes. Maybe this is something that can be added in future releases. Anyway, thanks to the apache team for making my servers that much more responsive.
Aiport Express setup not so 'Express'
I decided to buy an Airport Express today as I really wanted to get the most from my stereo and the remote application (warning: crappy iTunes link) on my iPod touch. A lot of the reviews claim that it is really hard to setup and a lot of them claim that it is really easy. I figured that since I am fairly tech savvy it really shouldn't be a problem. I mean how hard can it be to hook up a network enabled device to my existing wireless network? As it turns out, this device caused me loads of trouble during setup. The difficulty was second only to creating a bridged network between two wireless routers from different manufacturers.
First of all you must make sure that the device is allowed to access your wireless network. This was easy to do and took a few seconds on the admin page for my router. Then install the airport utility, also easy. Finally open the utility and setup your airport express and you are done, or are you....
The first hurdle to overcome was getting the express to show up in the list of devices. Not only would it not show up, it just flashed an annoying amber light at me. For some reason it would not show up in the list, unless I enabled the wireless network on my mac mini. When I finally got it to show up it told me I would have to connect to it directly. Fine, I did that and at last I was at a configuration screen. I had two choices at this point, pick 'manual' setup or hit the 'continue' button. Assuming that apple would do the right thing at this point, I hit continue. A few dialogs popped up asking me how I would like to configure the device and I choose to add it to my existing network as opposed to create a new one. It found my network and entered the WEP key. "All good" I thought to myself, but sadly no. The device started flashing amber again and dropped off the network never to be seen again. This resulted in the application of a paper clip to the reset switch and restarting the airport utility again.
Ok, second attempt. This time, I decided not to trust apple to do the right thing and went for manual configuration, the option I should have chosen in the first place. This time I was allowed to configure the network by hand and make sure that everything worked. I add the ssid, wep key and password then hit the 'update' button. Huraah, it worked and I had a working Airport Express. Now all I had to do was play some music by selecting the speakers from the drop down list on the bottom right of the iTunes window... but there was no drop down menu. There didn't seem to be any advice in the manual so I resorted to searching google for an answer. Finally someone suggested that I need to look in the advanced tab of iTunes and make sure that the 'Look for remote speakers...' option was ticked. Sure enough it wasn't, but ticking it suddenly provided me with a drop down menu. Selecting the speakers and hitting play brought music to my ears.
All in all the Airport Express is a great little piece of kit, but don't even think you are going to have an easy time getting it to work on your network, unless it is the only device providing wireless access, or you own apple base stations. Anyway, I am off to listen to some music in my living room and play with the remote app.
Ignoring the Git
git status and all those files I don't want in version control show up in the 'Untracked files' list. The obvious answer is to create a .gitignore file, but I really don't want to do it by hand, because it just doesn't seem lazy enough. So, I present to you a way to generate the .gitignore file without having to type any of the file names:
git ls-files -o --exclude-standard >> .gitignore It's my pty and I'll cry if I want to.
chrt:webdev2:~/.cpan/build/IO-Tty-1.07# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
1..4
Configuration: -DHAVE_DEV_PTMX -DHAVE_GETPT -DHAVE_GRANTPT -DHAVE_OPENPTY -DHAVE_PTSNAME -DHAVE_PTSNAME_
R -DHAVE_PTY_H -DHAVE_SIGACTION -DHAVE_SYS_STROPTS_H -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DH
AVE_UNLOCKPT
Checking for appropriate ioctls: TIOCNOTTY TIOCSCTTY
Checking that returned fd's don't clash with stdin/out/err...
trying getpt()...
pty_allocate(nonfatal): getpt(): No such file or directory at /root/.cpan/build/IO-Tty-1.07/blib/lib/IO/
Pty.pm line 24.
trying openpty()...
pty_allocate(nonfatal): openpty(): No such file or directory at /root/.cpan/build/IO-Tty-1.07/blib/lib/I
O/Pty.pm line 24.
trying /dev/ptmx...
trying grantpt()...
IO::Tty::pty_allocate(nonfatal): grantpt(): No such file or directory at /root/.cpan/build/IO-Tty-1.07/b
lib/lib/IO/Pty.pm line 24.
trying unlockpt()...
trying ptsname_r()...
IO::Tty::open_slave(nonfatal): ptsname_r(): No such file or directory at /root/.cpan/build/IO-Tty-1.07/b
lib/lib/IO/Pty.pm line 24.
trying to open /dev/pts/3...
IO::Tty::open_slave(nonfatal): open(/dev/pts/3): No such file or directory at /root/.cpan/build/IO-Tty-1
.07/blib/lib/IO/Pty.pm line 24.
pty_allocate(nonfatal): open(/dev/ptmx): No such file or directory at /root/.cpan/build/IO-Tty-1.07/blib
/lib/IO/Pty.pm line 24.
trying BSD /dev/pty??...
Cannot open a pty at test.pl line 42
cd /dev
./MAKEDEV pty
mount -t devpts -o rw,gid=5,mode=620 none /dev/pts
Blogging from TextMate
Typo Filters
EDIT: I just found some help documentation for the text filters buried within the admin interface at http://yourblog/admin/textfilters
Getting GitHub working with a new repository
So I thought I would try out git and github and see what all the cool kids are talking about. The initial setup was really easy. I got my first repository setup within minutes and was committing without any problems. Then I created a clone on my laptop and continued working. The problem arose when I tried to get this work back into the central repository and then back to my desktop. The git push was fine, but the git pull kept failing giving me the following:
neo$ git pull
You asked me to pull without telling me which branch you want to merge with,
and 'branch.master.merge' in your configuration file does not tell me either.
Please name which branch you want to merge on the command line and try again
(e.g. 'git pull <repository> <refspec>'). See git-pull(1) for details on the refspec.
If you often merge with the same branch, you may want to configure the following
variables in your configuration file:
branch.master.remote = <nickname>
branch.master.merge = <remote-ref>
remote.<nickname>.url = <url>
remote.<nickname>.fetch = <refspec> Having a quick search around the net, told me that I needed to update only the branch.master.remote and the branch.master.merge. Since I am merging with the 'origin' branch, I run:
neo$ git config branch.master.remote origin Then to get the merge to work correctly I set the following:
neo$ git config branch.master.merge refs/heads/master This tells git to merge the remote changes into the master branch. Once done a simple
neo$ git pull should do the trick.
Older posts: 1 2
