{about: ["software","computing","maths","business","etc"]}



Orchestra Blog: Hello CodeWorks!

orchestra:

We are very happy to be joining the CodeWorks crew in the Madison, Nashville and Orlando. If you’re not familiar with the CodeWorks conference, it is a traveling PHP conference, that could quite possibly be coming to a city near you (if you’re in the US, that is). At $100 for the…

"when": " 2011-12-02T14:33:00+00:00, "by": "reblogged davidcoallier"
permalink




Persuasion and Influence

Persuasion and Influence is all about SPICE!

After all of Kevin’s experiments and findings, he boils persuading people down to these 5 basic principles he calls SPICE.
S – Simplicity, Keep the message short, sharp, and simple and we’re more likely to believe it is true. 
P – Perceived Self Interest, Con men agree it’s the key to getting us to do something we didn’t think we wanted to. 
I – Incongruity, Surprise people – tell them your cupcake is 400 cents rather than 4 dollars and they are far more likely to buy it. 
C – Confidence, The more confident you are, the more we believe you’re right – even when we know your facts are wrong. 
E – Empathy, Look people in the eye, nod when they nod, tell them your from the same small town they are – we trust people like ourselves.

Taken from http://jtoy.net/2011/05/30/split-second-persuasion.html

"when": " 2011-05-31T16:32:49+00:00, "by": "davidcoallier"
permalink
tagged: persuasion, influence, spice, interesting,






Custom Domain with Static Amazon S3 Websites

Introduction

Only a few weeks ago, Amazon announced the ability for people to host static websites using Amazon S3.


It is fairly easy for most people to create a website using Amazon, however one thing I’ve noticed when setting up our status.orchestra.io page is that in order to have your own domain name associated to your Amazon S3 Static Website, you need to navigate through the documentation and find out how to do this yourself. Amazon doesn’t provide explicit help on how to use your own domain and this inherently can be a cause of headache. Worry not, it is quite simple.


Read More

"when": " 2011-03-05T17:02:00+00:00, "by": "davidcoallier"
permalink
tagged: custom-domain-name,, amazon, s3, website, technology, interest, static, orchestra.io,






In-Launch Startup

Introduction

As of late, it’s seen a myriad of articles and blog posts that illustrate the life of pre and post-launch startups. The hordes of articles explain how they did x, y and z or what has to be done when launching a startup. After contemplating the walls and whiteboards in my office, I figured: It would be nice, for a change, to take a step back and have an active, in-launch introspection. How do I feel only a few weeks away from a launch, has our vision changed?


Therefore the thesis of this post is: How does one feel and what goes through the mind of the creators of a startup not after, not before, but during the startup launch phase.

Read More







Single-Instance CloudWatch Stats with Boto

This is not an editorial post with a lot of content so beware! I’m merely writing this mental-note so it’ll help anyone who’s ever used boto to retrieve Amazon AWS CloudWatch statistics. 



Currently in boto, there’s no official extended documentation for CloudWatch. Most of the documentation is a 5 minutes tutorial and a blog post on boto’s author’s blog.



After swearing, crying, punching and laughing, I’ve managed to find out how to retrieve cloudwatch metrics per instance-id and not by retrieving a list of all metrics available to us as described in the aforementioned links.



Here goes nothing:

import datetime
import os
import sys


from boto.exception import BotoServerError
import boto


AWS_ACCESS_KEY = "XXX"
AWS_SECRET_KEY = "YYY"

class Error(Exception):
    pass


class InstanceDimension(dict):
    def __init__(self, name, value):
        self[name] = value


def main(argv):
    try:
                
        c = boto.connect_cloudwatch(AWS_ACCESS_KEY, AWS_SECRET_KEY)

        end   = datetime.datetime.now()
        start = end - datetime.timedelta(hours=2)

        stats = c.get_metric_statistics(
            60, 
            start, 
            end, 
            'CPUUtilization', 
            'AWS/EC2', 
            'Average', 
            InstanceDimension("InstanceId", 'i-xxx')
        )

        print stats
            

    except BotoServerError as serverErr:
        print json.dumps({
            "error": "Error retrieving CloudWatch metrics."
        })


