it lost some power

UPDATE (8 February 2012): Took it in again last night, the manager came out and spoke to us he was nice anyway they fixed it on the spot, replaced the display and the motherboard (again?) now my laptop is all working and correct etc. I’m glad to have it resolved, but this has really jaded my view of apple.

UPDATE (6 February 2012): After taking my stupid macbook in again to get it fixed after the part arrived. Again they assured me it would be same day or MAX next day service. But no, I took it in Saturday after lunch (I had to have a stupid “date” to do it of course) then I could finally pick it back up again on Tuesday night!!!!!!! WTF Apple????

Want to know what’s even worse??????? Over the weekend I tried to use my built-in camera. Guess what doesn’t work???? That’s right I have to go back AGAIN on Tuesday for another “date” with their “idiot bar” and see how much more time I get to waste traveling to and from the Apple store and if it takes another couple years to fix the damn thing!!!!

 

UPDATE (24 January 2012): I spent about half an hour yesterday in the Apple store. The staff were very friendly but unfortunately, I didn’t get offered anything, no new macbook, not even a replacement while they fix it the next time, not a single tiny bit of compensation for hours of traveling to and from the store (and more to come). I specifically asked them about all this and they said they can’t do anything, hell, even a upgrade to a solid state drive would be something (and awesome). The best they can do is promise me it will be a quicker repair this time, instead of 3 weeks it will take maybe 1 day. That’s better, but not so great. I’ll still be without my laptop for work for that 1 day and I’ve wasted so much time and a bunch of cash on metro trips to and from the store. I’m awaiting their call to say the replacement motherboard is in so I can take my laptop in AGAIN then wait a day and hopefully they’ve fixed it so I can go to the store AGAIN and pick it up finally how it should be. Let’s see! I’m definitely not happy with Apple, AppleCare, Apple Store and their service.

So my laptop started playing up, the keyboard wasn’t working great and for some reason the SD card slot only worked intermittently so if I wanted to get some photos I’d usually end up finding a USB card reader after getting frustrated. You don’t expect this from a top of the line macbook pro, mine is fully upgraded, and I have AppleCare

OK Next step, I call the Apple store in Barcelona (which by the way is nowhere near the center of the city), and they give me a date that I can go and talk with them. My wife and I hopped on the train on the Friday afternoon we both had off from work and spend the 50 minutes or so it took us to get to the Apple store.

We informed one of the staff that we were here and they indicated we should wait on the bench until it was our turn, no problems because we were a little early. Finally we get to speak with a genius, a little later than expected but not too bad, especially considering how busy the place was.

Our guy was friendly and helpful and told us that they would replace the motherboard, the top case and the keyboard. Great, I was really happy with that, and he said it would take about 3 days to get the parts in plus 10 days to repair it…well OK, I use my laptop for my work but I thought I could borrow my wife’s for a week or so. IMPORTANT: I noticed on the guy’s screen that the parts he was ordering said motherboard 2.66 GHz, we mentioned this to him and said that I had the 2.8 GHz version, but he said not to worry because they’re all the same.

Well after 2 weeks we called them and they said still no word. Then a few days later I called again and they said well maybe tomorrow or the next day. OK fine, I checked on the web at almost 3 weeks after we took it in and it said I could go pick it up. So off I go, on the train in my lunch break, spending another half hour to get there. I go into the store and the guy, who was friendly said that it’s not actually ready because they ran some tests and it failed, and they might have to change the motherboard again. He said he was working on it right at that moment and if I could wait around it should be less than an hour. So I did, and it was a little over an hour. A little frustrating, but whatever, I had my laptop back finally! I signed for it and they handed it to me and I went on my way.

Oops:

What happened?? I turned it on and logged in, and checked out the system information just to see if anything had changed (serial number, or anything else to keep track of it). Lo and behold, my laptop’s CPU had been changed to the 2.66 GHz model.

I called the store again and they said that they can’t do anything until I book another date, which I begrudgingly did.

Now I have to wait till Monday to see if they can do something, and hopefully not leave me without my work laptop for another 3 weeks, and maybe if I can get some compensation, this has wasted a lot of time!

