#!/bin/bash
LOCATION=${1:-'/tmp'}
# Files required by nginx proxy
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
# Thanks to https://stackoverflow.com/questions/15455864/powershell-set-lid-close-action/21634858#21634858 | |
# When closing the lid... | |
# ...set the option to do nothing when plugged in | |
powercfg -setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0 | |
# ...set the option to do nothing when using the battery | |
powercfg -setdcvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0 |
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
<html> | |
<head> | |
<script src="https://unpkg.com/react@15/dist/react.min.js"> </script><script src="https://unpkg.com/react-dom@15/dist/react-dom.min.js"> | |
</script> | |
<script src="https://unpkg.com/[email protected]/babel.min.js"></script> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script type="text/babel"> | |
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 {ThemeContext, themes} from './theme-context'; | |
import ThemedButton from './themed-button'; | |
// An intermediate component that uses the ThemedButton | |
function Toolbar(props) { | |
return ( | |
<ThemedButton onClick={props.changeTheme}> | |
Change Theme | |
</ThemedButton> | |
); | |
} |
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
function memoize(fn) { | |
return function() { | |
const args = Array.prototype.slice.call(arguments); | |
fn.cache = fn.cache || {}; | |
return fn.cache[args] | |
? fn.cache[args] | |
: (fn.cache[args] = fn.apply(this, args)); | |
}; | |
} |
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
function urlB64ToUint8Array(base64String) { | |
const padding = '='.repeat((4 - base64String.length % 4) % 4); | |
const base64 = (base64String + padding) | |
.replace(/\-/g, '+') | |
.replace(/_/g, '/'); | |
const rawData = window.atob(base64); | |
const outputArray = new Uint8Array(rawData.length); | |
for (let i = 0; i < rawData.length; ++i) { |
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
const { v1: neo4j } = require('neo4j-driver') | |
const { ApolloServer, makeExecutableSchema } = require('apollo-server') | |
const driver = neo4j.driver( | |
`bolt://${process.env.NEO4J_HOST}:7687`, | |
neo4j.auth.basic(process.env.NEO4J_USER, process.env.NEO4J_PASS)) | |
const typeDefs = ` | |
type Person { name: String! } | |
type Planet { name: String! } |
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
# .circleci/config.yml should be in the root of the project | |
version: 2 | |
general: | |
branches: | |
only: | |
- develop | |
- master | |
jobs: | |
build: | |
machine: true |
Install azure cli on macOS https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-macos?view=azure-cli-latest
brew update && brew install azure-cli
For better output formatting you can use https://github.com/antonmedv/fx.