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 ReactDOM from 'react-dom'; | |
import App from './App'; | |
import { eventsToDispatch } from 'src/utils/events'; | |
export const render = (containerId, data) => { | |
const container = document.getElementById(containerId); | |
if (!container) return; | |
ReactDOM.render(<App {...data} />, container); | |
}; |
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
// webpack.config.js | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const CleanWebpackPlugin = require('clean-webpack-plugin'); | |
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; | |
const WebpackShellPlugin = require('webpack-shell-plugin'); | |
const webpack = require('webpack'); | |
const chalk = require('chalk'); | |
const path = require('path'); |
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 { useEffect, useState } from 'react'; | |
const dynamicallyInjectWidget = (id, url) => { | |
const scriptId = `${id}Bundle`; | |
const [isLoaded, setLoaded] = useState(window[id]); | |
const handleLoad = () => setLoaded(true); | |
useEffect(() => { | |
const existingScript = document.getElementById(scriptId); |
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
AWSTemplateFormatVersion: 2010-09-09 | |
Resources: | |
VPC: | |
Type: AWS::EC2::VPC | |
Properties: | |
CidrBlock: 10.1.0.0/16 | |
EnableDnsSupport: true | |
EnableDnsHostnames: true | |
Tags: | |
- Key: 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
#!/bin/bash | |
# Deploys DocumentDb instance into a cluster within a VPC private subnet | |
aws --region us-west-2 cloudformation create-stack --stack-name docdb-test --template-body file://docdb-stack.yaml --parameters file://docdb-stack-params.json |
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
/** | |
* Check if the given access token can invoke the specified method. | |
* | |
* @param {AccessToken} token The access token. | |
* @param {*} modelId The model ID. | |
* @param {SharedMethod} sharedMethod The method in question. | |
* @param {Object} ctx The remote invocation context. | |
* @callback {Function} callback The callback function. | |
* @param {String|Error} err The error object. | |
* @param {Boolean} allowed True if the request is allowed; false otherwise. |
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
# Runs Sample files | |
#!/bin/bash | |
# project path defaults to the "ramlstyle" local project path | |
_project_path=`pwd` | |
# sample path defaults to project_dir/samples | |
_sample_path="${_project_path}/samples" | |
# filter files to process | |
_sample_files="${_sample_path}/sample*.raml" |
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
using System; | |
public namespace testgist | |
{ | |
public class TestGist | |
{ | |
} | |