ウェブデザインの余白に規則性を持たせるためのパターン
フォントサイズベース
$spacing: 1rem;
body {
margin: ($spacing * 4) $spacing;
}
// ==UserScript== | |
// @name Disable keyboard shortcuts | |
// @namespace https://github.com/mori-dev | |
// @description ページのキーボードショートカットを殺す | |
// @include https://github.com/* | |
// @include https://gist.github.com/* | |
// @include https://mail.google.com/* | |
// ==/UserScript== | |
unsafeWindow.$(document).unbind('keydown.hotkey'); |
$spacing: 1rem;
body {
margin: ($spacing * 4) $spacing;
}
開発/テスト/ビルド用 npm パッケージは devDependencies
、 それ以外を dependencies
にしましょう。前者は npm i -D foo
後者は npm i -S foo
です。
import React from 'react'; | |
import { Root } from 'native-base'; | |
import * as Expo from 'expo'; | |
import { AppNavigator } from './routes'; | |
export default class App extends React.Component { | |
constructor() { | |
super(); |
package main | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" | |
"encoding/pem" | |
"io" | |
"log" | |
"os" |
package app_error | |
import ( | |
"net/http" | |
"time" | |
"github.com/labstack/echo" | |
) | |
type ApiError struct { |
/* taken from https://github.com/bryaneaton13/react-pull-to-refresh/blob/master/examples/basic/app.css */ | |
.ptr-element { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
color: #aaa; | |
z-index: 10; | |
text-align: center; | |
height: 50px; |
import { createMiddleware } from 'redux-beacon'; | |
import { logger } from 'redux-beacon/extensions/logger'; | |
import { GoogleAnalytics } from 'redux-beacon/targets/google-analytics'; | |
// Redux Beacon EventDefinition | |
// イベントトラッキング: https://developers.google.com/analytics/devguides/collection/analyticsjs/events?hl=ja | |
export const GAEvents = { | |
C1_A1_L1: { | |
eventFields: (action: any) => ({ | |
hitType: 'event', |
class MyAppProvider extends Component { | |
constructor() { | |
super() | |
this.state = { rehydratedFlag: false } | |
} | |
componentWillMount() { | |
appEventHandler.on(AppEvents.FINISH_REHYDRATE_STORE, () => { | |
this.setState({ rehydratedFlag: true }); |
// @flow | |
import React, { Component } from 'react'; | |
import { findDOMNode } from 'react-dom'; | |
class PayjpCheckout extends Component { | |
constructor(props: Object) { | |
super(props); | |
this.windowAlertBackUp = window.alert; | |
this.script = document.createElement('script'); |