Skip to content

Instantly share code, notes, and snippets.

View yuya-matsushima's full-sized avatar
🏢
Working from Office

Yuya Matsushima yuya-matsushima

🏢
Working from Office
View GitHub Profile
set fileencodings=utf-8,ucs-bom,euc-jp,iso-2022-jp,sjis,cp932,utf-16,utf-16le
"scriptencoding utf-8
"set verbosefile=~/vimlog
call plug#begin('~/.vim/plugged')
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'prabirshrestha/vim-lsp'
@yuya-matsushima
yuya-matsushima / filter.go
Created November 18, 2016 04:44
構造体スライスを使って sort 実装
package main
import (
"fmt"
"log"
"sort"
"strings"
)
type filter struct {
@yuya-matsushima
yuya-matsushima / slim_lint.vim
Created April 22, 2015 14:57
vimで保存時にslimの構文チェックする
"gem install slim_lint が必要
function! SlimLint()
let slim_lint = "slim-lint"
silent cexpr system(slim_lint . " " . shellescape(expand('%')))
copen
endfunction
"augroupで適当にくくったほうがいい
autocmd BufWritePost *.slim call SlimLint()
$ current_resource.path // => "index.html"
$ current_resource.destination_path // => "index.html"
$ current_resource.source_file // => "/path/to/dir/middleman-guides/source/index.html.erb"
$ current_resource.url // => "/"
$ current_resource.ext // => ".html"
$ current_resource.data // => {"layout"=>"layout"}
$ current_resource.data.layout // => "layout"
###
# Compass
###
# Change Compass configuration
# compass_config do |config|
# config.output_style = :compact
# end
###
@yuya-matsushima
yuya-matsushima / remoterepo.sh
Last active December 20, 2015 09:19
remoterepo.shのコード公開版
#!/usr/bin/env ruby
# coding: utf-8
conf_dir = '/path/to/gitlite/path/conf_dir/'
conf = conf_dir + 'gitolite.conf'
current = Dir::pwd.split('/').pop
new_repo = ARGV[0].to_s
if new_repo.empty?
puts "作成したいリポジトリ名を指定してください"
@yuya-matsushima
yuya-matsushima / index.haml
Last active December 19, 2015 19:28
[ Middleman で超速プロトタイピング ] #00 Haml 再入門 | Developers.IO : http://dev.classmethod.jp/ria/html5/middleman-supersonic-00-haml-relearning/ の slim 版
!!!
%html
%head
%title hello, Haml
%body
%h1 hello, Haml!
%p Lorem ipsum dolor sit amet
%ul#myList
- 3.times do |i|
%li= "item_#{i}"
@yuya-matsushima
yuya-matsushima / getSiteTitleAndUrl.js
Created July 10, 2013 00:37
TitleとURLを取得し,それぞれ使いやすい形式でalertする
javascript:var url = document.location.href;var title = document.title;var tag = '<a href="' + url + '" target="_blank">' + title + '</a>';var titleUrl = title + " : " + url;var titleUrlTag = title + ' : <a href="' + url + '" target="_blank">' + url + '</a>';var mdUrl = '[' + title + '](' + url +')';alert(tag + "\n\n" + titleUrl + "\n\n" + titleUrlTag + "\n\n" + mdUrl);
@yuya-matsushima
yuya-matsushima / agatsuma.survice03.md
Last active December 17, 2015 21:28
20130529(仮)

agatsuma.survive#03(仮) ver.20130603

agatsuma.survive は群馬県内のプログラマ, デザイナー, マークアップエンジニア, コーダーがこれからの群馬で生き残っていく為に知識やスキルをシェアする勉強会です。

Git 入門

Git の基本的なコマンドの使い方, 複数人での作業の行い方, github の活用方法をざっくり3時間くらいで実際にCLI(黒い画面)でコマンドを叩きながら学びます。とりあえず使ってみて残りはググって解決できるようになるのが目標です。

<?php
interface iBase {
public function getData();
}
class SampleA implements iBase {
public function getData() {
return 'A';
}