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
name: GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-deploy: |
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 Color = 'red' | 'black'; | |
const RED = 'red'; | |
const BLACK = 'black'; | |
type Mark = {|name: string, color: Color|}; | |
const SPADE: Mark = {name: 'S', color: BLACK}; | |
const HEART: Mark = {name: 'H', color: RED}; | |
const CLUB: Mark = {name: 'C', color: BLACK}; |
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
const has31 = month => Boolean((month & 1) ^ ((month >> 3) & 1)) | |
test('1-12', () => { | |
expect(has31(1)).toMatchInlineSnapshot(`true`) | |
expect(has31(2)).toMatchInlineSnapshot(`false`) | |
expect(has31(3)).toMatchInlineSnapshot(`true`) | |
expect(has31(4)).toMatchInlineSnapshot(`false`) | |
expect(has31(5)).toMatchInlineSnapshot(`true`) | |
expect(has31(6)).toMatchInlineSnapshot(`false`) | |
expect(has31(7)).toMatchInlineSnapshot(`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
const has31 = month => Boolean((month & 1) ^ ((month >> 3) & 1)) | |
test('1-12', () => { | |
expect(has31(1)).toMatchInlineSnapshot(`true`) | |
expect(has31(2)).toMatchInlineSnapshot(`false`) | |
expect(has31(3)).toMatchInlineSnapshot(`true`) | |
expect(has31(4)).toMatchInlineSnapshot(`false`) | |
expect(has31(5)).toMatchInlineSnapshot(`true`) | |
expect(has31(6)).toMatchInlineSnapshot(`false`) | |
expect(has31(7)).toMatchInlineSnapshot(`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
function awbgt(tmp, hmd) { | |
return ( | |
(hmd - 20) * (Math.pow(tmp - 40, 2) * -0.00025 + 0.185) + | |
(11 / 15) * (tmp - 25) + | |
17.8 | |
) | |
} |
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
n |
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/sh | |
[ $USER = "root" ] && echo "オッケー" || echo "ごめん無理" |
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 path from 'path' | |
const cwd = process.cwd() | |
const getRootDir = (...x) => path.resolve(cwd, 'src', ...x) | |
const getTyepDir = x => getRootDir('types', x) | |
const rootReducerPath = getRootDir('reducer.js') | |
const rootActionPath = getTyepDir('action.js') |
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 { Grid, Paper } from '@material-ui/core' | |
export const Page = (props: Object) => ( | |
<Grid container justify={'center'}> | |
<Grid item xs={12} sm={12} md={10}> | |
<Paper {...props} /> | |
</Grid> | |
</Grid> | |
) |
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 _ from 'lodash' | |
test('works', () => { | |
const a = [{ id: 'foo', v: 100 }, { id: 'bar', v: 200 }] | |
expect(_.mapKeys(a, 'id')).toMatchInlineSnapshot(` | |
Object { | |
"bar": Object { |