Skip to content

Instantly share code, notes, and snippets.

@mtdtks
mtdtks / Constractor1.java
Created October 16, 2016 16:52
JAVA Templete for Eclipse Snippets.
public class ${ClassName} {
int num;
String str;
public ${ClassName}(String str) {
this.num = ${defaultNum};
this.str = str;
}
@mtdtks
mtdtks / util.gs
Created October 3, 2016 03:57
Utility for GoogleSpreadSheet
/*
var util{ name : function(){}}に集約したい。。。
*/
var util = {
/*
* シート名で指定して、カラム番目の最後の行の取得
* @usecase getLastRowNumbySheetName(sheetName, column)
@mtdtks
mtdtks / getJsonKeyAndValue.js
Last active September 1, 2016 04:03
json on javascript. get key and value via "http://qiita.com/glaytomohiko/items/852ea64bcfc1e4fc1b51"
var jsonArray = { "key1":"value1", "key2":"value2", "key3":"value3" };
for(var key in jsonArray){
alert("key=" + key + ", jsonArray=" + "[" + key + "]=" + jsonArray[key]) ;
}
/*
Alert is...
key=key1, jsonArray[key1]=value1
key=key2, jsonArray[key2]=value2
@mtdtks
mtdtks / windowSizeChange.vimrc
Last active August 31, 2016 13:30
s>,s<,s+,s- で分割したウィンドウのサイズを拡大、縮小する。>, <, +, - の連続入力が出来る via "http://qiita.com/tekkoc/items/98adcadfa4bdc8b5a6ca"
call submode#enter_with('bufmove', 'n', '', 's>', '<C-w>>')
call submode#enter_with('bufmove', 'n', '', 's<', '<C-w><')
call submode#enter_with('bufmove', 'n', '', 's+', '<C-w>+')
call submode#enter_with('bufmove', 'n', '', 's-', '<C-w>-')
call submode#map('bufmove', 'n', '', '>', '<C-w>>')
call submode#map('bufmove', 'n', '', '<', '<C-w><')
call submode#map('bufmove', 'n', '', '+', '<C-w>+')
call submode#map('bufmove', 'n', '', '-', '<C-w>-')
" <TAB>: completion.
" inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<S-TAB>"
" Plugin key-mappings.
imap <C-;> <Plug>(neosnippet_expand_or_jump)
smap <C-;> <Plug>(neosnippet_expand_or_jump)
" SuperTab like snippets behavior.
" imap <expr><TAB> neosnippet#jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : pumvisible() ? "\<C-n>" : "\<TAB>"
@mtdtks
mtdtks / substitution.bat
Last active August 31, 2016 07:42
入力ファイル「input.txt」内に存在する文字列「foo」を全て「bar」に置換して、出力ファイル「output.txt」に出力する via"http://knowledge.reontosanta.com/archives/816"
@echo off
rem カレントディレクトリ移動(バッチ実行ディレクトリ)
cd /d %~dp0
rem 入力ファイル
set infilenm=input.txt
rem 出力ファイル
set outfilenm=output.txt
rem 置換前文字列
set beforestr=foo
cd ~/.vimperator
mkdir vimppm && cd vimppm
git clone git://github.com/cd01/vimppm
@mtdtks
mtdtks / html_basictemplete.html
Last active August 30, 2016 11:24
html5 basic templete
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="keywords" content="">
<link rel="stylesheet" href="test.css">
<script src="test.js"></script>
</head>
@mtdtks
mtdtks / cVim.css
Created March 7, 2016 16:15
cVimカスタムCSS (日本語コメントバグる)
#cVim-link-container, .cVim-link-hint, #cVim-command-bar, #cVim-command-bar-mode, #cVim-command-bar-input, #cVim-command-bar-search-results, .cVim-completion-item, .cVim-completion-item .cVim-full, .cVim-completion-item .cVim-left, .cVim-completion-item .cVim-right, #cVim-hud, #cVim-status-bar {
font-family: Helvetica, Helvetica Neue, Neue, sans-serif, monospace, Arial;
font-size: 10pt !important;
-webkit-font-smoothing: antialiased !important;
}
#cVim-link-container {
position: absolute;
pointer-events: none;
width: 100%; left: 0;
@mtdtks
mtdtks / cVimrc.vim
Last active March 31, 2019 16:40
chromeのcVimの社内用セッティング
"==={general}===
let scrollstep = 150
let fullpagescrollpercent = 100
"set nohud
"set autohidecursor
"eで検索窓へ
map e goToInput
"open link in new tab (active)