Skip to content

Instantly share code, notes, and snippets.

View Pafuxu's full-sized avatar

Kouji Tsuru Pafuxu

View GitHub Profile
@Pafuxu
Pafuxu / Get_Block_Quote_Tag.scpt
Last active August 29, 2015 14:05
引用タグを自動化する
tell application "Safari"
activate
set theURL to URL of front document
set theTitle to name of front document
set selectedText to (do JavaScript "(''+getSelection())" in document 1)
set the clipboard to "<blockquote class=\"block-quote_content\" cite=\"" & theURL & "\" title=\"「" & theTitle & "」から引用\">" & return & " " & "<p>" & selectedText & "</p>" & return & " " & "<footer>" & return & " " & "<cite>— <a href=\"" & theURL & "\">" & theTitle & "</cite>" & return & " " & "</footer>" & return & "</blockquote>" & return as string
end tell
<blockquote cite="引用元のURL" title="「引用元のタイトル」から引用">
<p>引用本文</p>
<footer>? <cite><a href="引用元のURL">引用元のタイトル</a></cite></footer>
</blockquote>
<q cite="引用元のURL" title="「引用元のタイトル」から引用">引用本文</q>
### .bash_profile
# 日付を英語表記
#export LC_TIME=en_US.UTF-8
# サーチパス
export PATH=/opt/local/bin:/opt/local/sbin/:$PATH
export MANPATH=/opt/local/share/man:/opt/local/man:$MANPATH
# プロンプトデザイン
### .inputrc
# 日本語環境設定
set convert-meta off
set output-meta on
set input-meta on
# 大文字小文字を無視
set completion-ignore-case on
# .bashrc
# rmコマンド実行でゴミ箱へ
# 'rm' move ~/.Trash
function rm () {
local path
for path in "$@"; do
# ignore any arguments
if [[ "$path" = -* ]]; then :
else
""" .vimrc
" 文字コード判定
set fencs=iso-2022-jp,euc-jp,cp932
" ステータスラインを常に表示
set laststatus=2
" ステータスラインに文字コードと改行文字を表示する
set statusline=%<%f\ %m%r%h%w%{'['.(&fenc!=''?&fenc:&enc).']['.&ff.']'}%=%l,%c%V%8P
$ git config -l
user.name=Kouji Tsuru
user.email=pafuxu@gmail.com
core.editor=vim
core.pager=lv
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
$ git remote show origin
* remote origin
URL: git@github.com:Pafuxu/my_files.git
Remote branch merged with 'git pull' while on branch master
master
Tracked remote branch
master
" Search
set hlsearch " highlight search
set incsearch " incremental search, search as you type
set ignorecase " Ignore case when searching
set smartcase " Ignore case when searching lowercase
" ESCキー2度押しでハイライトを消す
nnoremap <Esc><Esc> :<C-u>set nohlsearch<Return>
nnoremap / :<C-u>set hlsearch<Return>/
nnoremap ? :<C-u>set hlsearch<Return>?