One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- | |
| This configuration file is required if iisnode is used to run node processes behind | |
| IIS or IIS Express. For more information, visit: | |
| https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config | |
| --> | |
| <configuration> | |
| <system.webServer> |
| import gulp from 'gulp' | |
| const compileMarkup = () => { // COMPILE MARKUP } | |
| const compileScript = () => { // COMPILE SCRIPT } | |
| const compileStyle = () => { // COMPILE STYLE } | |
| const watchMarkup = () => { // WATCH MARKUP } | |
| const watchScript = () => { // WATCH SCRIPT } | |
| const watchStyle = () => { // WATCH STYLE } |
| function debounce(func, wait) { | |
| let timeout | |
| return function(...args) { | |
| const context = this | |
| clearTimeout(timeout) | |
| timeout = setTimeout(() => func.apply(context, args), wait) | |
| } | |
| } | |
| function sayHello() { |
| import React, { Component } from 'react'; | |
| import TextField from 'components/base/TextField'; | |
| const WAIT_INTERVAL = 1000; | |
| const ENTER_KEY = 13; | |
| export default class TextSearch extends Component { | |
| constructor(props) { | |
| super(); |
| RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
| RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
| RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache | |
| npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache | |
| Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache |
| /* | |
| TODO: | |
| X Maybe account for defaults: color: var(--header-color, blue); | |
| - Verify cross domain working or not (it is working from dropbox) | |
| - Option to wait to apply anything until all <link>s are parsed or inject what we have and update as each <link> returns | |
| - Need to test on a more complex CSS file | |
| - Option to save parsed file in local/session storage so there isn't a delay on additional page loads. Could only do it for links (with URLs to use as keys) and style blocks with IDs of some sort | |
| - Need to test more complex values like rgba(255,0,0,0.5); and something with !important | |
| - Try multiple links | |
| - Local links |
| import { createCipheriv, createDecipheriv, randomBytes } from "crypto"; | |
| const ENCRYPTION_KEY: string = process.env.ENCRYPTION_KEY || ""; // Must be 256 bits (32 characters) | |
| const IV_LENGTH: number = 16; // For AES, this is always 16 | |
| /** | |
| * Will generate valid encryption keys for use | |
| * Not used in the code below, but generate one and store it in ENV for your own purposes | |
| */ | |
| export function keyGen() { |
| // Set up the ADAL instance, we will use the throughout the app | |
| export var adalInstance = new AuthenticationContext({ | |
| instance: 'https://login.microsoftonline.com/', | |
| // The client ID of the app from the Azure Portal | |
| clientId: 'aabbccee-aabb-1122-3344-556677889900', | |
| // Where do we want to go after logging out | |
| postLogoutRedirectUri: window.location.origin, | |
| // ts 3.6x | |
| function debounce<T extends Function>(cb: T, wait = 20) { | |
| let h = 0; | |
| let callable = (...args: any) => { | |
| clearTimeout(h); | |
| h = setTimeout(() => cb(...args), wait); | |
| }; | |
| return <T>(<any>callable); | |
| } |