Wednesday, February 19, 2014

That Night

One minute he was there andthe next he was gone. Everything happened too fast. Too fast for any of us to really absorb it. I'm going back to that night daddy died. That night that has been on replay in my head on and off. Non stop. We know he is with Jesus. We know he is no longer in pain. I know that I knew but at the end of the day the thought that keeps creeping back is I wish I had more time. I wish he werr still here. I wish there was something I could could have done differently or better. Maybe putting it down in writing Will help me make peace with it. Time sure has flown. It is almost 3months again and Here is my testimony. I keep saying it but now Its really time to believe it. I love you daddy and miss you everyday. There's this big wide void you've left and only because as difficult and painful living was becoming for you we wanted to have you around forever. Know that we are not fully ok but we Will be and we Will never forget you.

One week before

The day that our lives came to a sudden halt.
I went to church. Yes church. The one I had suddenly stopped bothering to go to.
Not because there was anything wrong with it. Maybe there was.
Maybe there wasn't, all I know is I was in a different place in my life.
A place where I knew daddy might be going soon but I was refusing to believe it. I was refusing to.accept it. Sean was already home for two weeks. Yup Sean had told his boss he needed to come see his uncle. Now that I think.about it Daddy started leaving us the minute he saw Sean. He was waiting for Sean. How did we know, we just knew.
Somewhere deep down inside there was that nagging feeling that he was going to leave us. Going back to the day Sean came. The monkey. I was helping mum put up the curtains Jitoko was out in the verandah and this car drives up the driveway. I notice its a rental so I ask mum if she is expecting someone and Jitoko goes it looks like Sean. I figure somethings wrong with my husband to be seeing Sean of all people. And sure enough he steps out of the car and goes "hey Jitoko how's it"...haha....the bugger. Surprised us all. not a single person knew he was coming. Neither in New Zealand nor in Fiji. He is still walking up the driveway when this twin cab parks right behind him. William Danford of all people saw him driving up the road and stopped just to be sure. Typical Sean moment.

Tuesday, February 18, 2014

New place to test output

Found this website jsbin.com for testing output of code. All thanks to this tutorial to create a simple push message and log it on your browser developer tool setting. Love it when code works

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <p id="hello">hello world</p>
<script src="http://js.pusher.com/2.1/pusher.min.js"> </script>  
 <script>
   Pusher.log=function(msg){
  console.log(msg);
   }
   var pusher = new Pusher('Your_api_key');
  pusher.connection.bind('connected',connected);
   function connected(){
   document.getElementById('hello').innerText='CONNECTED';
   }
  </script>  
</body>
</html>

Django Week 2 and 1/2

So there's Django and then there's Django customised by Koli. Arrgh
After installing and reinstalling Django and python and python and Django 3times in the last 10days and only because Koli's websites run on Django 1.3. So started with 1.5.5 which is the most recent and python 2.5.7. Everything installed fine. Then took Koli's FIT project and found that it would not run with my postgres SQL 9 so installed 9 and installed 8. Only to find that the problem was with the database configuration definition. Got that sorted:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'fit',                      # Or path to database file if using sqlite3.
        'USER': 'postgres',                      # Not used with sqlite3.
        'PASSWORD': 'c',                  # Not used with sqlite3.
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
        'PORT': '5432',                      # Set to empty string for default. Not used with sqlite3.
    }
}

Once that was sorted found already_exists problem in models.py
(Another compatibility problem)
 fb_app_url = models.URLField(null=True, blank=True)
Fixed that

common commands for checking if everything will work and run fine
manage.py syncdb (sync database)

manage.py validate

manage.py runserver --traceback





CURL

Learning CURL today. Will be using it to push updates to a subscriber for our NZ database. first to find then install curl

Step One: Install Visual C++ 2008 Redistributables
For 64bit systems
Visual C++ 2008 Redistributables (x64)
For 32bit systems
Visual C++ 2008 Redistributables (x32)

Step Two: Install Win(32/64) OpenSSL v1.0.0k Light
For 64bit systems
Win64 OpenSSL v1.0.0k Light
For 32bit systems
Win32 OpenSSL v1.0.0k Light

Step Three: Install cURL

Depending on if your system is 32 or 64 bit, download the corresponding curl.exe.
For example, go to the Win32 - Generic section and download the Win32 binary with SSL support (the one where SSL is not crossed out).
Unzip the file and copy curl.exe to C:\Windows\System32
Step Four: Install Recent CA Certificates

Do not skip this step.
Download a recent copy of valid CERT files from http://curl.haxx.se/docs/caextract.html.
Copy it to the same folder as you placed curl.exe (C:\Windows\System32) and rename it curl-ca-bundle.crt.
Test cURL

Be sure you are an Admin in Canvas.
Open a DOS command window, type in the following and press enter
curl https://yourcanvas.test.instructure.com (replace [yourcanvas] with your Canvas domain name)
You should get raw HTML output on the screen.
If you get an error such as ‘Command not found’ then cURL has not been installed

Notes on Running Commands
The DOS environment doesn't seem to like single quotes. Any example that uses single quotes to surround values is invalid on windows. The single quotes must be replaced with double quotes.
curl.exe -X POST -H "Content-Type: application/zip" --data-binary @BATCH_CANVAS_ACCOUNTS-TC.zip -H "Authorization: Bearer 7Ec3AJXBsRIgvFjkcF8P3rCtzDilNm8LuHcF5fki2" "https://<yourdomain>.instructure.com/api/v1/accounts/<your_account>/sis_imports.json?import_type=instructure_csv"

This was a really cool site for how to install with the different options of installing: http://www.confusedbycode.com/curl/

Now for the pusher test. Too cool
Go to pusher.com
Click Try it now
Paste the code provided in your command prompt

cool huh?

Wednesday, February 5, 2014

So far so good

First Django tutorial


views.py and urls.py on the bottom
from django.http import HttpResponse

def hello(request):
return HttpResponse("Hello world")

from django.conf.urls.defaults
import patterns, include, url  

urlpatterns = patterns('',  )

Tuesday, February 4, 2014

Attempt 2

At learning Django. So far so good.

One Month Today

Its one month today daddy. This is alot harder than I thought. Everything was too fast, I still have not been able to write about it. Slowly coming to terms with the fact that you will not be there when I get home, you will not be there when I walk out of my room, you will not be there to call to turn on the light, off the light, on the radio, off the radio. I wish I had known. I wish I had had more time. There so many things I would have done differently. Most of all I wish you were still here. Jaydon keeps asking and I am running out of answers. Mummy keeps weeping and I don't know what to do. I can't even weep because I don't even know what to do. I miss you daddy. If you're looking down on us right now, know that its hard but we'll take care of mum and Jaydon. I look back now and realise I saw all the signs but tried to ignore it. Now I wish I had just stayed home on that day. Don't know if it would have made a difference but I would have done it differently I think