Geeklog Item Feed http://geeklog.adamwilson.info/ Adam Wilson Geeklog entries Mon, 23 Apr 2012 19:00:04 BST en-gb <![CDATA[installing node.js on OSX10.5.8]]> http://geeklog.adamwilson.info/article/57/installing-node-js-on-OSX10-5-8 http://geeklog.adamwilson.info/article/57/installing-node-js-on-OSX10-5-8 Mon, 23 Apr 2012 19:00:04 BST Macintosh:~ Toby$ node and got a big old error looking like so dyld: unknown required load command 0x80000022 Trace/BPT trap So then I thought I should go for the source code and do the .configure, make, make install thing. That didn't work either I ended up in the same place so then hit google. This guy was funny on OSX and actually some help although I thankfully I didn't need to go to the extremes he went to. http://canonical.org/~kragen/compiling-node-on-macos.html. Once I had downloaded the sourcecode and changed into the expanded directory I just did this export PATH=/Developer/usr/bin:$PATH ISYSROOT="-isysroot /Developer/SDKs/MacOSX10.5.sdk" export LINKFLAGS=$ISYSROOT CXXFLAGS=$ISYSROOT CFLAGS=$ISYSROOT ./configure --prefix=$HOME --without-ssl make make install Now it seems to work dandy without ssl but this is just to try it out. I installed node-v0.6.15. ]]> <![CDATA[Trying out cloudflare]]> http://geeklog.adamwilson.info/article/56/Trying-out-cloudflare http://geeklog.adamwilson.info/article/56/Trying-out-cloudflare Tue, 10 Apr 2012 12:36:33 BST Note: Since I wrote this I had some issues with this cloudflare losing their dns connection to dreamhost and the original site. So I've shifted it off cloudflare for a bit whilst I figure that out.
So when I saw cloudflare I was quite interested to see how much difference it would make to the loading time of this site. I ran some simples tests before and after to see what difference it made along with a test of the same site on my local machine for comparison. I've bunged them in here if they are of any use to you. ------------------------------------------------------------------------ online at Dreamhost pre cloudfare ------------------------------------------------------------------------ Benchmarking geeklog.adamwilson.info (be patient).....done Server Software: Apache Server Hostname: geeklog.adamwilson.info Server Port: 80 Document Path: / Document Length: 12018 bytes Concurrency Level: 10 Time taken for tests: 8.023 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Total transferred: 1242420 bytes HTML transferred: 1218627 bytes Requests per second: 12.46 [#/sec] (mean) Time per request: 802.320 [ms] (mean) Time per request: 80.232 [ms] (mean, across all concurrent requests) Transfer rate: 151.22 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 174 182 4.7 181 202 Processing: 403 590 284.8 501 1608 Waiting: 216 346 289.9 263 1414 Total: 580 772 286.3 692 1792 Percentage of the requests served within a certain time (ms) 50% 692 66% 779 75% 792 80% 799 90% 848 95% 1748 98% 1779 99% 1792 100% 1792 (longest request) this is the site on my testing server on localhost ----------------------------------------------------------------------- On my mac Toby ----------------------------------------------------------------------- Macintosh:~ Toby$ ab -n 100 -c 10 http://geeklog.adamwilson.info.toby/ This is ApacheBench, Version 2.3 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking geeklog.adamwilson.info.toby (be patient).....done Server Software: Apache/2.2.21 Server Hostname: geeklog.adamwilson.info.toby Server Port: 80 Document Path: / Document Length: 8655 bytes Concurrency Level: 10 Time taken for tests: 1.633 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Total transferred: 895700 bytes HTML transferred: 865500 bytes Requests per second: 61.23 [#/sec] (mean) Time per request: 163.327 [ms] (mean) Time per request: 16.333 [ms] (mean, across all concurrent requests) Transfer rate: 535.55 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 1.8 0 13 Processing: 64 159 33.2 160 253 Waiting: 64 153 30.6 154 241 Total: 65 159 33.0 160 254 Percentage of the requests served within a certain time (ms) 50% 160 66% 167 75% 172 80% 177 90% 204 95% 229 98% 242 99% 254 100% 254 (longest request) This the site once it was on cloudflare ----------------------------------------------------------------------------- On cloudflare ----------------------------------------------------------------------------- Last login: Sun Apr 8 11:17:09 on console Macintosh:~ Toby$ ab -n 100 -c 10 http://geeklog.adamwilson.info/ This is ApacheBench, Version 2.3 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking geeklog.adamwilson.info (be patient).....done Server Software: cloudflare-nginx Server Hostname: geeklog.adamwilson.info Server Port: 80 Document Path: / Document Length: 12020 bytes Concurrency Level: 10 Time taken for tests: 6.619 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Total transferred: 1265229 bytes HTML transferred: 1214025 bytes Requests per second: 15.11 [#/sec] (mean) Time per request: 661.933 [ms] (mean) Time per request: 66.193 [ms] (mean, across all concurrent requests) Transfer rate: 186.66 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 34 39 3.3 38 54 Processing: 255 604 519.0 349 2091 Waiting: 210 493 508.0 228 1973 Total: 293 643 520.2 390 2139 Percentage of the requests served within a certain time (ms) 50% 390 66% 456 75% 892 80% 1019 90% 1542 95% 2075 98% 2120 99% 2139 100% 2139 (longest request) I also ran some ping tests another site on same dreamhost hosting account no cloudflare ----------------------------------------------------------- round-trip min/avg/max/stddev = 173.442/173.796/174.234/0.329 ms this site with cloudflare ------------------------------------------------------------ round-trip min/avg/max/stddev = 31.984/33.248/34.279/0.721 ms Conclusion: So my ping time is better because its coming off a server in the UK now. The site generally doesn't seem that much faster but it was pretty fast to start with. Sue it will affect other sites more dramatically. To be honest this is really excessive for this site, its really simple and I don't pay for bandwidth anyway but it seems better to try stuff out on your own site rather than on a clients. Its free though so no bother to try out and if your on dreamhost you don't even have to mess with dns, only tick a box and let them do it. Some cloudflare oddities : if you add a subdomain they say they have added the root domain so you do add geeklog.adamwilson.info, they say thankyou for adding adamwilson.info. Ignore this. Also they see themselves as a security layer for your site. I wasn't particularly interested in that, there aren't comments on this site and its not really something i'm worried about hackers on. By default they block certain ip's with a captcha challenge. That seemed a bit unfriendly to me so I turned it off you can tweak this how you want. You can turn it for your admin area or some other bit. They also do email obfuscation If your not already doing that. There are a lot of different features including analytics. Its quite neat. ]]>
<![CDATA[Easing equations]]> http://geeklog.adamwilson.info/article/55/Easing-equations http://geeklog.adamwilson.info/article/55/Easing-equations Mon, 09 Apr 2012 19:00:15 BST this site lists a whole bunch in actionscript code snippets so you can see what kind of thing your aiming at and get a preview of the what each term means. Along with the math behind each one. Was useful for me anyway sure you could use in Javascript too with some adaptions. ]]> <![CDATA[deploy script]]> http://geeklog.adamwilson.info/article/54/deploy-script http://geeklog.adamwilson.info/article/54/deploy-script Thu, 05 Apr 2012 19:00:05 BST #!/bin/sh # you could put the things to --exclude in a separate text file if they # get to lengthy # application_name="shiny.thing"; deploy_server="example.com"; deploy_server_folder="example.com.folder/"; ssh_user="XXXXXX"; script_location="./"; echo "Deploying '$application_name' to '$deploy_server' in folder '$deploy_server_folder'" echo "Reading source $script_location" rsync -avuz --delete --stats ./ $ssh_user@$deploy_server:$deploy_server_folder --exclude '.git' --exclude 'sessions' --exclude 'deploy.sh' --exclude 'test.php' --exclude '.DS_Store' echo "Deployment successful and so much speedier than ftp/sftp" Guess I'll improve this quite a bit over next few weeks as I use it for a few more sites, perhaps also work out a way of not getting prompted for the SSH password each time too. Perhaps though prompting might be a good thing. ]]> <![CDATA[trying to figure out why wordpress doing so many database queries]]> http://geeklog.adamwilson.info/article/53/trying-to-figure-out-why-wordpress-doing-so-many-database-queries http://geeklog.adamwilson.info/article/53/trying-to-figure-out-why-wordpress-doing-so-many-database-queries Wed, 28 Mar 2012 19:00:20 BST <![CDATA[Grub boot loader bust]]> http://geeklog.adamwilson.info/article/52/Grub-boot-loader-bust http://geeklog.adamwilson.info/article/52/Grub-boot-loader-bust Wed, 28 Mar 2012 19:00:17 BST my geek opinions. Once I'd and ran 'boot-repair' it ran fine went through stages and fixed the boot loader and now his netbook seems to be working fine. Which is nice because I'm only a beginner to Ubuntu. ]]> <![CDATA[Poking Google charts]]> http://geeklog.adamwilson.info/article/51/Poking-Google-charts http://geeklog.adamwilson.info/article/51/Poking-Google-charts Thu, 08 Mar 2012 20:00:54 GMT https://chart.googleapis.com/chart?chs=500x225&cht=gom&chd=t:80&chco=FF0000,FF8040,FFFF00,009900&chxt=x,y&chxl=0:|Woo!|1:|grr!|meh|shiny https://chart.googleapis.com/chart?cht=v&chs=200x100&chd=t:100,20,20,20,20,0,0&chdl=First|Second|Third&chco=ff0000,00ff00,0000ff https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=Why%20does%20everyone%20love%20QR%20codes https://chart.googleapis.com/chart?chst=d_fnote&chld=balloon|1|000000|l|magic+monkey|moo+woo ]]> <![CDATA[Getting your authorship on your sites google search results]]> http://geeklog.adamwilson.info/article/50/Getting-your-authorship-on-your-sites-google-search-results http://geeklog.adamwilson.info/article/50/Getting-your-authorship-on-your-sites-google-search-results Wed, 29 Feb 2012 20:00:08 GMT <a href="https://plus.google.com/u/0/101603140027014722427/about" rel="author">Adam</a> just swap the '101603140027014722427' for whatever the number is in your profile url. I'm not sure how long it took but think I next looked a couple of weeks later and my google profile picture was appearing in the search results by then. Probably depends on how often you get crawled. Guess it would be good if you were guest blogging on a site. You can test that you have done it ok by visiting http://www.google.com/webmasters/tools/richsnippets and typing in your url. ]]> <![CDATA[Removing profiles from web images on a mac 10.5.8]]> http://geeklog.adamwilson.info/article/48/Removing-profiles-from-web-images-on-a-mac-10-5-8 http://geeklog.adamwilson.info/article/48/Removing-profiles-from-web-images-on-a-mac-10-5-8 Thu, 09 Feb 2012 20:00:03 GMT background-color:#8063CE; so they should match but they were coming out slightly different colors. I think because the browser is using the profile when display the image. Neatly my mac came with a script that lets me remove the profile but its hidden at /Library/Scripts/ColorSync ]]> <![CDATA[browser size by percentage of users]]> http://geeklog.adamwilson.info/article/49/browser-size-by-percentage-of-users http://geeklog.adamwilson.info/article/49/browser-size-by-percentage-of-users Thu, 09 Feb 2012 20:00:03 GMT browser size tool available giving an estimate of what percentage of viewers will be see what proportion of your site. It seems a simple way of viewing it. You can put in your own url and see what percentage of people are missing the extremities of your site. I guess its only as reliable as their figures are but its a start. ]]> <![CDATA[installing tree command on os x]]> http://geeklog.adamwilson.info/article/47/installing-tree-command-on-os-x http://geeklog.adamwilson.info/article/47/installing-tree-command-on-os-x Wed, 25 Jan 2012 20:00:03 GMT <![CDATA[Behaviour Driven Development & Behat]]> http://geeklog.adamwilson.info/article/46/Behaviour-Driven-Development-Behat http://geeklog.adamwilson.info/article/46/Behaviour-Driven-Development-Behat Wed, 18 Jan 2012 20:00:07 GMT here. I'm not sure if BDD will fit in with how I work at the moment but I'm adding http://behat.org/ and to my list of things to poke and find out more about and see if it works for me. Adam ]]> <![CDATA[Quick view of the technologies that a site is built with]]> http://geeklog.adamwilson.info/article/45/Quick-view-of-the-technologies-that-a-site-is-built-with http://geeklog.adamwilson.info/article/45/Quick-view-of-the-technologies-that-a-site-is-built-with Wed, 11 Jan 2012 20:00:52 GMT builtwith.com Gives you server, info about analytics, js, doctype, cms etc. Bit quicker than perusing the sites source. ]]> <![CDATA[jsconsole]]> http://geeklog.adamwilson.info/article/44/jsconsole http://geeklog.adamwilson.info/article/44/jsconsole Tue, 10 Jan 2012 20:00:04 GMT <![CDATA[can't use 'name' as a form field in WordPress]]> http://geeklog.adamwilson.info/article/41/can-t-use-name-as-a-form-field-in-WordPress http://geeklog.adamwilson.info/article/41/can-t-use-name-as-a-form-field-in-WordPress Thu, 05 Jan 2012 20:00:03 GMT <![CDATA[reducing the number of post revisions in WordPress]]> http://geeklog.adamwilson.info/article/42/reducing-the-number-of-post-revisions-in-WordPress http://geeklog.adamwilson.info/article/42/reducing-the-number-of-post-revisions-in-WordPress Thu, 05 Jan 2012 20:00:03 GMT define('WP_POST_REVISIONS', 3); ]]> <![CDATA[User Agent Style sheets]]> http://geeklog.adamwilson.info/article/43/User-Agent-Style-sheets http://geeklog.adamwilson.info/article/43/User-Agent-Style-sheets Thu, 05 Jan 2012 20:00:03 GMT <![CDATA[jquery trim and ie 8]]> http://geeklog.adamwilson.info/article/40/jquery-trim-and-ie-8 http://geeklog.adamwilson.info/article/40/jquery-trim-and-ie-8 Fri, 30 Dec 2011 20:00:03 GMT this.value = this.value.trim(); Which worked fine in ff but pushed out error in IE8 its explained here http://stackoverflow.com/questions/3439316/ie8-and-jquerys-trim because ie js String doesn't do String.trim So I swapped to this and this.value = $.trim(this.value); the docs for jquery trim are here http://api.jquery.com/jQuery.trim/ ]]> <![CDATA[Hooray! my Firefox is up to date.]]> http://geeklog.adamwilson.info/article/39/Hooray-my-Firefox-is-up-to-date http://geeklog.adamwilson.info/article/39/Hooray-my-Firefox-is-up-to-date Wed, 28 Dec 2011 20:00:03 GMT <![CDATA[Setting wordpress language]]> http://geeklog.adamwilson.info/article/38/Setting-wordpress-language http://geeklog.adamwilson.info/article/38/Setting-wordpress-language Tue, 20 Dec 2011 20:00:12 GMT define('WPLANG', 'en-GB'); There is a list of language codes here http://tinyurl.com/yc2x2fk if your unsure of yours. ]]> <![CDATA[You want to change all file names containing ? to a ]]> http://geeklog.adamwilson.info/article/37/You-want-to-change-all-file-names-containing-to-a http://geeklog.adamwilson.info/article/37/You-want-to-change-all-file-names-containing-to-a Mon, 31 Oct 2011 19:00:08 GMT for filename in *.jpg; do newname=`echo $filename | sed -e 's/?/a/g'`; mv "$filename" "$newname"; done ]]> <![CDATA[How to access query execution time in cf]]> http://geeklog.adamwilson.info/article/35/How-to-access-query-execution-time-in-cf http://geeklog.adamwilson.info/article/35/How-to-access-query-execution-time-in-cf Sun, 23 Oct 2011 19:00:03 BST <cfoutput>#queryName.getMetaData().getExtendedMetaData().executionTime#</cfoutput> <cfoutput> #numberFormat(max(queryName.getMetaData().getExtendedMetaData().executionTime, 1)/1000, "0.000")# seconds </cfoutput> http://blog.pengoworks.com/index.cfm/2008/11/17/Show-the-execution-time-of-any-query-in-ColdFusion-8 ]]> <![CDATA[Changing hard drive on imac 7]]> http://geeklog.adamwilson.info/article/36/Changing-hard-drive-on-imac-7 http://geeklog.adamwilson.info/article/36/Changing-hard-drive-on-imac-7 Sun, 23 Oct 2011 19:00:03 BST <![CDATA[Creating an excel file from a query for non db people]]> http://geeklog.adamwilson.info/article/34/Creating-an-excel-file-from-a-query-for-non-db-people http://geeklog.adamwilson.info/article/34/Creating-an-excel-file-from-a-query-for-non-db-people Mon, 17 Oct 2011 19:00:18 BST <cfif isdefined("url.xls")> <cfheader name="Content-Disposition" value="inline; filename=TestimonialsForDuncan.xls"> <cfcontent type="application/vnd.msexcel"> <table border="1"> <cfoutput query="Testimonials"> <cfif Testimonials.IsFirst()> <tr> <cfloop array="#Testimonials.getColumnList()#" index="i"><td>#i#</td></cfloop> </tr> </cfif> <tr> <cfloop array="#Testimonials.getColumnList()#" index="i"><td>#Testimonials[i][currentRow]#</td></cfloop> </tr> </cfoutput> </table> <cfabort> </cfif ]]> <![CDATA[background gradient css]]> http://geeklog.adamwilson.info/article/32/background-gradient-css http://geeklog.adamwilson.info/article/32/background-gradient-css Sun, 09 Oct 2011 19:00:08 BST background: #a90329; /* Old browsers */ background: -moz-linear-gradient(top, #a90329 0%, #ed04c2 13%, #04ccd3 40%, #0cba03 76%, #6d0019 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a90329), color-stop(13%,#ed04c2), color-stop(40%,#04ccd3), color-stop(76%,#0cba03), color-stop(100%,#6d0019)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, #a90329 0%,#ed04c2 13%,#04ccd3 40%,#0cba03 76%,#6d0019 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, #a90329 0%,#ed04c2 13%,#04ccd3 40%,#0cba03 76%,#6d0019 100%); /* Opera11.10+ */ background: -ms-linear-gradient(top, #a90329 0%,#ed04c2 13%,#04ccd3 40%,#0cba03 76%,#6d0019 100%); /* IE10+ */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a90329', endColorstr='#6d0019',GradientType=0 ); /* IE6-9 */ background: linear-gradient(top, #a90329 0%,#ed04c2 13%,#04ccd3 40%,#0cba03 76%,#6d0019 100%); /* W3C */ ]]> <![CDATA[coordinates for combined background images css]]> http://geeklog.adamwilson.info/article/33/coordinates-for-combined-background-images-css http://geeklog.adamwilson.info/article/33/coordinates-for-combined-background-images-css Sun, 09 Oct 2011 19:00:08 BST <![CDATA[Glype as proxy]]> http://geeklog.adamwilson.info/article/31/Glype-as-proxy http://geeklog.adamwilson.info/article/31/Glype-as-proxy Sun, 11 Sep 2011 07:00:17 BST <![CDATA[ExpiresByType mod_expires]]> http://geeklog.adamwilson.info/article/30/ExpiresByType-mod-expires http://geeklog.adamwilson.info/article/30/ExpiresByType-mod-expires Wed, 07 Sep 2011 19:00:03 BST ExpiresByType image/gif A7776000 didn't realise you could do like this ExpiresByType image/x-icon "access plus 9 month" its all here at http://httpd.apache.org/docs/2.0/en/mod/mod_expires.html ]]> <![CDATA[Making an submit element the right height in firefox]]> http://geeklog.adamwilson.info/article/29/Making-an-submit-element-the-right-height-in-firefox http://geeklog.adamwilson.info/article/29/Making-an-submit-element-the-right-height-in-firefox Wed, 24 Aug 2011 07:00:03 BST #submitElement::-moz-focus-inner {border:0;} http://christophzillgens.com/en/articles/equal-height-input-and-button-elements-in-firefox-and-safari and http://stackoverflow.com/questions/1679952/input-type-submit-text-vertical-alignment-in-firefox ]]> <![CDATA[htaccess info]]> http://geeklog.adamwilson.info/article/28/htaccess-info http://geeklog.adamwilson.info/article/28/htaccess-info Mon, 01 Aug 2011 07:00:11 BST |[T=MIME-type] and forbidden.html [F] and gone.html [G] all are new to me. Found that after looking into hardening wordpress here http://codex.wordpress.org/Hardening_WordPress which has some usefull stuff for the non wordpress site as well. | ]]> <![CDATA[Talk on regular expressions]]> http://geeklog.adamwilson.info/article/26/Talk-on-regular-expressions http://geeklog.adamwilson.info/article/26/Talk-on-regular-expressions Sun, 24 Jul 2011 19:00:10 BST <![CDATA[Ternary operators in cf]]> http://geeklog.adamwilson.info/article/27/Ternary-operators-in-cf http://geeklog.adamwilson.info/article/27/Ternary-operators-in-cf Sun, 24 Jul 2011 19:00:10 BST <![CDATA[Javascript Graphs YUI]]> http://geeklog.adamwilson.info/article/25/Javascript-Graphs-YUI http://geeklog.adamwilson.info/article/25/Javascript-Graphs-YUI Sun, 03 Jul 2011 19:00:03 BST <![CDATA[See all files in OS X finder]]> http://geeklog.adamwilson.info/article/24/See-all-files-in-OS-X-finder http://geeklog.adamwilson.info/article/24/See-all-files-in-OS-X-finder Fri, 20 May 2011 19:00:15 BST Olv:~ adam$ defaults write com.apple.finder AppleShowAllFiles TRUE Olv:~ adam$ killall Finder I was on Mac OS X 10.5.8 ]]> <![CDATA[Learning prolog]]> http://geeklog.adamwilson.info/article/22/Learning-prolog http://geeklog.adamwilson.info/article/22/Learning-prolog Sun, 15 May 2011 19:00:10 BST www.cse.unsw.edu.au/~billw/prologdict.html and Learn Prolog Now Prologtastic ]]> <![CDATA[When is abstraction to much abstraction]]> http://geeklog.adamwilson.info/article/23/When-is-abstraction-to-much-abstraction http://geeklog.adamwilson.info/article/23/When-is-abstraction-to-much-abstraction Sun, 15 May 2011 19:00:10 BST LessCSS, SASS & CoffeeScript and I'm wondering just generally if that is the way to go? When does abstracting, make something simple more complicated. Should you be doing things in the simplest way possible. Is it introducing more possible points of failure? If you introduce these steps are you also increasing the understanding needed to edit something from just CSS to CSS + SASS? Perhaps I'm just confused post getting geoffed on Friday. ]]> <![CDATA[Stripping white space from file but preserving in code tags]]> http://geeklog.adamwilson.info/article/21/Stripping-white-space-from-file-but-preserving-in-code-tags http://geeklog.adamwilson.info/article/21/Stripping-white-space-from-file-but-preserving-in-code-tags Tue, 26 Apr 2011 07:00:08 BST /* strip out excess where not in code tags*/ /* all the white space with single space */ $data = preg_replace('/(?!(?:[^|[^>]+))(\s)/i'," ", trim($data)); /* all the double spaces */ $data = preg_replace("/(?!(?:[^|[^>]+))( ){2,}/"," ",$data); /* all the > < spaces with >< */ $data = preg_replace("/(?!(?:[^|[^>]+))(> ]]> <![CDATA[Division problems on 32bit OS]]> http://geeklog.adamwilson.info/article/20/Division-problems-on-32bit-OS http://geeklog.adamwilson.info/article/20/Division-problems-on-32bit-OS Mon, 18 Apr 2011 19:54:58 BST (7849431181 % 41) produces -1 which threw me then I read about it a little more if you want to tell if your php is running under 32bit OS try this: echo PHP_INT_MAX; // I get 2147483647 If your 32bit you get: 2147483647 If your 64bit like dreamhost servers are you get 9223372036854775807 That really confused me. ]]> <![CDATA[Moving your wordpress blog to a new domain name]]> http://geeklog.adamwilson.info/article/19/Moving-your-wordpress-blog-to-a-new-domain-name http://geeklog.adamwilson.info/article/19/Moving-your-wordpress-blog-to-a-new-domain-name Mon, 14 Mar 2011 07:00:09 GMT UPDATE wp_options SET option_value = replace(option_value, 'http://www.old.com', 'http://www.new.com') WHERE option_name = 'home' OR option_name = 'siteurl'; If its all new and has few plugins this is only one line but after a while it can get repetitive in the options Update your posts UPDATE wp_posts SET guid = replace(guid, 'http://www.old.com','http://www.new.com'); Drink tea! ]]> <![CDATA[Case sensitive fieldnames in cf]]> http://geeklog.adamwilson.info/article/18/Case-sensitive-fieldnames-in-cf http://geeklog.adamwilson.info/article/18/Case-sensitive-fieldnames-in-cf Thu, 10 Mar 2011 20:00:03 GMT <![CDATA[Learning awk]]> http://geeklog.adamwilson.info/article/17/Learning-awk http://geeklog.adamwilson.info/article/17/Learning-awk Sun, 30 Jan 2011 20:00:17 GMT <![CDATA[cfabort in cfscript]]> http://geeklog.adamwilson.info/article/16/cfabort-in-cfscript http://geeklog.adamwilson.info/article/16/cfabort-in-cfscript Fri, 28 Jan 2011 20:00:04 GMT <![CDATA[How to mess with web.config file properties]]> http://geeklog.adamwilson.info/article/15/How-to-mess-with-web-config-file-properties http://geeklog.adamwilson.info/article/15/How-to-mess-with-web-config-file-properties Thu, 27 Jan 2011 20:00:10 GMT <![CDATA[Cfquery returns null in query result as [empty string] when you cf dump it]]> http://geeklog.adamwilson.info/article/13/Cfquery-returns-null-in-query-result-as-empty-string-when-you-cf-dump-it http://geeklog.adamwilson.info/article/13/Cfquery-returns-null-in-query-result-as-empty-string-when-you-cf-dump-it Thu, 13 Jan 2011 20:00:12 GMT asc(field) Eq '0' when field is your db field to tell if is null or as craig says len(field) Eq '0' ]]> <![CDATA[in Cf 9 you can do IsNull()]]> http://geeklog.adamwilson.info/article/14/in-Cf-9-you-can-do-IsNull http://geeklog.adamwilson.info/article/14/in-Cf-9-you-can-do-IsNull Thu, 13 Jan 2011 20:00:12 GMT <![CDATA[SQL joins explained with pictures]]> http://geeklog.adamwilson.info/article/12/SQL-joins-explained-with-pictures http://geeklog.adamwilson.info/article/12/SQL-joins-explained-with-pictures Tue, 11 Jan 2011 20:00:09 GMT <![CDATA[CF_SQL_DECIMAL in cf]]> http://geeklog.adamwilson.info/article/11/CF-SQL-DECIMAL-in-cf http://geeklog.adamwilson.info/article/11/CF-SQL-DECIMAL-in-cf Tue, 04 Jan 2011 20:00:08 GMT <cfqueryparam value = "39.60" CFSQLType = "CF_SQL_DECIMAL" > so you need to do this <cfqueryparam value = "39.60" CFSQLType = "CF_SQL_DECIMAL" scale="2" > and then you get 39.60 which is what you wanted ]]> <![CDATA[Find your Dad factor]]> http://geeklog.adamwilson.info/article/10/Find-your-Dad-factor http://geeklog.adamwilson.info/article/10/Find-your-Dad-factor Tue, 04 Jan 2011 14:48:43 GMT #!/bin/sh Child=100; Grandchild=50; GreatGrandchild=25; Beard=30; echo "Hello, But are you a Dad if so find out your Dadness"; echo - "Enter ChildCount (1,2 etc) "; read ChildCount echo - "Enter GrandChildCount (1,2 etc) "; read GrandChildCount echo - "Enter GreatGrandChildCount (1,2 etc) "; read GreatGrandChildCount echo - "Do you have Have Beard (1,0)"; read BeardCount Dadness=$((( ( ($Child*$ChildCount)+($Grandchild*$GrandChildCount) )+( ($GreatGrandchild*$GreatGrandChildCount) )+( ($Beard*$BeardCount) ) ))); echo - "Your Dadness is: "$Dadness; Kept me quiet during wet lunchtime anyway. ]]> <![CDATA[Renaming files based on their modification date in bash]]> http://geeklog.adamwilson.info/article/9/Renaming-files-based-on-their-modification-date-in-bash http://geeklog.adamwilson.info/article/9/Renaming-files-based-on-their-modification-date-in-bash Fri, 31 Dec 2010 14:05:07 GMT #!/bin/sh ## # copies all files in folder to YYYYMMDD.extension from their modification time; # # @param folder where to look for files in and where the renamed files will end up # # @return renamed files in folder folder="test/" counter=0; for i in $folder* do counter=$[counter+1]; mon="" j=`stat -f %Sm "$i" | awk '{printf("%d-%s-%02d",$4,$1,$2)}'` #echo "$j"; ext=`echo ${i:(-4)} | tr '[:upper:]' '[:lower:]'`; #echo $ext; case `echo ${j:5:3}` in Jan) mon=01 ;; Feb) mon=02 ;; Mar) mon=03 ;; Apr) mon=04 ;; May) mon=05 ;; Jun) mon=06 ;; Jul) mon=07 ;; Aug) mon=08 ;; Sep) mon=09 ;; Oct) mon=10 ;; Nov) mon=11 ;; Dec) mon=12 ;; *) mon=ERR esac j=${j:0:4}$mon${j:9:2} echo "$i ->" $folder$j$ext; mv "$i" $folder$j$ext; done echo $counter" files in \""$folder"\" renamed"; ]]> <![CDATA[If you want to use location() in a cfscript tag in coldfusion]]> http://geeklog.adamwilson.info/article/8/If-you-want-to-use-location-in-a-cfscript-tag-in-coldfusion http://geeklog.adamwilson.info/article/8/If-you-want-to-use-location-in-a-cfscript-tag-in-coldfusion Fri, 24 Dec 2010 20:00:08 GMT location(url="page_to_relocate_to", addtoken="true|false", statuscode="404") rather than how it describes in cf documentation location(url="page_to_relocate_to", "true|false", "404") because that doesn't work. I couldn't comment on the cf docs because their form doesn't work for me ]]> <![CDATA[Bash Scripting Tutorial]]> http://geeklog.adamwilson.info/article/7/Bash-Scripting-Tutorial http://geeklog.adamwilson.info/article/7/Bash-Scripting-Tutorial Sun, 12 Dec 2010 20:00:11 GMT http://www.linuxconfig.org/Bash_scripting_Tutorial ]]> <![CDATA[An approach to writing better js]]> http://geeklog.adamwilson.info/article/6/An-approach-to-writing-better-js http://geeklog.adamwilson.info/article/6/An-approach-to-writing-better-js Wed, 17 Nov 2010 08:00:17 GMT http://ontwik.com/javascript/aaron-newton-programming-to-patterns/ ]]> <![CDATA[Woo!]]> http://geeklog.adamwilson.info/article/5/Woo http://geeklog.adamwilson.info/article/5/Woo Sat, 09 Oct 2010 07:00:05 BST <![CDATA[Starting with Git]]> http://geeklog.adamwilson.info/article/4/Starting-with-Git http://geeklog.adamwilson.info/article/4/Starting-with-Git Sun, 19 Sep 2010 17:22:58 BST http://www-cs-students.stanford.edu/~blynn/gitmagic/ch02.html ]]> <![CDATA[Coldfusion variable names can't contain a - character]]> http://geeklog.adamwilson.info/article/3/Coldfusion-variable-names-can-t-contain-a-character http://geeklog.adamwilson.info/article/3/Coldfusion-variable-names-can-t-contain-a-character Wed, 18 Aug 2010 20:06:50 BST Coldfusion Variable Naming Rules ]]> <![CDATA[Sqlite is the best thing thing since sliced bread]]> http://geeklog.adamwilson.info/article/2/Sqlite-is-the-best-thing-thing-since-sliced-bread http://geeklog.adamwilson.info/article/2/Sqlite-is-the-best-thing-thing-since-sliced-bread Sun, 15 Aug 2010 15:56:04 BST SQLite you should find out about it, it is really very neat. It seems to me that many people use sledgehammer databases like SQL server which are inappropriate for often nutcracker situations. SQLite allows things to be kept simple. ]]>