Skip to content

Instantly share code, notes, and snippets.

$generateKpiValue = function($metric_info) {
$words = explode('_', $metric_info['uid']);
array_shift($words);
return implode('', array_map('ucfirst', $words));
};
# Setting up dnsmasq for Local Web Development Testing on any Device
Please note, these instructions are for OS X Lion.
First, you need to get the IP address of your machine on your local network. In OS X, the easiest place to find this is in System Preferences > Network. If you're using DHCP on your local network, you will want to make sure your computer requests the same IP address when it renews it's IP address lease. I recommend configuring the DCHP Reservation settings on your router to accomplish this. Otherwise, you can specify a manual address in your network settings:
1. Go to *System Preferences > Network*
1. Click *Advanced...*
@jimrubenstein
jimrubenstein / ami-to-ebs.sh
Created December 16, 2011 19:56 — forked from hubgit/ami-to-ebs.sh
creating an EBS AMI from a running Instance
# in web browser
# http://uec-images.ubuntu.com/releases/karmic/release/
# canonical karmic 64-bit AMI:
# ami-55739e3c
# canonical karmic 32-bit AMI:
# ami-bb709dd2
# https://console.aws.amazon.com/ec2/home#c=EC2&s=Instances
# Launch Instance > Community AMIs