Skip to content

Instantly share code, notes, and snippets.

@yoshiko-pg
yoshiko-pg / react-route-v4-onenter.js
Last active April 28, 2020 12:38
react-router v4でのonEnter代替
import React from 'react';
import { BrowserRouter as Router, Route, Switch, Redirect } from 'react-router-dom';
import App from 'components/app';
import Signup from 'components/signup';
import Signin from 'components/signin';
import Signout from 'components/signout';
const userOnly = (Component) => ({ history, match }) =>
isAuthenticated() ? <Component history={history} match={match}/> : <Redirect to="/signin"/>;
@yoshiko-pg
yoshiko-pg / AutoHotkey.ahk
Created May 6, 2014 13:10
AutoHotkeyの設定。 日本語が混ざるとエラーになる
; colon & semicolon swap
$vkBAsc027::Send, :
+$vkBAsc027::Send, `;
; Alt -> IME
LAlt::IME_SET(0)
LWin::IME_SET(0)
RAlt::IME_SET(1)
; iTunes
https://github.com/yoshiko-pg/dotfiles/blob/master/.zshrc
に移動
@yoshiko-pg
yoshiko-pg / .vimrc
Last active August 29, 2015 13:57
.vimrc
https://github.com/yoshiko-pg/dotfiles/blob/master/.vimrc
に移動
@yoshiko-pg
yoshiko-pg / add_gcal_url.js
Created March 12, 2014 08:46
Googleカレンダーへ予定追加するリンクURL生成コード
var url = (function(){
var getUTC = function(date_str){
var date = new Date(date_str);
return date.getUTCFullYear() +
zerofill(date.getUTCMonth()+1) +
zerofill(date.getUTCDate()) +
'T' +
zerofill(date.getUTCHours()) +
zerofill(date.getUTCMinutes()) +