Skip to content

Instantly share code, notes, and snippets.

View ryo-utsunomiya's full-sized avatar

Ryo Utsunomiya ryo-utsunomiya

View GitHub Profile
@ryo-utsunomiya
ryo-utsunomiya / gpg_verify.php
Last active March 24, 2017 04:26
Verify an email with PGP/MIME signature
#!/usr/bin/env php
<?php
/**
* gpg_verify.php
*
* This script requires PHP 5.5+.
*
* @author Ryo Utsunomiya
* @license MIT
@ryo-utsunomiya
ryo-utsunomiya / file0.js
Last active November 18, 2019 06:27
Object.definePropertyによるVue.jsのリアクティビティを紐解く ref: https://qiita.com/ryo511/items/b3e639be256d17e31422
const vm = new Vue({
el: '#app',
data: {
message: 'Hello, World',
}
});
// ここではvm.messageはリアクティブ
vm.message = 'Hello, Vue.js!';
@ryo-utsunomiya
ryo-utsunomiya / gutenberg.xml
Created December 23, 2017 12:27
PhpStorm setting for Gutenberg Development
<code_scheme name="Gutenberg" version="173">
<HTMLCodeStyleSettings>
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
</HTMLCodeStyleSettings>
<JSCodeStyleSettings>
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
<option name="SPACES_WITHIN_IMPORTS" value="true" />
<option name="SPACES_WITHIN_INTERPOLATION_EXPRESSIONS" value="true" />
</JSCodeStyleSettings>
<PHPCodeStyleSettings>
@ryo-utsunomiya
ryo-utsunomiya / highlight.js
Last active December 25, 2018 12:09
A simple code snippet to apply syntax highlight with current page
(d => {
let e = d.createElement('link');
e.rel = 'stylesheet';
e.href = 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/github.min.css';
d.body.appendChild(e);
e = d.createElement('script');
e.src = 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js';
e.onload = () => {
e = document.createElement('script');
@ryo-utsunomiya
ryo-utsunomiya / highlight-bookmarklet.js
Created November 26, 2018 16:00
Browser bookmarklet to apply JavaScript syntax highlight with current page.
javascript:(l=>{let e=l.createElement("link");e.rel="stylesheet",e.href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/github.min.css",l.body.appendChild(e),(e=l.createElement("script")).src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js",e.onload=(()=>{(e=document.createElement("script")).src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/languages/javascript.min.js",e.onload=(()=>{l.querySelectorAll("pre").forEach(hljs.highlightBlock)}),l.body.appendChild(e)}),l.body.appendChild(e)})(document);