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
/* | |
* Copyright (c) 2021, salesforce.com, inc. | |
* All rights reserved. | |
* SPDX-License-Identifier: BSD-3-Clause | |
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause | |
*/ | |
/* istanbul ignore file */ | |
// NOTE! | |
// This file is being ignored in the test coverage report for now. It reports `0%` functions |
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
/* | |
* Simple API Sample Server | |
* | |
* Serves from file ./_data.json writing to arrays with GET, POST, PUT, PATCH, DELETE | |
* | |
* Create a _data.json file like: | |
* | |
* { | |
* "todos": [], | |
* "people": [] |
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
blueprint: | |
name: Frigate Notification (0.10.0 w/ occupancy filter) | |
description: | | |
## Frigate Mobile App Notification | |
This blueprint will send a notification to your device when a Frigate event for the selected camera is fired. The notification will initially include the thumbnail of the detection, but include an actionable notification allowing you to view the clip and snapshot. | |
With this blueprint, you may send the notification to multiple devices by leaving "Device" blank and instead use a [notification group][1]. | |
### Software Version Requirements |
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
""" | |
SFCC Schema Validator | |
Author: Charles Lavery <[email protected]> | |
Requires packages: | |
- lxml | |
- jsonschema | |
Place XSD and JSON schemas in a `./schemas` subdirectory relative to this file (download from | |
https://documentation.b2c.commercecloud.salesforce.com/DOC3/index.jsp?topic=%2Fcom.demandware.dochelp%2FDWAPI%2Fxsd%2FSchemas.html |
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
from difflib import SequenceMatcher | |
states = { | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", |
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
require("babel/polyfill"); | |
document.writeln("async testing; look at console log"); | |
function promiseReturningFunction() { | |
return new Promise(function(resolve,reject) { | |
setTimeout( () => resolve("resolved message"), 2000); | |
}); | |
} | |
function promiseReturningFunction2() { |
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
import React from 'react'; | |
import _ from 'underscore'; | |
var LIFECYCLE_EVENTS = [ | |
'componentWillMount', | |
'componentDidMount', | |
'componentWillReceiveProps', | |
'shouldComponentUpdate', | |
'componentWillUpdate', |
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
import logging | |
import time | |
from functools import wraps | |
from flask import request, jsonify | |
import redis | |
r = redis.StrictRedis(host='localhost', port=6379, db=0) | |
logger = logging.getLogger(__name__) |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "chef/centos-6.6" | |
config.vm.provision :shell, path: "bootstrap.sh" | |
config.vm.network "forwarded_port", guest: 80, host: 8080 |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.provision :shell, path: "bootstrap.sh" | |
config.vm.network "forwarded_port", guest: 80, host: 8080 |
NewerOlder