I’ll update this post when I find out more. Ugh!

 
dead_iphone

So, I had my Sony Ericsson K800I for about 5 years, and it served me well, then I had a Samsung Omnia HD (i8910) which was OK but the OS was useless (Symbian is terrible!!)

Unfortunately my Samsung got stolen, and then I was back to my SE K800i, until a colleague sold me their iPhone 3GS for cheap, and when I got it the loudspeaker wasn’t working, I paid a local phone shop 15€ and they fixed the loudspeakers so I could hear the phone ringing again.

Great, but then the vibrate stopped working and not long after the 3G service stopped and then I hardly got network service anywhere! It’s really frustrating having a smartphone but not being able to use any of it’s network features, (not even mail). I did play with installing iOS5 and all that, which was much better to use and had some cool features, but of course it didn’t fix the hardware problems with the phone.

After 4 months of having a phone like this finally I dropped it accidentally from a relatively low height (about half a meter) and bang, here we are again. back now to my K800i, ugh, this sucks.

My wife is using the 3g (not 3gs) which my boss nicely gave me but it’s so so so so slow, even using google maps!

 

but all the guys at work were doing it…

Working Hard

 

We just created a setup at work with a staging server and a whole bunch of web servers behind load balancers.

Now all of these are exactly the same but changing config or restarting services or things like that that have to be done on all of them can be a pain in the ass.

So here’s a little script I slapped together, this is a first revision and a bit of a mess, but I’m pleased with how it turned out and how useful it is!

Feel free to use it and change it as you please, if you like it or have any suggestions let me know!

Basically it’s as easy as changing the SERVERS to all your backend server IPs and the paths to the web directories/programs

For this script you’ll also need ssh scp and rsync. For best results make sure you add your staging/push server’s public key to the .ssh/authorized_keys for the user you’ll use to connect to them, and add them all to .ssh/known_hosts on the staging/push server. (maybe there’s even a way of adding an install function to this script, in which you generate a keypair if it doesn’t exist, connect once to each server with the password, it installs itself into authorized_keys etc…a thought)


#!/bin/sh

SERVERS=( "127.0.0.1" "127.0.0.2" "127.0.0.3" )

vflag=off
SERVER=off
copyconf=off
copylive=off
copytest=off
copyxml=off
oneoption=off
yesmode=off
nodel=off
execute=off
xcommand=
singlefile=off
recursive=off
filepush=
question=

usage()
{
        echo
        echo "usage: $1 [-v] [-y] [-c|-l|-t|-x] [-a] [[-r] -f file] [-e cmd] [-s server]"
        echo
        echo "    -v          verbose mode"
        echo "    -y          yes mode (non-interactive)"
        echo "    -n          no rsync delete"
        echo "    -c          copy httpd configuration files"
        echo "    -l          copy live web directory"
        echo "    -t          copy test web directory"
        echo "    -x          (temp) XML Rss feeds dir"
        echo "    -a          same as -clt"
    echo "    -r          recursive, only applies to -f option"
    echo "    -f file     push file to remote server (IMPORTANT: It will push the file to the same directory on the dest server)"
    echo "    -e cmd      execute cmd on remote server"
        echo "    -s server   process only server at IP address specified (must already have keypair setup)"
        echo
        exit 1

}

while getopts vyncltxarf:e:s: opt
do
    case "$opt" in
      v)  vflag=on;;
      y)  yesmode=on;;
      n)  nodel=on;;
      c)  copyconf=on question="$question [configuration]" oneoption=on;;
      l)  copylive=on question="$question [live]" oneoption=on;;
      t)  copytest=on question="$question [test]" oneoption=on;;
      x)  copyxml=on question="$question [XML]" oneoption=on;;
      a)  copyconf=on copylive=on copytest=on question=" [all]" oneoption=on;;
      r)  recursive=on;;
      f)  singlefile=on filepush="$OPTARG" question="$question [path: $filepush]" oneoption=on;;
      e)  execute=on xcommand="$OPTARG" question="$question [command: $xcommand]" oneoption=on;;
      s)  SERVER="$OPTARG";;
      h)  usage $0;;
      \?)               # unknown flag
          echo >&2 \
          usage $0;;
    esac
