www.newzealandroid.co.nz
by Ryan French on Oct.30, 2009, under Uncategorized
I’m pretty sure that there are only 2 people who read this blog carefully, and out of those 2 I would say that about 50% of them just click ‘next’ on their feed reader, however I thought I might try and get a bit of publicity for a new site I’m going to be writing for.
One thing I have been following very closely for a long time now is Android. For those of you who don’t know what Android is, it is an operating system made by Google, aimed at smart phones, but also moving into lots of other devices as well.
I have now signed up to be a contributor to a new site, www.newzealandroid.co.nz. I’m aiming to try and shed some insight from what I’ve found about Android (hopefully have more insight when I can actually BUY an Android handset). If you want, check it out. The site isnt open yet, and I’ll post again once it is.
Updated to a new server
by Ryan French on Oct.10, 2009, under Uncategorized
This site, along with a couple of other sites, have all now been moved to a nice new shiny server. Once I finally got around to setting everything up it hasnt seemed too bad, and looks to be right back to where it was a week ago before moving over.
Mono Migration – Stage 1 Continued
by Ryan French on Sep.21, 2009, under Uncategorized
So a couple of weeks ago I mentioned the Mono Migration that my work was attempting in an effort to reduce costs and enable us to move our product onto EC2 as we are looking at some new projects that require us to be able to expand our system quickly and easily.
Since then we have had quite a lot going on at work, and are only just starting to focus on the migration again, so here’s where we are up to at this stage.
Firstly. we are going to move the database from MS SQL Server 2000 to PostgreSQL. This in itself will be a massive task as there is no easy way to move the hundreds of stored procedures over (or so I’m told, I havent looked into it much yet). Once this is done we will be running the code as is against the new database and hoping that it works. I’ll let you know once that is done and where we are going from there.
On a side note, this blog along with a couple of others hosted on this server will be moved to a new server before the 30th of September. As long as everything goes smooth there should be minimal downtime for the site, and I should be able to keep all the info currently on here. I’m going to be backing everything up just in case though.
Checking access to files on a server
by Ryan French on Aug.02, 2009, under Uncategorized, freebsd
So recently I put some files up on a file server I rent with a couple of mates, mostly ones used in my CV so that prospective employees can check papers etc that I have written. In an attempt to try and figure out who has accessed these files I, with the help of my friend Paul wrote a smal script that uses the access log, grep and whois to figure out the domains that have accessed the file. To be honest its a small script, and if I had more experience with bash I probably could have written it myself. In fact, if Paul had wanted to, I know he could have written it no problems, but it was all experience. In case someone wants to use it, here it is.
#!/bin/bash
FILE=”/tmp/$(basename $0).$RANDOM.$$.txt”;
echo Searching for access to files with $1;
sudo cat /var/log/apache2/access.log | grep -i *PUT YOUR NAME HERE* | grep $1 > $FILE;
if [ -z "$2" ]
then
echo “no exclusions”;
else
echo “excluding files containing $2″;
cat $FILE | grep -v $2 > $FILE;
fi
cat $FILE | cut -d ‘ ‘ -f 1 | sort | uniq -c > $FILE;
for i in $(cat $FILE)
do
echo -ne “$i - “; whois $i -H | egrep ‘OrgName|descr’ | head -n 1 | cut -d ‘:’ -f 2;
done
To use it, just copy the script (replacing the part that says *PUT YOUR NAME HERE* with your username) into a file, set it as an executable using chmod +x, then run it. The first argument is the string you are looking for access to, e.g. pdf will show all pdf’s, and there is a second optional string for if you want to exclude files with names containg a certain string.