Skip to content

Instantly share code, notes, and snippets.

@vimtaku
vimtaku / README.md
Last active October 27, 2021 06:22
tsvlize - Change mysql result table to tsv script - 雑に mysql 結果をコピーして excel に貼り付けたいときに使うスクリプトを書いた

Installation

  1. Save mysql_table_result_to_tsv file everywhere which is included $PATH.
  2. Run chmod 755 /path/to/as/you/like/mysql_table_result_to_tsv
  3. (optional) Run echo 'alias tsvlize="pbpaste | mysql_table_result_to_tsv | pbcopy"' >> $HOME/.zshrc

How to use

Copy your mysql result into clipboard.

For example, copy your mysql result table on your iterm2 screen.

@vimtaku
vimtaku / blockdiff_map
Last active June 5, 2017 09:22
blockdiff_map
vmap da :<C-u>set clipboard=<CR>:normal! gv<CR>:call BlockDiff_GetBlock1()<CR>
vmap db :<C-u>set clipboard=<CR>:normal! gv<CR>:call BlockDiff_GetBlock2()<CR>:set clipboard=unnamed<CR>
@vimtaku
vimtaku / .pryrc
Created December 5, 2015 07:27
rails console で m select * from users; とかできるようにするスニペット
class Pry
class Command::MySQLQueryCommand < Pry::ClassCommand
match(/m\s+(.*)/)
description "execute mysql command line"
banner <<-'BANNER'
Usage: m SQLCOMMAND
ex) m select * from users;
BANNER
@@config = YAML.load_file("config/database.yml")
@vimtaku
vimtaku / gist:94cef31a166921b9b7f2
Created February 3, 2015 13:01
Datomic free 0.9.5130
## copy from https://registry.hub.docker.com/u/colinrymer/docker-datomic-free/ and change a little.
# Datomic Free v0.9.5130
#
# It's public image to run datomic database on docker container.
FROM dockerfile/java
MAINTAINER Timo Sulg, timo@tauho.com
#-- INSTALL PREREQURIEMENTS
// for slides.com slide presentation
jQuery(window).mousedown(function(e){
if ( jQuery(e.target).hasClass("navigate-left") || jQuery(e.target).hasClass("navigate-right") ) {
return;
}
e.preventDefault();
if(e.button == 2){
Reveal.left();
}else {
Reveal.right();
nnoremap <expr> [unite]S ':<C-u>Unite file file/new -input=' . 'spec/'. expand('%:h'). '/'. substitute(expand('%:t'), ".rb", "_spec.rb", "") . '<CR>'
autocmd FileType unite call s:unite_my_settings()
function! s:unite_my_settings()"{{{
nmap <buffer> <Tab> <Plug>(unite_choose_action)<Plug>(unite_insert_enter)
imap <buffer> <Tab> <Plug>(unite_choose_action)<Plug>(unite_insert_enter)
endfunction"}}}
--color
--format documentation
--require spec_helper
--color
--format documentation
--require spec_helper
@vimtaku
vimtaku / unity_reference_switch
Last active December 17, 2015 11:39
unity reference default select
// ==UserScript==
// @name unity_reference_switch
// @namespace unity_reference_switch
// @include http://docs.unity3d.com/Documentation/ScriptReference/*.html
// @version 1
// @grant none
// ==/UserScript==
(function() {
var selectLanguage = "C#";