Skip to content

Instantly share code, notes, and snippets.

@okmr-d
okmr-d / useBreakpoint.ts
Last active January 25, 2022 19:47
useBreakpoints hooks (useMediaQuery を簡単に使えるようにしたやつ)
import { useMediaQuery } from "./useMediaQuery"
const breakpoints = {
sm: 640,
md: 768,
lg: 1024,
xl: 1280,
"2xl": 1536,
}
type BreakpointKey = keyof typeof breakpoints
@okmr-d
okmr-d / 0_reuse_code.js
Created December 22, 2015 00:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@okmr-d
okmr-d / credit-card-form.html
Last active August 29, 2015 14:22
カメラでクレジットカードをスキャンできる入力フォーム【Safari(iOS8〜)】
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=2.0">
<title>クレジットカード情報入力</title>
</head>
<body>
<form id="credit-card-form" action="https://yoursite/purchase.html" method="POST">
<h2>カード情報を入力してください</h2>
@okmr-d
okmr-d / DOViewControllerWithSideBar.swift
Created February 11, 2015 16:24
Drawer Menu (iOS8〜)
//
// DOViewControllerWithSideBar.swift
// DOViewControllerWithSideBar
//
// Created by Daiki Okumura on 2015/02/11.
// Copyright (c) 2015 Daiki Okumura. All rights reserved.
//
import UIKit