This file contains hidden or 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/sh | |
| _DOMAIN="proxy.ssn.net" | |
| _PORT=8080 | |
| _IGNORE_PROXY="'*.ssn.net'" | |
| _ENV_FILE_PATH="/etc/environment" | |
| _APT_FILE_PATH="/etc/apt/apt.conf" | |
| _MODE_MANUAL="manual" | |
| _MODE_NONE="none" |
This file contains hidden or 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
| # PHP | |
| # Test and package your PHP project. | |
| # Add steps that run tests, save build artifacts, deploy, and more: | |
| # https://docs.microsoft.com/azure/devops/pipelines/languages/php | |
| pool: | |
| vmImage: 'Ubuntu 16.04' | |
| variables: | |
| phpVersion: 7.2 |
This file contains hidden or 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'; | |
| class HTMLElementPlus extends HTMLElement { | |
| static defaultAttributeValue() { | |
| /* the name of the attribute is parsed in as a parameter */ | |
| return; | |
| } | |
| static parseAttributeValue(name, value) { |
This file contains hidden or 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 {Action, ActionCreator, Dispatch} from 'redux'; | |
| import {ThunkAction} from 'redux-thunk'; | |
| // Redux action | |
| const reduxAction: ActionCreator<Action> = (text: string) => { | |
| return { | |
| type: SET_TEXT, | |
| text | |
| }; | |
| }; |
This file contains hidden or 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, { FunctionComponent } from "react"; | |
| import { useSelector, useDispatch } from "react-redux"; | |
| import { selectCurrentSet, zoomImage } from "../dataLayer"; | |
| export const LegoSetImage: FunctionComponent = () => { | |
| const set = useSelector(selectCurrentSet); | |
| const dispatch = useDispatch() | |
| const zoomHandler = () => dispatch(zoomImage(set.set_img_url)) | |
| return ( | |
| <div className="legoSetImageContainer"> |
This file contains hidden or 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 { shallow } from 'enzyme'; | |
| const Item = text => <p>Item {text}</p>; | |
| const Composition = ({ showB }) => ( | |
| <p> | |
| <Item text="A" /> | |
| {showB && <Item text="B" />} | |
| </p>); |
This file contains hidden or 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
| /* | |
| JavaScript Caesar shift | |
| by Evan Hahn (evanhahn.com) | |
| "Encrypt" like this: | |
| caesarShift('Attack at dawn!', 12); // Returns "Mffmow mf pmiz!" | |
| And "decrypt" like this: |