Skip to content

Instantly share code, notes, and snippets.

View budougumi0617's full-sized avatar
🇯🇵
Want to writing Go

Yoichiro Shimizu budougumi0617

🇯🇵
Want to writing Go
View GitHub Profile
@budougumi0617
budougumi0617 / .vimrc
Created July 2, 2020 10:41
gopls with vim-lsp settings
" https://knowledge.sakura.ad.jp/23248/
" dein.vim settings {{{
" install dir {{{
let s:dein_dir = expand('~/.cache/dein')
let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim'
" }}}
" dein installation check {{{
if &runtimepath !~# '/dein.vim'
if !isdirectory(s:dein_repo_dir)
@budougumi0617
budougumi0617 / go.mod
Created August 28, 2019 01:29
fix go.mod error
module github.com/skanehira/docui
go 1.12
require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Microsoft/go-winio v0.4.14 // indirect
github.com/Sirupsen/logrus v1.4.2
github.com/docker/distribution v2.7.1+incompatible // indirect
// v17.05.0-ce
@budougumi0617
budougumi0617 / gist:ff2a4bcf91766360cafa21e7863d1b83
Created September 29, 2018 07:24
TDDBC Tokyo 2018-09 memo
- テストを書く
- コーラが出る出るテストを書く
- コーラが出る関数を書く
- 100円を入れるテストを書く
- InsetCoin()関数のテストを書く
- 100円を入れたら何もおきない
- 100円以外を入れたらエラーを返す
- PushButton()関数のテストを書く
- 100円が投入済みだったらコーラが出る
- 100円が投入が入っていなかったら何も出ない
@budougumi0617
budougumi0617 / hello.js
Created June 19, 2017 08:04
Hello World by JavaScript
class Greeter {
hello() { return 'Hello World'; }
}
new Greeter().hello();
@budougumi0617
budougumi0617 / ScheduledDemo.java
Last active January 16, 2017 15:10
Sample code that simple thread programing in Java.
// Copyright © 2016 budougumi0617. All rights reserved.
package com.github.budougumi0617.concurrent;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
// © 2016- @budougumi0617
using Microsoft.VisualStudio.TestTools.UnitTesting;
//using MonoBrickFirmware.Movement;
using Moq;
namespace budougumi0617
{
/// <summary>
/// Sample test code for EV3 software on Visual Studio 2015.
@budougumi0617
budougumi0617 / cli.md
Last active August 23, 2016 17:27
Golang presentation
$ GOOS=linux   GOARCH=amd64 go build hello.go # For Linux
$ GOOS=darwin  GOARCH=amd64 go build hello.go # For Mac
$ GOOS=windows GOARCH=amd64 go build hello.go # For windows
$ GOOS=android GOARCH=amd64 go build hello.go # For Android
@budougumi0617
budougumi0617 / file0.java
Last active August 29, 2015 14:10
JavaFX Nightに参加してきた #javafx_ja ref: http://qiita.com/budougumi0617/items/64ef299d620896288dc9
//CONFIRMATIONダイアログ生成
Alert alert = new Alert(AlertType.CONFIRMATION);
//DaialogPaneの各領域に値を設定
alert.setTitle("Confirmation Dialog");
alert.setHeaderText("Look, a Confirmation Dialog");
alert.setContentText("Are you ok with this?");
//Alertダイアログなので、戻り値はOprtional<ButtonType>
Optional<ButtonType> result = alert.showAndWait();
if (result.get() == ButtonType.OK){
//Before study Java Education
{
Customer[] selectedCustomers = new Customer[MAX_SIZE];
int selectedCount = 0;
for (int i = 0; i < salesmen.length(); i++){
if (salesmen[i].get_city().equals(city)){
Customer[] customers = salesmen[i].getCustomers();
for (int j = 0; j < customers.length(); j++) {
if (customers[j].getSalary() > 1000000) {
@budougumi0617
budougumi0617 / add_more_keyword
Created July 13, 2014 12:29
Ruby on Rails4で複数キーワードのOR検索をしたいときはArelを使う。 ref: http://qiita.com/budougumi0617/items/e6102f0d424d4031f7e2
for i in 1...keyword_arrays.length
seminars_sel = seminars_sel.or(seminars.matches("\%#{keyword_arrays[i]}\%"))
end