Skip to content

Instantly share code, notes, and snippets.

View emanon001's full-sized avatar

emanon001 emanon001

View GitHub Profile
// ==UserScript==
// @name Github WIP pull request
// @namespace https://github.com/emanon001/
// @description Github での WIP pull request 運用を便利にするあれこれ
// @include https://github.com/*/pull/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
this.$ = this.jQuery = jQuery.noConflict(true);
@emanon001
emanon001 / click-notyet-button-of-osculator.scpt
Created January 21, 2015 12:51
Click "Not Yet" button of OSCulator
on run
tell application "System Events"
set processName to "OSCulator"
if not (application process processName exists) then
return
end if
set p to application process processName
set windowName to "OSCulator"
@emanon001
emanon001 / sponichi_image_easy_access.user.js
Created January 31, 2015 06:32
スポニチの画像表示用Flash をクリックすると、実際の画像リンクを開く
// ==UserScript==
// @name Sponichi image easy access
// @namespace https://github.com/emanon001/
// @description スポニチの画像表示用Flash をクリックすると、実際の画像リンクを開く
// @include http://www.sponichi.co.jp/*/gazo/*.html
// ==/UserScript==
(function () {
"use strict";
@emanon001
emanon001 / syntax_highlight_of_user_defined_commands.vim
Created January 24, 2012 05:47
Vim script: Syntax highlight of user-defined commands.
augroup syntax-highlight-extension
autocmd!
autocmd Syntax vim call s:set_syntax_of_user_defined_commands()
augroup END
function! s:set_syntax_of_user_defined_commands()
redir => _
silent! command
redir END
@emanon001
emanon001 / vaivavai.vim
Created March 10, 2012 15:06
Vim script: One two three vai!(Haruka Amami shout)
" Commands
command! -nargs=0 -bang Vai
\ call s:vai.vavai('<bang>' == '!')
" Variables
let s:vai = {}
@emanon001
emanon001 / prefix_key_mapping.vim
Created March 13, 2012 15:46
Vim script: Definition of key-mapping using a prefix key is supported.
let s:current_prefix_key = ''
command! -nargs=1 PrefixKeyMappingStart
\ let s:current_prefix_key = <q-args>
command! -nargs=0 PrefixKeyMappingEnd
\ let s:current_prefix_key = ''
function! s:create_prefix_key_mapping_commands()
let base_commands = ['map', 'nmap', 'vmap', 'xmap', 'smap', 'omap',
\ 'imap', 'lmap', 'cmap']
let command_prefix = 'P'
@emanon001
emanon001 / dvorak_for_kinesis.xml
Created March 19, 2012 16:16
KeyRemap4MacBook setting: Dvorak for kinesis keyboard.
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>PI_Engineering</vendorname>
<vendorid>0x05f3</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>Kinesis_Keyboard</productname>
<productid>0x0007</productid>
</deviceproductdef>
@emanon001
emanon001 / prefixedmap_step1.vim
Created March 28, 2012 03:31
Definition of key-mapping using a prefix key. (step1)
" 抽象的なプレフィックスキーを定義する
nnoremap <SID>[Tag] <Nop>
nnoremap <silent> <SID>[Tag]<Space> <C-]>
nnoremap <silent> <SID>[Tag]j :<C-u>tag<CR>
nnoremap <silent> <SID>[Tag]k :<C-u>pop<CR>
nnoremap <silent> <SID>[Tag]s :<C-u>tags<CR>
nnoremap <silent> <SID>[Tag]n :tnext<CR>
nnoremap <silent> <SID>[Tag]p :tprevious<CR>
nnoremap <silent> <SID>[Tag]f :tfirst<CR>
@emanon001
emanon001 / prefixedmap_ideal.vim
Created March 28, 2012 03:51
Definition of key-mapping using a prefix key. (ideal)
PrefixedMapBegin <SID>[Tag]
" {map-command} {map-arguments} <Nop>
" -> {map-command} {map-arguments} {prefix-key} <Nop>
nnoremap <Nop>
" {map-command} {map-arguments} {lhs} {rhs}
" -> {map-command} {map-arguments} {prefix-key}{lhs} {rhs}
nnoremap <silent> <Space> <C-]>
nnoremap <silent> j :<C-u>tag<CR>
nnoremap <silent> k :<C-u>pop<CR>
nnoremap <silent> s :<C-u>tags<CR>
@emanon001
emanon001 / prefixedmap_step2.vim
Created March 28, 2012 03:58
Definition of key-mapping using a prefix key. (step2)
" ユーザ定義コマンドが使えるようにプラグインの読み込みを行なう。
call prefixedmap#load()
PrefixedMapBegin <SID>[Tag]
Pnnoremap <Nop>
Pnnoremap <silent> <Space> <C-]>
Pnnoremap <silent> j :<C-u>tag<CR>
Pnnoremap <silent> k :<C-u>pop<CR>
Pnnoremap <silent> s :<C-u>tags<CR>
Pnnoremap <silent> n :tnext<CR>