Skip to content

Instantly share code, notes, and snippets.

View geta6's full-sized avatar

geta6 geta6

View GitHub Profile
.koV58 .TPpRNe {
height: 100% !important;
top: 0 !important;
}
.koV58 .TPpRNe video {
object-fit: cover;
transform: none !important;
}
import { hoge, fuga, piyo } from './sample';
console.log(hoge(), fuga(), piyo()); // HOGE FUGA PIYO
import sample from './sample';
console.log(sample()); // I AM MODULE;
import * as samples from './sample';
import axios, { AxiosInstance } from 'axios';
import { EsaPost, EsaCreatePostBody, EsaUpdatePostBody } from './types';
// https://docs.esa.io/posts/102
export class Esa {
private teamName: string;
private request: AxiosInstance;
constructor({ token, teamName }: { token: string; teamName: string }) {
import { useDispatch, useSelector } from 'react-redux';
import { RootState } from './store';
export enum ActionTypes {
INCREMENT = 'Counter/INCREMENT',
DECREMENT = 'Counter/DECREMENT',
SET_COUNT = 'Counter/SET_COUNT',
}
export const useCounter = () => {
@geta6
geta6 / setup.sh
Created September 18, 2019 01:39
#!/bin/bash
# Create missing home directories
[[ ! -d ~/Developer ]] && mkdir ~/Developer
[[ ! -d ~/Sites ]] && mkdir ~/Sites
# Install homebrew
if [ ! -x "`which brew`" ]; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
import { translate } from 'react-i18next';
interface Props {
t?: any;
};
export const MyComponent = (props: Props) => {
return (
<div>{props.t('translated')}</div>
);
'use strict'
class Promise
PENDING = undefined
SEALED = 0
RESOLVED = 1
REJECTED = 2
import get from 'lodash/object/get';
import isError from 'lodash/lang/isError';
import keyMirror from 'fbjs/lib/keyMirror';
export function actionGenerator(displayName, actions) {
if (process.env.NODE_ENV === 'development') {
Object.keys(actions).forEach(actionName => {
if (actions[actionName]) {
console.assert(/regeneratorRuntime\.async/.test(actions[actionName].toString()), `${displayName}.${actionName} should be async function`);
}
@geta6
geta6 / .babelrc
Last active November 30, 2015 07:35
{
"stage": 0
}
gulp.task('exec', async () => {
const exec = {
exec(command, options) {
return new Promise((resolve, reject) => {
cp.spawn(command, options, {stdio: 'inherit'}).on('error', reject).on('exit', resolve);
});
},
async local(commands) {
await this.exec(process.env.SHELL, ['-c', commands.join('&&')]);