Skip to content

Instantly share code, notes, and snippets.

View TakashiNakagawa's full-sized avatar

TakashiNakagawa TakashiNakagawa

View GitHub Profile
@TakashiNakagawa
TakashiNakagawa / gist:4700560
Last active August 1, 2017 02:29
alfredからevernoteへポストする ノートブックはIdeas ノート名は日付 同一日付なら追記される
-- ノートブックの指定
property nb : "Ideas"
property _newNote : missing value
on alfred_script(q)
set _inputText to q
set AppleScript's text item delimiters to "-open"
set _text to text items of _inputText
" release autogroup in MyAutoCmd
augroup MyAutoCmd
autocmd!
augroup END
"------------------------
"検索関係
"------------------------
set ignorecase " 大文字小文字を区別しない
set smartcase
# unite {{{
[[plugins]]
repository = 'Shougo/unite.vim'
[[plugins]]
repository = 'Shougo/unite-outline'
[[plugins]]
repository = 'Shougo/neomru.vim'
# like ide {{{
[[plugins]]
repository = 'Shougo/vimfiler'
explorer = 1
mappings = '<Plug>'
[[plugins]]
repository = 'thinca/vim-quickrun'
mappings = '<Plug>'
" set showtabline=2
" ツールバーを削除
set guioptions-=T
"半角文字の設定
set visualbell t_vb=
" ------------------------------------------------------
" colorscheme
(define (sum term a next b)
(if (> a b)
0
(+ (term a)
(sum term (next a) next b))))
; (define (pi-sum a b)
; (define (pi-term x)
; (/ 1.0 (* x (+ x 2))))
; (define (pi-next x)
; (+ x 4))
@TakashiNakagawa
TakashiNakagawa / copy.rb
Last active December 23, 2015 05:59
opencvのincludeファイルコピー
require "find"
require "fileutils"
def copy(source_path, target_path)
Find.find(source_path) do |source|
next if File.directory? source
#パスにopencv2が含まれていなければ除外
next unless File.dirname(source).include?("opencv2")
@TakashiNakagawa
TakashiNakagawa / gist:5062668
Created March 1, 2013 05:36
http://d.hatena.ne.jp/tanakahisateru/20111003/1317623104 $ git diff --name-status HEAD~1 M foo/bar.html A foo/baz.html ... というふうに変更がどうだったかを確認できたら、そのままコマンドラインのヒストリを戻ってちょっと書き足します。 $ git diff --name-status HEAD~1 | export-diff.py ../last-update
#!/usr/bin/env python
#!coding: utf-8
import sys, os, re, shutil
from optparse import OptionParser
parser = OptionParser(usage=
'''%prog [options] <target-dir>
Example:
#import "MyWebViewController.h"
#import "AFNetworking.h"
#if false // facebook
#define LOGIN_URL @"http://sample/login.php?command=facebook&app=true"
#define REDIRECT_URL @"command=facebook_cb"
#else
# coding: utf-8
require "fileutils"
require 'find'
count = 0
Find.find('./check_xml'){|f|
if File.basename(f) == ".DS_Store"
next
end