Skip to content

Instantly share code, notes, and snippets.

Avatar

Daisuke Mino minodisk

  • Balus CO., LTD.
  • Tokyo, Japan
  • Twitter @minodisk
View GitHub Profile
View table.sql
with
items as (
select 1 as id, ['dog'] as tags
union all select 2 as id, ['cat'] as tags
union all select 3 as id, ['bird'] as tags
union all select 4 as id, ['dog', 'cat'] as tags
union all select 5 as id, ['cat', 'bird'] as tags
union all select 6 as id, ['bird', 'dog'] as tags
union all select 7 as id, ['dog', 'cat', 'bird'] as tags
)
@minodisk
minodisk / example.js
Created Dec 22, 2017
Usage of @minodisk/medkit
View example.js
import Client from "@minodisk/medkit";
(async () => {
const client = new Client();
const postId = await client.createPost(
"<h3>Title</h3><h4>Subtitle</h4><p>Text</p>",
);
const html = await client.readPost(postId); // -> "<h1>Title</h1><h2>Subtitle</h2><p>Text</p>" or "<h3>Title</h3><h4>Subtitle</h4><p>Text</p>"
await client.updatePost(
postId,
View delete-gcr.sh
#/bin/bash
images=$(gcloud beta container images list --format 'value(name)')
for i in $images; do
tags=$(gcloud beta container images list-tags $i --format 'value(tags)')
for t in $tags; do
echo delete $i:$t
gcloud beta container images delete $i:$t --resolve-tag-to-digest --quiet
done
@minodisk
minodisk / コーヒー豆.md
Last active Aug 28, 2017
リピート購入するためのコーヒー豆のメモ
View コーヒー豆.md

エチオピア シャキッソ タデ農園 G-1

モカフレーバー。口に含むと栗のような香り。後味が柑橘系の酸味。

  • 苦味: 2
  • 酸味: 2
  • 甘み: 4
  • コク: 5
  • 香り: 3
  • 重さ: 2
View gist:695026653282bd879b4d

a b c d e

abc -_.!*'()<>#"%{}|^[]`;/?:@&=+$,

abc .!*'()<>#"%{}|^[]`;/?:@&=+$,

ab()<>#"%{}|^[]`;/?:@&=+$,c

ab%c

@minodisk
minodisk / main.go
Created Apr 4, 2015
Pipe io.Reader in Go
View main.go
package main
func main() {}
@minodisk
minodisk / dl-anitube.js
Created Mar 16, 2015
Anitubeの.mp4を別Windowで開く
View dl-anitube.js
jwPlayer.config.sources.forEach(function(source){if(source.default){window.open(source.file);return false}})
@minodisk
minodisk / dl-books.js
Last active Aug 29, 2015
Bookscan の マイ本棚 β版 に表示されている本を一括で DL
View dl-books.js
$('.downloading.showbook').each(function(i,a){var map={};$(a).attr('href').match(/\?(.*)/)[1].split('&').forEach(function(kvs){var kv=kvs.split('=');map[kv[0]]=kv[1]});window.open('download.php?d='+map.d+'&f='+map.f)})
View test.coffee
{Route} = require 'chaplin'
console.log new Route('/home').test '/'
console.log new Route('/home').test '/home'
console.log new Route('/home').test '/abc/def'
console.log new Route('/.*').test '/'
console.log new Route('/.*').test '/abc/def'
console.log new Route('/:a').test '/'
console.log new Route('/:a').test '/abc/def'
console.log new Route('').test '/'
console.log new Route('').test '/abc/def'
@minodisk
minodisk / private.xml
Last active Aug 29, 2015
Karabiner.appのvim設定
View private.xml
<?xml version="1.0"?>
<root>
<appdef>
<appname>ITERM2</appname>
<equal>com.googlecode.iterm2</equal>
</appdef>
<appdef>
<appname>MACVIM</appname>
<equal>org.vim.MacVim</equal>
</appdef>