Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="MPISpec-Run.xsl" ?>
<BEHAVIOUR timestump="Sat Jul 5 23:38:00 2014">
<DESCRIBE>
<DESCRIPTION><![CDATA[function cpi]]></DESCRIPTION>
<DESCRIBE>
<DESCRIPTION><![CDATA[rank0]]></DESCRIPTION>
<IT>
<DESCRIPTION><![CDATA[it return 0]]></DESCRIPTION>
<ASSERTION>
" ------------------------------------
" cascading.vim
"------------------------------------
"{{{
nnoremap <silent>-- :Cascading<CR>
"}}}
"------------------------------------
" smartchr.vim
"------------------------------------
" git
NeoBundleLazy 'kmnk/vim-unite-giti', {
\ 'depends' : 'Shougo/unite.vim',
\ 'autoload': {
\ 'unite_sources': [
\ 'giti', 'giti/branch', 'giti/branch/new',
\ 'giti/branch_all', 'giti/config', 'giti/log',
\ 'giti/remote', 'giti/status'
\ ]
\ }}
// ==UserScript==
// @name Nico Nico Enhance
// @version 0.1
// @description Nico Nico Enhance
// @include *://www.nicovideo.jp/watch/*
// ==/UserScript==
(function(){
try{
// document.getElementById('PlayerContainer').focus();
require 'fileutils'
GEMFILE_TMP = 'Gemfile_tmp'
FileUtils.cp('Gemfile', GEMFILE_TMP)
regex = /^\s*gem ['"]([-\w]+)['"](,.*)?/
gems = File.read(GEMFILE_TMP).scan(regex).map do |g|
g.first if g.last.nil?
end
#MysqlでFKの一覧を調べるワンライナー
mysql -u resolver --password=resolver resolver < TableList.sql |sed 's/\\n/&\
/g'| grep 'CONSTRAINT .* FOREIGN KEY'|cut -d ' ' -f4 > FKList
# ファイル名を置換するワンライナー
ls *.png | cut -d ' ' -f14,15,16,17 |perl -nle '$o=$_;$_=~s/\s/_/i;$_=lc($_);$_=~s/^/icon_/i;rename($o, $_);'
ls *.png | cut -d ' ' -f14,15,16,17 |perl -nle '$o=$_;$_=~s/\s/_/i;$_=lc($_);$_=~s/^/button_/i;rename($o, $_);'
#------------------------------------
# options configuration
# ------------------------------------
# 指定したコマンド名がなく、ディレクトリ名と一致した場合 cd する
setopt auto_cd
# cd でTabを押すとdir list を表示
setopt auto_pushd
# ディレクトリスタックに同じディレクトリを追加しないようになる
setopt pushd_ignore_dups
# コマンドのスペルチェックをする
set showmatch " 括弧の対応をハイライト
set number " 行番号表示
set list " 不可視文字表示
set listchars=tab:>.,trail:_,extends:>,precedes:< " 不可視文字の表示形式
set display=uhex " 印字不可能文字を16進数で表示
set previewheight=15 " プレビュー画面サイズ
set cmdheight=1 " コマンドラインに使われる画面上の行数
set lazyredraw " コマンド実行中は再描画しない
set ttyfast " 高速ターミナル接続を行う
set cursorline " カーソル行をハイライト
local sprite = CCSprite:create("hoge.png")
sprite:setTouchEnabled(true)
sprite:addTouchEventListener(function(event, x, y)
if event == "began" then
return true
elseif event == "moved" then
elseif event == "ended" then
end
end)