Why is it so

  • Why do we press harder on a remote control when we know the batteries are almost dead?
  • Why do banks charge a fee on ‘insufficient funds’ when they already know there is not enough money?
  • Why does someone believe you when you say there are four billion stars; but have to check when you say the paint is still wet?
  • Why doesn’t Tarzan have a beard?
  • Why does Superman stop bullets with his chest, but ducks when you throw a revolver at him?
  • Why do Kamikaze pilots wear helmets?
  • Whose idea was it to put an ‘S’ in the word ‘lisp’?
  • If people evolved from apes, why are there still apes?
  • Why is it that no matter what color bubble bath you use the bubbles are always white?
  • Is there ever a day that mattresses are not on sale?
  • Why do people constantly return to the refrigerator with hopes that something new to eat will have materialized?
  • Why do people keep running over a string a dozen times with their vacuum cleaner, then reach down, pick it up, examine it, then put it down to give the vacuum one more chance?
  • Why is it that no plastic bag will open from the end on your first try?
  • How do those dead bugs get into those enclosed light fixtures?
  • When we are in the supermarket and someone rams our ankle with a shopping cart then apologizes for doing so, why do we say, ‘It’s all right?’ Well, it isn’t all right, so why don’t we say, ‘That really hurt, why don’t you watch where you’re going?’
  • Why is it that whenever you attempt to catch something that’s falling off the table you always manage to knock something else over?
  • In winter why do we try to keep the house as warm as it was in summer when we complained about the heat?
  • How come you never hear father-in-law jokes?
  • And my FAVORITE…
  • The statistics on sanity is that one out of every four persons is suffering from some sort of mental illness. Think of your three best friends — if they’re okay, then it’s you.
Posted in Development | Leave a comment

Would you allow this man to marry your daughter

I know it’s old fashion but if you received this letter asking for your daughters hand in marriage would you allow the marriage?

This is an extract from a letter sent from Adoniram Judson to John Hasseltine, the father of Ann, the woman he wished to marry.

“I have now to ask whether you can consent to part with your daughter early next spring, to see her no more in this world? whether you can consent to her departure to a heathen land, and her subjection to the hardships and sufferings of a missionary life? whether you can consent to her exposure to the dangers of the ocean; to the fatal influence of the southern climate of India; to every kind of want and distress; to degradation, insult, persecution, and perhaps a violent death? Can you consent to all this, for the sake of Him who left His heavenly home and died for her and for you; for the sake of perishing, immortal souls; for the sake of Zion and the glory of God? Can you consent to all this, in hope of soon meeting your daughter in the world of glory, with a crown of righteousness brightened by the acclamations of praise which shall redound to her Saviour from heathens saved, through her means, from eternal woe and despair?”

Adoniram Judson in John Piper, Filling Up the Afflictions of Christ: The Cost of Bringing the Gospel to the Nations in the Lives of William Tyndale, Adoniram Judson, and John Paton (Crossway Boo2009), 92

I still don’t know what I would do

Posted in Life | Leave a comment

Cache busting a pdf document

This fixes a problem I was having with PDF files being cached

That being when PDF documents are continually loaded from the browsers cache. 

1
2
3
4
5
6
7
$(document).ready(function() {
// All pdf documents will have a cache busting
// string added to its url
$("a[href $='.pdf']").click(function(){
             $(this).attr('href', $(this).attr('href') + '?cache=' + math.floor(Math.random()*10000000) );
        });
})

Continue reading

Posted in Development, Jquery | Leave a comment

Bridging PHP with jQuery.taconite

Part 1

Over the years that I’ve been using PHP I’ve often wanted a way to send information/data from the server-side (PHP) to the browser-side (HTML) without the need for the reloading of the page. This, of course, can be achieved through the use of AJAX/JAVASCRIPT and PHP but manipulating elements within the HTML page is never made clearly enough for my befuddled old brain.

Until now…

Continue reading

Posted in Development, PHP | Tagged , , , , , , , | Leave a comment

Apache htaccess assets serving

Serve up gzip assets if available

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<FilesMatch "\\.js.gz$">
    ForceType text/javascript
    Header set Content-Encoding: gzip
</FilesMatch>

<FilesMatch "\\.js$">
    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} !".*Safari.*"
    RewriteCond %{HTTP_USER_AGENT} !".*MSIE.*"
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{REQUEST_FILENAME}.gz -f
    RewriteRule (.*)\.js$ $1\.js.gz [L]
    ForceType text/javascript
</FilesMatch>

<FilesMatch "\\.css.gz$">
    ForceType text/css
    Header set Content-Encoding: gzip
</FilesMatch>

<FilesMatch "\\.css$">
    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} !".*Safari.*"
    RewriteCond %{HTTP_USER_AGENT} !".*MSIE.*"
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{REQUEST_FILENAME}.gz -f
    RewriteRule (.*)\.css$ $1\.css.gz [L]
    ForceType text/css
</FilesMatch>

Caching assets

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css)$">
    Header unset Last-Modified
    Header unset ETag
    FileETag None
    Header unset Last-Modified 
</FilesMatch>
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A300
    ExpiresByType image/x-icon A2592000
    ExpiresByType application/x-javascript A3600
    ExpiresByType text/javascript A604800  
    ExpiresByType text/css A604800
    ExpiresByType image/gif A604800
    ExpiresByType image/png A604800
    ExpiresByType image/jpeg A604800
    ExpiresByType text/plain A300
    ExpiresByType application/x-shockwave-flash A604800
    ExpiresByType video/x-flv A604800
    ExpiresByType application/pdf A604800
    ExpiresByType text/html A300
</IfModule>
Posted in Development | Leave a comment