Is this really an @asda rollback?

This kind of rollback does nothing except help Asda with their stats i.e. "Rolling back 1000's of prices". I know, technically yes its a rollback, but really come'on.

Posted: 27-Jan-2012

View: 375

Permalink: here

Say NO to #ACTA

ACTA is one more offensive against the sharing of culture on the Internet. ACTA (Anti-Counterfeiting Trade Agreement) is an agreement secretly negotiated by a small "club" of like-minded countries (39 countries, including the 27 of the European Union, the United States, Japan, etc). Negotiated instead of being democratically debated, ACTA bypasses parliaments and international organizations to dictate a repressive logic dictated by the entertainment industries.

ACTA (Anti-Counterfeiting Trade Agreement) is the worlds #SOPA, though possibly worse in every way. If you live in the UK take 1 minute and make sure you get heard on this non-democratic process at http://epetitions.direct.gov.uk/petitions/20685.

Don't forget you can also tell your MP how you feel via theyworkforyou.com

If you want to know more about ACTA then check out http://www.laquadrature.net/ACTA

Just before I get off my soap box though what also bugs me is that this can be agreed on in principle by so many countries yet nothing can be done to the banking industry for years and after investigations?

Posted: 26-Jan-2012

View: 556

Permalink: here

O2 shares users phone numbers with every site they visit

Update: O2 have fixed this already)

Whenever a mobile user accesses a website from their phone they share information about that device with the site. It usually includes the web browser and the model of phone being used to allow the website to display its information in a way that suits your device. However, O2's mobile network in the UK is also apparently including the phone number of some users in the data.

The mobile phone number can be seen in the HTTP header

Malicious websites could use the information to target users with spam texts or scams.

Wow, just saw this on Sky news, seems like a silly mistake for someone to make. They probably had a reason for it but it seems silly!

I wanted to check if this was true and how easy it was with ColdFusion. Check if yours is visible at http://www.andyjarrett.co.uk/o2/, the code is below:

Posted: 25-Jan-2012

View: 433

Permalink: here

A quick tutorial for WebSQL

I've created a gist which gives you the basics for getting to grips with WebSQL. It's heavily commented and shows you the three core methods used (openDatabase,transaction,executeSql) and how to:

  1. Create a database
  2. Create a table
  3. Insert a record
  4. Get the data back in to HTML

Don't forget that WebSQL is currently only supported on Chrome, Opera, iPhone, and Android. It's not on Firefox(!) or Internet Explorer (shock).

To see your results right click on the page and Inspect Element to bring up the following window and go to the Resources tab. Under Databases you should find a table called fightclub

inspect element

Posted: 12-Jan-2012

View: 918

Permalink: here

BlogCFC and a new future ahead

A few weeks ago I came to realize that I was holding back BlogCFC as a product. I was a barrier to it growing. I thought about Joe Rinehart (a man I greatly admire) and his decision to hand over the reigns of Model-Glue to Dan Wilson, and it occurred to me that maybe it was time to do the same.

I just read the news over at the BlogCFC blog about Ray stepping to the side and can't help but feel this could give the project a needed kick it with new blood taking over the reins.

Thank you Ray for a great project, Scott when we seeing version 6 :p

Posted: 30-Dec-2011

View: 1099

Permalink: here

DateFormat in #nodejs

Adding some DateFormat functions to Node ended up being quite simple

view plain print about
1$ mkdir testDateFormat && testDateFormat
2$ npm install dateformat
3$ subl app.js

For this I installed it locally, you can always add -g to add it locally. The final line opens up a new file called app.js in Sublime Text 2 for me. In there we are going to create a simple web app (cause thats what you do with Node.js apparently) and quickly return the date to a Hello World program.

view plain print about
1var http = require('http');
2// requre the dateFormat
3var dateFormat = require('dateFormat')
4
5// Create a function to return the current Date and Time
6function getDateTime(){
7    var now = new Date();
8    return dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT");
9}
10
11
12http.createServer(function (req, res) {
13
14    // Add some output to the browser including date and time
15    var textResponse = "Hello world @ " + getDateTime() + '\n\nCheck out more at https://github.com/felixge/node-dateformat';
16    
17    // output to the browser
18    res.writeHead(200, {'Content-Type': 'text/plain'});
19    res.end( textResponse );
20    
21}).listen(1337, "127.0.0.1");
22
23// Tell the console when the server was started
24console.log('Server running on http://127.0.0.1:1337/ Started @ ' + getDateTime());

