Skip to content

Instantly share code, notes, and snippets.

View 11xor6's full-sized avatar

Nik Hodgkinson 11xor6

  • San Francisco, CA
View GitHub Profile
@11xor6
11xor6 / backend-rest.py
Last active August 29, 2015 14:01
BraveNewTalent -- Lead Engineer Technical Test -- Nik Hodgkinson
users = [{"id": 40, "name": "Joe Bloggs", "posts": 4},
{"id": 567, "name": "Jenny Smith", "posts": 3},
{"id": 3, "name": "Frank Jones", "posts": 54},
{"id": 46, "name": "Samantha Wills", "posts": 0},
{"id": 6789, "name": "Ahmed Joseph Naran", "posts": 15}]
def userTransform(user):
name = user["name"].rsplit(" ", 1)
return {"first_name": name[0], "last_name": name[1], "posts": user["posts"]}
@11xor6
11xor6 / install-cloud-init.sh
Last active December 12, 2015 07:28
Install cloud-init on RHEL or Centos 6 for use on AWS.
# We need the latest epel-release for a RHEL/Centos specific cloud-init
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
# After this finishes you can build an AMI that will process the user data
# with cloud-init. You may also be interested in taking a look at the config
# file at /etc/cloud/cloud.cfg
yum install cloud-init