done
shift `expr $OPTIND - 1`

if [ "$oneoption" = "off" ]
then
        echo
        echo "Please specify at least one option"
        usage $0
fi

SSH_CMD="/usr/bin/ssh"

SCP_CMD="/usr/bin/scp"

RSYNC_SRC_LIVE="/var/www/web/live"
RSYNC_SRC_TEST="/var/wwW/web/test"
RSYNC_SRC_XML="/var/www/web/live/xml"

RSYNC_DEST_PATH="/var/www/web/"
RSYNC_DEST_XML="/var/www/web/live/public/"
RSYNC_USER_NAME="root"

RSYNC_VHOSTS_SRC="/etc/httpd/conf.d"
RSYNC_VHOSTS_DEST="/etc/httpd/"

if [ "$singlefile" = "on" ]
then
    if [ ! -f $filepush ]
    then
        if [ ! -d $filepush ]
        then
            echo "Invalid file $filepush"
            usage $0
        else
            if [ "$recursive" = "on" ]
            then
                SCP_CMD="$SCP_CMD -r"
            else
                echo "$filepush is a directory, please enable the -r option to continue"
                usage $0
            fi

        fi
    fi
fi

if [ "$nodel" = "on" ]
then
        RSNYC_FLAGS=
else
        RSNYC_FLAGS=" --delete --force"
fi

if [ "$vflag" = "on" ]
then
        SSH_OUTPUT=
        RSYNC_CMD="/usr/bin/rsync -a -v$RSNYC_FLAGS"
else
        SSH_OUTPUT=" > /dev/null"
        RSYNC_CMD="/usr/bin/rsync -a$RSNYC_FLAGS"
fi

if [ "$SERVER" != "off" ]
then
        #Copy only to specified server
        SERVERS=( "$SERVER" )
fi

if [ "$yesmode" = "off" ]
then
        read -e -p "You sure you want to push$question to servers? [y]: " PUSH
        PUSH=${PUSH:-y}
else
        PUSH="y"
        echo "Pushing$question to server"
fi