Once you've saved app.js call $ node app.js from the Terminal and go to http://localhost:1337.

This only scratches the service of what it can do, check out more at github.com/felixge/node-dateformat

Posted: 21-Dec-2011

View: 1179

Permalink: here

layout.jade for Twitters Bootstrap

When moving over to a templating system like Jade it is the silly things you get stuck on. This is probably more for my reference than anyone else but its a simple layout.jade to use with Twitters Bootstrap.

view plain print about
1!!!
2html
3    head
4        title= title
5        link(rel='stylesheet', href='http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css')
6
7    body
8        div.topbar
9            div.fill
10                div.container
11                    a(href='#').brand #{title}
12                    ul.nav
13                        li.active
14                            a(href='#') Home
15                        li
16                            a(href='http://www.andyjarrett.co.uk/blog') Blog
17                        li
18                            a(href='#') Contact    
19                            
20                            
21    div.container!= body
22        footer
23            p © Company 2011

Each of your views will then be within the container, you just need to add the div.row in each view file. Below is the current index file at andyjarrett.nodester.com (subject to change of course)

view plain print about
1div.hero-unit
2    h1 Hello Node and Nodester
3    p More content coming soon
4
5div.content
6    div.page-header
7    div.row
8        div.span6
9            h2 Currently using
10            p Jade and Express
11        div.span5
12            h2 Starting with Node.js
13            p <a href="http://www.andyjarrett.co.uk/blog/index.cfm/2011/4/20/Developing-with-NodeJs-starting-links">Links to start you off</a>
14        div.span5
15            h2 The message board
16            p.label.notice Coming soon

If you are looking for more documentation then check this out from the Scala communitya href="http://scalate.fusesource.org/documentation/jade-syntax.html">scalate.fusesource.org/documentation/jade-syntax.html

Posted: 21-Dec-2011

View: 1144

Permalink: here

Getting your Node JS + Express app deployed on Nodester

Nodester Allows you to Deploy your Node.JS applications to Nodester.com for FREE and is a good way to quickly get playing around with Node.js. The site has some quick guides for getting your app created and deployed within 40 seconds, this post is about getting from Hello World to having a Express+Jade site deployed. Before we continue some assumptions have been made: you know Git, you've installed Node, installed expressjs, signed up at nodester.com, and now just want to get your web goodness deployed to show the world.

The below commands are all run from a Mac terminal but should fire for any *nix.
  1. $ nodester app create [app name]
    • For this example my app will be called scribble and can be seen at scribble.nodester.com. When you run this call you will get a port number back i.e. 12332 Note this down!
  2. $ nodester app init scribble
    • At this point your app is running at http://[app name].nodester.com and you should see "Hello World". Basically you Node.js web app is running. Simples. Now we are going to add Express.js which is a node web framework.
  3. $ cd [app name]
  4. $ express
    • You'll get a message destination is not empty, continue?, type Yes and hit return at which point the folder structure will be setup.
  5. $ npm install dont forget to install dependencies
  6. When Express sets up it uses app.js and Nodester uses server.js easiest way to fix this is to run $ mv app.js server.js
  7. $ vi server.js open server.js and change the port number at the bottom (app.listen( xxxxx );) to the one you noted earlier i.e. 12332
  8. $ node server.js
    • We're running this to check everything is ok. Open your browser at localhost:[port number] and you should get the "Welcome to Express" message. Once you're happy go back to the terminal and ctrl-c
  9. $ git add .
  10. $ git commit -m"My first express.js commit"
  11. $ git push
  12. Thats it, the Push should of restarted your app, go to your Nodester URL and you should be up and running.

Posted: 19-Dec-2011

View: 1371

Permalink: here

Turn your web browser into a phone capable of making phone calls

Phono is a simple jQuery plugin and JavaScript library that turns any web browser into a phone; capable of making phone calls and sending instant messages. You can even connect to SIP clients; all with a simple unified API.

There are some amazing APIs popping up out there and this is an example of one that I could imagine being really handing for instant call support. The only problem which is stopping me from jumping in now is US domestic calls only at the moment. If you try it out let me know.

Posted: 09-Dec-2011

View: 1124

Permalink: here

Free cross-browser testing from your browsers

Browserling is an interactive cross-browser testing tool inside of your browser built with Node.js. There are a few of these popping up now and if you do any testing its most likely worth the investment if you don't want the VMs running locally or want to show a client away from the office!

Browserling, cross browser testing from your browser

Posted: 08-Dec-2011

View: 1168

Permalink: here

More Entries