Skip to content

Instantly share code, notes, and snippets.

Ayumu Sato ahomu

View GitHub Profile
View package.json
{
"version": "0.0.1",
"private": true,
"engines": {
"node": "8.5.0",
"yarn": "^1.0.2"
},
"dependencies": {
"compression": "^1.7.0",
View rollup.config.js
import nodeResolve from 'rollup-plugin-node-resolve';
import typescript from 'rollup-plugin-typescript';
import commonjs from 'rollup-plugin-commonjs';
import json from 'rollup-plugin-json';
import builtins from 'rollup-plugin-node-builtins';
export default {
entry: 'src/index.ts',
format: 'umd',
moduleName: 'Talkie',
@ahomu
ahomu / suddenly_death.go
Last active Sep 7, 2016
_人人人人人_ > 突然の死 <  ̄Y^Y^Y^Y^Y ̄
View suddenly_death.go
package main
import (
"flag"
"fmt"
"math"
"os"
"strings"
)
@ahomu
ahomu / suddenly_death.rs
Last active Sep 7, 2016
_人人人人人_ > 突然の死 <  ̄Y^Y^Y^Y^Y ̄
View suddenly_death.rs
use std::env;
use std::process;
const HALF_WIDTH: f32 = 0.5_f32;
const FULL_WIDTH: f32 = 1_f32;
fn str_repeat(string: &str, count: i16) -> String {
(0..count).map(|_| string).collect::<String>()
}
View aria-in-tab.jsx
const KEYCODE_LEFT = 37;
const KEYCODE_RIGHT = 39;
class TabList extends React.Component {
static propTypes = {
children : React.PropTypes.node,
selectedIndex : React.PropTypes.number,
onChangeSelected: React.PropTypes.func
};
@ahomu
ahomu / example.jsx
Last active Aug 7, 2016
HTML や XML の属性値で改行するときってさぁ(インデントルール)
View example.jsx
// これより
<SomeComponent
propA={}
propB={}
propC={}
propD={}
propE={} />
// こうが好き
<SomeComponent propA={}
View ScrollHandler.js
'use strict';
import * as React from 'react';
import * as assign from 'object-assign';
import * as debounce from 'lodash.debounce';
import { appLogger as log } from '../../../utils/Log';
import BaseComponent from '../../base';
const EVENT_SCROLL = 'scroll';
const EVENT_POP_STATE = 'popstate';
@ahomu
ahomu / .babelrc
Last active Oct 14, 2019
browserify(&watchify) で tsify --target=es6 と babelify を併用する
View .babelrc
{
"modules": "commonStrict",
"sourceMaps": "inline",
"loose": true,
"blacklist": [
]
}
@ahomu
ahomu / .eslintrc
Last active Sep 12, 2015
.eslintrc めんどくさいんじゃー!! v1.3.0
View .eslintrc
{
"parser": "babel-eslint",
"plugins": ["react"],
"env": {
"browser": true,
"node": true,
"mocha": true
},
"ecmaFeatures" : {
"jsx": true
You can’t perform that action at this time.