if [ "$PUSH" = "y" ]
then
        for HOST in "${SERVERS[@]}"
        do
                :
                if [ "$copylive" = "on" ]
                then
                        echo "Running Rsync of live web directory to $HOST ..."
                        $RSYNC_CMD $RSYNC_SRC_LIVE $RSYNC_USER_NAME@$HOST:$RSYNC_DEST_PATH
                fi
                if [ "$copytest" = "on" ]
                then
                        echo "Running Rsync of test web directory to $HOST ..."
                        $RSYNC_CMD $RSYNC_SRC_TEST $RSYNC_USER_NAME@$HOST:$RSYNC_DEST_PATH
                fi
                if [ "$copyconf" = "on" ]
                then
                        echo "Copying /etc/httpd/conf.d to $HOST and reloading apache ..."
                        $RSYNC_CMD $RSYNC_VHOSTS_SRC $RSYNC_USER_NAME@$HOST:$RSYNC_VHOSTS_DEST
                        $SSH_CMD $RSYNC_USER_NAME@$HOST "/etc/init.d/httpd reload$SSH_OUTPUT"
                fi
                if [ "$copyxml" = "on" ]
        then
                echo "Copying XML RSS Feeds to $HOST"
                $RSYNC_CMD $RSYNC_SRC_XML $RSYNC_USER_NAME@$HOST:$RSYNC_DEST_XML
        fi

        if [ "$singlefile" = "on" ]
        then
            case $filepush in
             /*) absolute=1 ;;
             *) absolute=0 ;;
                fi
                if [ "$copyconf" = "on" ]
                then
                        echo "Copying /etc/httpd/conf.d to $HOST and reloading apache ..."
                        $RSYNC_CMD $RSYNC_VHOSTS_SRC $RSYNC_USER_NAME@$HOST:$RSYNC_VHOSTS_DEST
                        $SSH_CMD $RSYNC_USER_NAME@$HOST "/etc/init.d/httpd reload$SSH_OUTPUT"
                fi
                if [ "$copyxml" = "on" ]
        then
                echo "Copying XML RSS Feeds to $HOST"
                $RSYNC_CMD $RSYNC_SRC_XML $RSYNC_USER_NAME@$HOST:$RSYNC_DEST_XML
        fi

        if [ "$singlefile" = "on" ]
        then
            case $filepush in
             /*) absolute=1 ;;
             *) absolute=0 ;;
            esac

            if [ $absolute = 0 ]
            then
                wdsave="`pwd`"
                cd "`dirname "$filepush"`"
                filepush="`pwd`/`basename $filepush`"
                cd "$wdsave"
            fi
            echo "Copying $filepush to $HOST"
            $SCP_CMD $filepush $RSYNC_USER_NAME@$HOST:$filepush

        fi

        if [ "$execute" = "on" ]
        then
            echo "Running command $xcommand on $HOST"
            $SSH_CMD $RSYNC_USER_NAME@$HOST "$xcommand$SSH_OUTPUT"
        fi

        done
        exit
fi

echo "Too bad..."
exit
 

The internet is a rage inciting tool.

It allows the ignorant a voice that expands across time and space.

I’m not saying it should be regulated…but at least justify your indignation with facts!

I don’t mean the trolls, they merely feed off the absence of intelligence.

The effort of finding the truth is higher than that of believing everything that comes to you.

Ignorance may be bliss, but it’s cost is fatal!

funny facebook fails - 10 + 10 x 0 = ?

:(

:(

 

Well I thought this was a good function (and indeed it does do it’s job perfectly in the scenario we have) but I can imagine a million cases where it wont work so great.

<?php
        function parseNumber($strNumber,$cc='45',$len=8){
            $numlenfull = $len + strlen($cc);
            $cclen = strlen($cc);
            if(!empty($strNumber)){
                $strNumber = preg_replace('/\D/', '', $strNumber);
                if(strlen($strNumber) == $numlenfull && substr($strNumber, 0, $cclen) == $cc){
                    $strNumber = substr($strNumber, $cclen);
                }
                if(strlen($strNumber) == $len){
                    return $strNumber;
                }
            }
            return FALSE;
        }
?>
 

So now we’re moving all our servers to virtual machines, I thought it would be a good time to limit their disk space and save all the logs from the sites on on a central logging server.
This seemed like a good idea and I thought it would be easy, but well it took a lot longer than I thought but the solution in the end wasn’t so difficult.

Continue reading »

 

Oh no, my kindle died!!! :O

Basically I was going from work and had it with my backpack and laptop. When I checked it the screen was like the pictures below. The screen looks like it got hit or something but there’s no cracks or physical damage.

 

So as you can see from above it wasn’t the nicest thing that could happen. I’d been using my kindle for a couple of months now and I’ve absolutely loved it. It really got me into reading again!

Anyway, I just wanted to post quickly to say that although it broke, I’m more than happy with Amazon customer support, I sent an email with the pictures, then they said I should call to resolve the problem. So I used gmail to call them for free, then the agent on the phone was very friendly and helpful and almost without any discussion (after discovering I wasn’t “special” and knew how to turn it on) he arranged for a new one to be sent, it came all the way from the states, as expected but arrived in 3 days!! Impressive…

 

Thanks amazon!!!

 

Sending the old one back was too easy (all paid for by Amazon), and now it’s on it’s way:

 

*links in this post are for information, there are no affiliate links*

Awesome, now I have managed to get my VPS up and running, I haven’t ported this blog across yet or anything else. I am stoked though a 256MB / 512MB (including swap) server with 40GB storage + 150GB monthly transfer for just over €2 / month via Prefiber so far so good, came preinstalled with a very minimal install of CentOS (which I’m more than used to), although there’s a bunch of other OSs you can install if you want to… Continue reading »

 

So basically I’m starting over (again) and I’m going to try and post things here that I find interesting, or venting, or any other type of thing here.

I’ve already integrated with facebook and twitter and google and everything else, let’s see if we can exploit some social media.

For now though, here’s my first drawing for this site which I created for the facebook page/app images:

Hipster carrying PBR

"Hipster carrying PBR" (2011) - This hipster is obviously out of the loop

© 2011 Zeyus Suffusion theme by Sayontan Sinha