This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function! s:GetHighlight(group_name) | |
| redir => hl | |
| silent execute 'highlight ' . a:group_name | |
| redir END | |
| return substitute(substitute(hl, '[\r\n]', '', 'g'), 'xxx', '', '') | |
| endfunction | |
| function s:hoge() | |
| let old = s:GetHighlight('Cursor') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var list = ['a', 'b', 'c', 'd']; | |
| var cur; | |
| function plus() { | |
| cur = (cur + 1) % list.length | |
| } | |
| function minus() { | |
| cur = (cur - 1 + list.length) % list.length | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| there are multiple target in current line | |
| ↓ | |
| there are multiple targets in current line | |
| To the first. | |
| ↓ | |
| Move to the first position of candidates. | |
| Decide the position at the time of input. | |
| ↓ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Description: | |
| # Merge git branch. | |
| # | |
| # Dependencies: | |
| # None | |
| # | |
| # Configuration: | |
| # None | |
| # | |
| # Commands: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| if [ $# -ne 3 ] | |
| then | |
| exit 1 | |
| fi | |
| base=$1 | |
| x=$2 | |
| y=$3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| awk 'BEGIN {srand(); print int(6 * rand()) + 1}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 3,$s/\(\d\+\),\(\d\+\)/UPDATE m_hoge SET id = \2 WHERE id = \1;/ | |
| 1,11 | |
| 2,12 | |
| 3,13 | |
| 4,14 | |
| 5,15 | |
| 6,16 | |
| 7,17 | |
| 8,18 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| # All Vagrant configuration is done here. The most common configuration | |
| # options are documented and commented below. For a complete reference, | |
| # please see the online documentation at vagrantup.com. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| curl -oL https://raw.github.com/git/git/master/contrib/completion/git-completion.bash ~/git-completion.bash | |
| curl -oL https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh ~/git-prompt.sh | |
| cat >> ~/.bashrc << \EOF | |
| # Completion and display of git branch | |
| source ~/git-completion.bash | |
| source ~/git-prompt.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name weblio-searchbar-killer | |
| // @namespace weblio-searchbar-killer | |
| // @include http://ejje.weblio.jp/* | |
| // @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js | |
| // @version 1 | |
| // @grant none | |
| // ==/UserScript== | |
| $(function () { |