Skip to content

Instantly share code, notes, and snippets.

@noonworks
noonworks / vscode_md_numbered_headers.css
Created July 15, 2020 05:35
VSCodeのmarkdownプレビューで見出しに`1-2-2. 見出し`のように番号をつけるスタイルシート
h1 {
counter-reset: section_h2;
}
h2 {
counter-reset: section_h3;
}
h3 {
counter-reset: section_h4;
}
h4 {
<template>
<div :class="$style.wrapper" v-bind="$attrs">
<div :class="$style.container">
<slot />
</div>
</div>
</template>
<style module>
.wrapper {
box-sizing: border-box;
<template>
<span
:class="$style.actionicon"
:style="{ backgroundImage, width, height, borderRadius: radius + 'px' }"
@mouseover="onMouseover"
@click="onClick"
>
<span :class="$style.highlight" />
</span>
</template>
@noonworks
noonworks / check_MS17-010.cmd
Last active May 17, 2017 02:12
MS17-010のパッチ適用状況確認用バッチ
@echo off
:: https://blogs.technet.microsoft.com/jpwsus/2017/05/15/wannacrypt-ms17-010-wsus/
:: https://en.wikipedia.org/wiki/Ver_(command)
set RUN_AS_CMD=0
if "%1"=="/c" ( set RUN_AS_CMD=1 )
echo OS確認中...
ver | find /I "Version 5.1." > nul
@noonworks
noonworks / Makefile
Last active January 10, 2017 11:07
/_drafts/%.mdを、/%.htmlに変換する。テンプレートファイル_template._templateは、変換するmdごとに、同じフォルダにあればそれを、なければその上のフォルダを探してそれを、そこにもなければさらに上を……と探索する。
####################
# markdown to html
# (For Windows)
####################
DRAFTS_DIR_NAME := _drafts
SITE_ROOT_DIR := $(shell cd)
# template file
TEMPLATE_EXT := _template
TEMPLATE_FILE := _template.$(TEMPLATE_EXT)
@noonworks
noonworks / FileSaver.min.js
Last active May 9, 2016 10:06
腐葉土っぽい表紙画像ジェネレータ
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
var saveAs=saveAs||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},o=t.createElementNS("http://www.w3.org/1999/xhtml","a"),r="download"in o,i=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},a=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),c=e.webkitRequestFileSystem,f=e.requestFileSystem||c||e.mozRequestFileSystem,u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},d="application/octet-stream",s=0,l=4e4,v=function(e){var t=function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()};setTimeout(t,l)},p=function(e,t,n){t=[].concat(t);for(var o=t.length;o--;){var r=e["on"+t[o]];if("function"==typeof r)try{r.call(e,n||e)}catch(i){u(i)}}},w=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.typ
@noonworks
noonworks / index.html
Last active May 4, 2016 17:41
fuyodo
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>腐葉土</title>
<link href='https://fonts.googleapis.com/css?family=Allura' rel='stylesheet' type='text/css'>
<style>
.AlluraFont { font-family: 'Allura'; }
table, td, th {
border-collapse: collapse;
@noonworks
noonworks / bit.js.cmd
Created March 4, 2016 02:16
64bitOS上でx86/x64どっちのcscript.exeを起動するか選びたいときに
@if(0)==(0) echo off
::
:: get cmd.exe and cscript.exe
:: SysNative alias is avalable if this is 32bit-cmd.exe on 64bit-system.
:: %WinDir%\SysNative\cmd.exe is 64bit-cmd.exe.
::
set CSCRIPT32=
set CSCRIPT64=
set CMD32=
set CMD64=
@noonworks
noonworks / bit.cmd
Created March 4, 2016 02:10
cmd.exeとOSのx86/x64
set OS_BIT=x64
set CMD_BIT=x64
if "%PROCESSOR_ARCHITECTURE%" EQU "x86" (
set CMD_BIT=x86
if NOT DEFINED PROCESSOR_ARCHITEW6432 set OS_BIT=x86
)
echo %CMD_BIT% command prompt on %OS_BIT% OS.
@noonworks
noonworks / bug-electron-prebuilt.md
Last active September 17, 2015 01:17
(2015.09.17解決)今Windowsでelectron-prebuiltインストールしても動かんかもしれん