This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ddbLogSMS($act,$data){ | |
date_default_timezone_set("UTC"); | |
$now = time(); | |
$upd = array(); | |
$upd['ACTION'] = array("Action" => \Aws\DynamoDb\Enum\AttributeAction::PUT, | |
"Value" => array( | |
Type::STRING => $act | |
) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
/* | |
* Handy Reference: http://www.sublimetext.com/docs/file-type-preferences | |
*/ | |
{ | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"indent_guide_options": | |
[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["super+v"], "command": "paste_and_indent" }, | |
{ "keys": ["super+shift+v"], "command": "paste" }, | |
{ "keys": ["super+shift+r"], "command": "reindent" } | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require("express"); | |
var app = express(); | |
// http://localhost:9001/users/1 | |
app.get('/users/:id', function(req, res, next){ | |
var id = req.params.id; | |
if (checkPermission(id)) { | |
res.send("private"); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Loading event'); | |
var AWS = require('aws-sdk'); | |
var dynamodb = new AWS.DynamoDB(); | |
exports.handler = function(event, context) { | |
console.log("Request received:\n", JSON.stringify(event)); | |
console.log("Context received:\n", JSON.stringify(context)); | |
var tableName = "OurBlogDemo"; | |
var datetime = new Date().getTime().toString(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* HID RFID Reader Wiegand Interface for Arduino Uno | |
* Originally by Daniel Smith, 2012.01.30 -- http://www.pagemac.com/projects/rfid/arduino_wiegand | |
* | |
* Updated 2016-11-23 by Jon "ShakataGaNai" Davis. | |
* See https://obviate.io/?p=7470 for more details & instructions | |
*/ | |
#define MAX_BITS 100 // max number of bits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
name: dd-agent | |
spec: | |
template: | |
metadata: | |
labels: | |
app: dd-agent | |
name: dd-agent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AWS = require('aws-sdk'); | |
exports.handler = (event, context, callback) => { | |
var iotdata = new AWS.IotData({endpoint: 'ASDFASDF.iot.us-west-2.amazonaws.com'}); | |
var params = { | |
topic: 'esp8266_RANDOMID/hellofromamzn', | |
payload: 'This is from Lambda', | |
qos: 0 | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- name: 'gcr.io/cloud-builders/docker' | |
args: [ 'build', '-t', 'gcr.io/yourorg/mystaticsite:$COMMIT_SHA', '.' ] | |
- name: 'gcr.io/cloud-builders/docker' | |
args: [ 'build', '-t', 'gcr.io/yourorg/mystaticsite:latest', '.' ] | |
images: | |
- 'gcr.io/yourorg/mystaticsite:$COMMIT_SHA' | |
- 'gcr.io/yourorg/mystaticsite:latest' | |
tags: | |
- "cloudbuild" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
exports.handler = (event, context, callback) => { | |
const response = event.Records[0].cf.response; | |
const headers = response.headers; | |
var hr = { | |
'Strict-Transport-Security': 'max-age=600;', | |
'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate', | |
'Pragma': 'no-cache', | |
'X-LambdaAtEdge': 'true' |
OlderNewer