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
Show hidden characters
{ | |
"presets": [ | |
["@babel/env", { | |
"targets": { "esmodules": true } | |
}] | |
] | |
} |
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 fs from 'fs'; | |
import os from 'os'; | |
import path from 'path'; | |
import sqlite3 from 'sqlite3'; | |
import jsforce, { Connection } from 'jsforce'; | |
const SCANSNAP_DB_DIR = path.join(os.homedir(), '/Library/Application Support/PFU/ScanSnap Home/Managed/'); | |
const SCANSNAP_FILE_DIR = path.join(os.homedir(), '/Documents/ScanSnapHome.localized'); | |
const SCANSNAP_DB_FILE = path.join(SCANSNAP_DB_DIR, 'ScanSnapHome.sqlite'); | |
const TIMESTAMP_FILE = '.timestamp'; |
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 { createStateHook } from 'react'; | |
export function createFormInputHook() { | |
const useValueState = createStateHook(); | |
return (initialValue) => { | |
const [value, setValue] = useValueState(initialValue); | |
function onHandleChange(e) { | |
setValue(e.target.value); | |
} | |
return { value, onChange: onHandleChange }; |
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
/* @flow */ | |
import EventEmitter from 'events'; | |
import React, { type Node, type ComponentType } from 'react'; | |
import PropTypes from 'prop-types'; | |
/** | |
* Mimics new context API using legacy context | |
*/ | |
type LegacyContextProvider<T> = ComponentType<{ value: T, children: Node }>; |
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, { createContext } from 'react'; | |
import { createStore } from 'redux'; | |
import { connect, Provider } from 'react-redux'; | |
import { render } from 'react-dom'; | |
import { compose, lifecycle, withStateHandlers, shouldUpdate } from 'recompose'; | |
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
/* @flow */ | |
type NMap = { [key:string]: number } | |
// これは当然だめ | |
const map1: NMap = { | |
a: 1, | |
b: 2, | |
c: 'a', | |
}; |
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
<apex:page showHeader="false" applyBodyTag="false" applyHtmlTag="false" docType="html-5.0"> | |
<html> | |
<head> | |
<title>Embed API Demo</title> | |
</head> | |
<body> | |
<!-- Step 1: Create the containing elements. --> | |
<section id="auth-button"></section> |
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
var connName = process.args[1]; | |
console.log('connection = ' + connName); | |
var conn = jsforce.registry.getConnection(connName); | |
conn.identity().then(function() { | |
return conn.metadata.update('SecuritySettings', { fullName: 'Security', passwordPolicies: { expiration: 'Never' }}); | |
}).then(function() { | |
return conn.metadata.update('Profile', { fullName: 'Admin', loginIpRanges: { startAddress:'0.0.0.0', endAddress: '255.255.255.255' } }); | |
}); |
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
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2p3dC1pZHAuZXhhbXBsZS5jb20iLCJzdWIiOiJtYWlsdG86bWlrZUBleGFtcGxlLmNvbSIsIm5iZiI6MTQzOTA0MjI1NiwiZXhwIjoxNDM5MDQ1ODU2LCJpYXQiOjE0MzkwNDIyNTYsImp0aSI6ImlkMTIzNDU2IiwidHlwIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS9yZWdpc3RlciIsImF1ZCI6WyJodHRwOi8vZm9vMS5jb20iLCJodHRwOi8vZm9vMi5jb20iXX0.ypVdY0dmsbThmOa08qe2g0aMeG8fBKxLTZn7y1lBKt4 |
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
/* | |
* browserify -t espowerify ./build/test/e2e/app001.test.js > ./build/test/e2e/app001.test-bundle-by-cmd.js | |
*/ | |
//... | |
'use strict'; | |
var assert = require('power-assert'); | |
describe('apptest001', function () { | |
it('should raise', function () { | |
assert(assert._expr(assert._capt(1 === 0, 'arguments/0'), { | |
content: 'assert(1 === 0)', |
NewerOlder