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
# First follow instructions here: https://wirelesstag.net/eth/oauth2_apps.html to obtain Oauth2 credentials/keys | |
# You should now have an access_token (and a refresh_token). Use the access_token value in var: wtag_api_key below | |
# The code below pulls temp from the first tag in the tag list. If you have more than one sensor, you may need to adjust this | |
require 'net/http' | |
require 'json' | |
require 'uri' | |
def request_immediate_postback(wtag_api_key, tag_id) | |
url = "https://wirelesstag.net/ethClient.asmx/RequestImmediatePostback" |
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 autoReply() { | |
Logger.log('Script start'); | |
var strCalendarOOFKey = 'OOF'; | |
var strUserEmailToSetVacationOn = '[email protected]'; | |
// find calendar event | |
var today = new Date(); | |
var msTodayStart = today.getTime(); | |
var msTodayEnd = today.getTime()+60000; // adding 1 min, but in effect it means start and end on the same day | |
var unavailableToday = false; |
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
# NOTE: This is sample code that may not include libraries that are required by this method | |
# This method is just to demonstrate how to do fast imports from STDIN directly to Postgres | |
# This method was written a long time ago, so it may no longer function as described | |
# The following code was ripped from a library and not run, so it may not be fully functional as published | |
module TableLoader | |
# return each line with the newline value for the platform in question | |
# we strip any newlines from the end of each line and replace them with | |
# Ruby "\n" which should be platform specific | |
def TableLoader::get_line_from_file(file_handle) |
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
const got = require('got'); | |
exports.handler = function(context, event, callback) { | |
const requestBody = { | |
personalizations: [{ to: [{ email: context.TO_EMAIL_ADDRESS }] }], | |
from: { email: context.FROM_EMAIL_ADDRESS }, | |
subject: `New SMS message from: ${event.From}`, | |
content: [ | |
{ | |
type: 'text/plain', |
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
A. HANDLE.NET PUBLIC LICENSE AGREEMENT (Ver.1) | |
This Handle.Net Public License Agreement (ver.1) ("License Agreement") | |
is between Corporation for National Research Initiatives ("CNRI"), | |
having an office at 1895 Preston White Drive, Reston, VA 20191-5434, | |
and the Individual or Organization ("Licensee") that has accessed, | |
installed or otherwise used the software owned by CNRI called | |
HANDLE.NET® and its included documentation ("HDL Software") | |
(collectively the "Parties"). Licensee shall be deemed to have entered | |
into, signed and agreed to be bound by the terms and conditions of |
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
{ | |
"title": "Schema for JSON-LD", | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"definitions":{ | |
"context": { | |
"additionalProperties": true, | |
"properties": { | |
"@context": { | |
"description": "Used to define the short-hand names that are used throughout a JSON-LD document.", |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"description": "CredentialRegistry Organization metadata", | |
"type": "object", | |
"definitions": { | |
"organization_cti": { | |
"properties": { | |
"@type": { "enum": ["cti:Organization"] }, |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"description": "Data envelope", | |
"type": "object", | |
"definitions": { | |
"envelope": { | |
"properties": { | |
"envelope_type": { | |
"description": "Defines the type of the envelope. For now, the only accepted value is \"resource_data\"", |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"description": "CredentialRegistry Organization metadata", | |
"type": "object", | |
"definitions": { | |
"organization_cti": { | |
"properties": { | |
"@type": { "enum": ["cti:Organization"] }, |
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
{ | |
"books": [ | |
{"@bookType": "hardcover", | |
"title": "Gone with the Wind" | |
}, | |
{"@booktype": "eBook", | |
"title": "The Great Gatsby"} | |
] | |
} |
NewerOlder