Skip to content

Instantly share code, notes, and snippets.

View micheam's full-sized avatar
🖖
now working from home with Vim.

Michito Maeda micheam

🖖
now working from home with Vim.
View GitHub Profile
@micheam
micheam / go.mod
Last active October 17, 2022 16:30
[Go] How to test urfave/cli command
module how/to/test/urfave/cli/command
go 1.19
require github.com/urfave/cli/v2 v2.20.2
require (
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
@micheam
micheam / go.mod
Last active April 27, 2022 02:02
[Go] wait until success with timeout
module sync/wait
go 1.18
require github.com/stretchr/testify v1.7.1
require (
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
@micheam
micheam / fyne-v2-binding-table-data.go
Last active September 3, 2021 03:40
Sample code for fyne.io/fyne v2.0 widget.Table with binding data. https://stackoverflow.com/questions/68085584/binding-table-data-in-go-fyne
package main
import (
"encoding/json"
"log"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/data/binding"
@micheam
micheam / codesandbox.html
Last active January 18, 2022 02:06
Hugo shortcode for CodeSandbox Embed.
{{ $defaultWidth := "100%" }}
{{ $defaultHeight := "500px" }}
{{ if .IsNamedParams }}
<iframe
src="https://codesandbox.io/embed/{{ .Get "id" }}?codemirror=1&fontsize=13&hidenavigation=1&theme=dark&view=preview"
style="width:{{ with .Get "width" }}{{.}}{{ else }}100%{{ end }}; height:{{ with .Get "height" }}{{.}}{{ else }}{{ $defaultHeight }}{{ end }}; border:0; border-radius: 4px; overflow:hidden;"
title="{{ with .Get "title" }}{{.}}{{ else }}{{ .Get "id" }}{{ end }}"
allow="geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media; usb"
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
@micheam
micheam / deps.edn
Last active October 17, 2019 07:21 — forked from athos/deps.edn
Try `clojure -Sdeps '{:deps {hello-clojure {:git/url "https://gist.github.com/athos/b68b15b08efedffaf14d8c020b125202" :sha "1c9a05106171f97f9b8e8ac8f58c7bd8dbe021f9"}}}' -m hello-clojure` on your terminal
{:paths ["."]
:deps {clansi {:mvn/version "1.0.0"}}}
@micheam
micheam / create-new-github-repo-via-hub.sh
Last active February 16, 2019 06:59
create new github repository via github/hub.
repo_name=something-new
cd `ghq root`/github.com/MichEam
mkdir $repo_name
cd $repo_name
git init
echo "# $repo_name" > README.md
git add . && git commit -m "init commit"
@micheam
micheam / ghq-list-then-look.sh
Last active December 7, 2018 12:46
Select local repository efficiently with `ghq` and `fzf`.
# append this into your .bashrc
export FZF_DEFAULT_OPTS='--layout=reverse --border --multi --ansi --exit-0'
function ghq-list-then-look
{
local selected=$(ghq list -p \
| fzf --height 90% --preview='find {} -depth 1 -type f | grep -i -e "readme.[(md)|(mkd)|(markdown)]" | head -1 | xargs head -$LINES')
if [ -n "${selected}" ]; then
clear
cd "${selected}"

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@micheam
micheam / README-Template.md
Last active January 23, 2018 06:16 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title(プロジェクト タイトル)

プロジェクトの1段落はここに

Getting Started(導入)

これらの手順では、開発とテストの目的でローカルマシン上でプロジェクトのコピーを作成して実行します。

ライブシステムにプロジェクトを配備する方法については、配備を参照してください。

@micheam
micheam / sVim.rc
Last active December 14, 2018 02:05
personal svim setting.
" Settings
set nosmoothscroll
let fullpagescrollpercent = 100
let lastactivetablimit = 50;
let lastclosedtablimit = 50;
let scrollduration = 25
let scrollstep = 65
let zoomstep = 15
let hintcharacters = "asdfghjkl";
let homeurl = "http://google.com";