I hereby claim:
- I am roydondsouza on github.
- I am roydondsouza (https://keybase.io/roydondsouza) on keybase.
- I have a public key ASBp6aENl5We3jJdAOEXu4qp6vfm4VZRCE-yKn6hv9S6bAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Note: This was written using elasticsearch 0.9.
Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:
$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
"_id": 1,| var myConfObj = { | |
| iframeMouseOver : false | |
| } | |
| window.addEventListener('blur',function(){ | |
| if(myConfObj.iframeMouseOver){ | |
| console.log('Wow! Iframe Click!'); | |
| } | |
| }); | |
| document.getElementById('YOUR_CONTAINER_ID').addEventListener('mouseover',function(){ |
| Customer Create: | |
| (Success): | |
| { | |
| "customer": { | |
| "id": "38656872", | |
| "merchantId": "5xtcjpc4szdqhp8c", | |
| "firstName": "Roy", | |
| "lastName": "Smith", | |
| "company": null, |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
| <script src="https://github.com/KartikTalwar/gmail.js/raw/master/src/gmail.js"> | |
| // {inject gmail.js} by copy pasting gmail.js contents or via url like jquery above | |
| // var Gmail = {.....} // paste gmail.js code here | |
| // start using! | |
| // you can also pass in a reference to jQuery upon init - Gmail(localJQuery) | |
| var gmail = Gmail(); | |
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
| var AWS = require('aws-sdk'), | |
| fs = require('fs'); | |
| // http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html#Credentials_from_Disk | |
| AWS.config.loadFromPath('./aws-config.json'); | |
| // assume you already have the S3 Bucket created, and it is called ierg4210-shopxx-photos | |
| var photoBucket = new AWS.S3({params: {Bucket: 'ierg4210-shopxx-photos'}}); | |
| function uploadToS3(file, destFileName, callback) { |
I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.
So it might be really unintuitive at first but lambda functions have three states.
| console.log('Loading function'); | |
| var AWS = require('aws-sdk'); | |
| AWS.config.region = 'us-west-2'; | |
| exports.handler = function(event, context) { | |
| console.log("\n\nLoading handler\n\n"); | |
| var sns = new AWS.SNS(); | |
| sns.publish({ |