if __name__ == "__main__":
    main(sys.argv[1:])

The magic happens in boto.ec2.cloudwatch.CloudWatch.get_metric_statistics or as above in c.get_metric_statistics. The parameters order is essentially: 

  1. period: The granularity, in seconds, of the returned datapoints.
  2. start_time: Used to determine the first datapoint to return.
  3. end_time: Used to determine the last datapoint to return.
  4. metric_name: The name of the metric to retrieve.
  5. namespace: Either AWS/EC2 for single-instance or AWS/ELB for load balancers.
  6. statistics: The metric statistic to return.
  7. dimension: This is the culprit, the one that made me swear. It’s essentially an object with the dimension you want to pass. A dimension is say in our case… the InstanceId

That’s it. Simple enough. I’ve ran into problems with empty resultsets because I originally had a typo in the InstanceDimension’s first parameter and I had it set to InstanceID where it has to be typed correctly as InstanceId.



Hopefully this helps and yes I know I could replace my InstanceDimension with {‘InstanceId’: ‘…’}.

"when": " 2011-02-13T12:18:01+00:00, "by": "davidcoallier"
permalink




Wildcard /etc/hosts, an alternative

Now is time to breathe a sigh of relief — at least if you are on OSX. In this short blog post I’ll show you how to setup a local nameserver using dnsmasq, setup a wildcard Virtual Host in Apache 2.0.x and be running in minutes without a million entries in your /etc/hosts file.

Read More

"when": " 2010-12-09T16:42:00+00:00, "by": "davidcoallier"
permalink
tagged: development,, dnsmasq, developers, help, apache, wildcard-domain, vhost,






Node.js, WebSockets and talking JSON

Over the past few weeks, I’ve been playing substantially more with Node.js and Socket.io — its WebSockets implementation. It is simple to get running and communicating with a browser is relatively simple using the client code provided with Socket.io.


For those unfamiliar with WebSockets, one basically has to send messages to the server and the server handles them. Those “messages” are theoretically plain text and fairly lightweight.


As I’m developing some sort of multiplayer board-game, the messages being sent to the server and received back have to include a bit more than only a splinter of a string, therefore, I started investigating how I could communicate complex messages with my WebSockets server. JSON came to the rescue.

Read More

"when": " 2010-12-07T14:46:00+00:00, "by": "davidcoallier"
permalink
tagged: help, html5, jquery, json, node.js, technology, tutorial, v8, websockets, javascript,






UIAlertView size modification

So as I’m playing more and more with ObjC and Cocoa, I come across some strange issues and instead of taking notes as I usually do in my notebook, I’ve decided to blog my code snippets every single time I find something useful.

Read More

"when": " 2010-11-12T14:33:00+00:00, "by": "davidcoallier"
permalink
tagged: objc, cocoa, iphonedev, notes,






Extending Objects in Node.js

So you’ve been playing with Node.js and now you are at this point where you want to take your well acquired jQuery plugin development knowledge to Node.js but realise that there’s no such thing as $.extend() to combine your userland and API options in Node.

Read More

"when": " 2010-11-09T20:38:00+00:00, "by": "davidcoallier"
permalink
tagged: javascript, jquery, nodejs, developers,






Damn third party widgets!

A few weeks ago, FireSheep came out and everyone started hijacking their friend’s Twitter, Facebook, Dropbox, etc. profiles. A few weeks later, Zscaler Security released a firefox extension called BlackSheep which would basically allow you to detect FireSheep and protect you against it.

Even though it seems like a cool widget, it contains binary code which the source code is not apparently available anywhere (Please correct me if I’m wrong). Apart from the code present in the extension, I do not consider this a viable solution for Firesheep as I can’t trust it, so I started developing a little chrome extension that would roughly force every direct request to use HTTPS.

Read More

"when": " 2010-11-09T14:34:00+00:00, "by": "davidcoallier"
permalink
tagged: security,, facebook, twitter, firesheep, computers,