Skip to content

Instantly share code, notes, and snippets.

{
"compilerOptions": {
"outDir": "./dist/",
"sourceMap": true,
"noImplicitAny": true,
"strictNullChecks": true,
"removeComments": true,
"module": "commonjs",
"target": "es5",
"jsx": "react"
nav class="nav navbar navbar-inverse" role="navigation"
div class="container"
div class="navbar-header"
button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-gnav-collapse"
span class="sr-only" Toggle navigation
span class="icon-bar"
span class="icon-bar"
span class="icon-bar"
div class="collapse navbar-collapse navbar-gnav-collapse"
ul class="nav navbar-nav"
@jmblog
jmblog / yui-fonts.scss
Created April 24, 2011 09:19
yui-fonts.scss
/* YUI Fonts.css
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.3.0
build: 3167
*/
body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
@mixin font_10 { font-size: 77%; }
@jmblog
jmblog / karabiner.json
Last active November 12, 2017 00:47
かなキーで「英数/かな」のトグル切り替え(Karabiner-Elements 11.1.8以上が必要)
{
"profiles": [
{
"complex_modifications": {
"rules": [
{
"description": "Toggle input source (English or Japanese) by kana key (available since Karabiner-Elements 11.1.8)",
"manipulators": [
{
"conditions": [
@jmblog
jmblog / file0.txt
Last active December 5, 2017 05:33
Vanilla JS や TypeScript で Custom Elements を書く際の注意点 ref: https://qiita.com/jimbo/items/d17a121f815236c2f55b
Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
// https://www.netlify.com/blog/2017/07/18/http/2-server-push-on-netlify/
const debug = require('debug')('nuxt:netlify-http2-server-push');
const path = require('path');
const glob = require('glob');
const fs = require('fs');
module.exports = function module(moduleOptions) {
// This module is only enabled on production builds
if (this.options.dev) {
@jmblog
jmblog / bash_prompt
Created May 23, 2014 11:30
Bash prompt customization
#!/usr/bin/env bash
# Check that terminfo exists before changing TERM var to xterm-256color
# Prevents prompt flashing in Mac OS X 10.6 Terminal.app
if [ -e /usr/share/terminfo/x/xterm-256color ]; then
export TERM='xterm-256color'
fi
# Turn off standout; turn off underline
tput sgr 0 0
@jmblog
jmblog / rehype-remove-style-attrs.ts
Last active October 5, 2021 06:05
rehype plugin to remove all style attributes
import { Transformer } from 'unified';
import { Element } from 'hast';
import { visit } from 'unist-util-visit';
export default function rehypeRemoveStyleAttrs(): Transformer {
return (tree) => {
visit(tree, 'element', (node: Element) => {
if (node.properties?.style) {
node.properties.style = undefined;
}
@jmblog
jmblog / gist:3222899
Created August 1, 2012 02:21
Simple HTML encoding/decoding using jQuery
// http://stackoverflow.com/questions/1219860/javascript-jquery-html-encoding
function htmlEncode(value){
return $('<div/>').text(value).html();
}
function htmlDecode(value){
return $('<div/>').html(value).text();
}
@jmblog
jmblog / gist:6077993
Last active November 22, 2021 08:37
所得税と住民税の計算方法

所得税(国税)

所得税の計算方法

所得税額 = (所得金額(A) - 所得控除額(B)) × 税率 - 税額控除額(C)

  • 「所得金額(A)- 所得控除額(B)」は 課税所得金額 といい、1,000円未満の端数を切り捨てる。

所得税の税率