Skip to content

Instantly share code, notes, and snippets.

View FGtatsuro's full-sized avatar

FGtatsuro FGtatsuro

View GitHub Profile
@FGtatsuro
FGtatsuro / file0.txt
Created January 24, 2012 03:10
IPythonのプロンプトを起動時に'>>>'に変更する設定 ref: http://qiita.com/items/1856
In [1]: %doctest_mode
Exception reporting mode: Plain
Doctest mode is: ON
>>>
@FGtatsuro
FGtatsuro / gen_methodlist.py
Created February 16, 2012 09:43
generate testcase sheets per class from javadoc
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import os.path
import sys
import lxml.html
import xlwt
@FGtatsuro
FGtatsuro / gist:5023762
Last active December 14, 2015 03:49
Confirm the behavior of NSRL
#import <Foundation/Foundation.h>
int main(void)
{
NSURL *baseWithSlash = [NSURL URLWithString:@"http://example.com/v1/"];
NSURL *baseWithoutSlash = [NSURL URLWithString:@"http://example.com/v1"];
NSString *relativeWithSlash = @"/foo";
NSString *relativeWithoutSlash = @"foo";
// 1.baseWithSlash + relativeWithSlash
*** snipMate.vim.old 2009-04-23 02:30:12.703125000 +0900
--- snipMate.vim 2009-04-23 01:41:56.890625000 +0900
***************
*** 187,190 ****
--- 187,202 ----
let num = inputlist(snippet) - 1
return num == -1 ? '' : s:multi_snips[a:scope][a:trigger][num][1]
endf
+
+ fun GetSnippetsList(ft)
@FGtatsuro
FGtatsuro / onoff_button.py
Created June 30, 2013 16:35
PySideのスロットを定義する際の注意(2) ref: http://qiita.com/FGtatsuro/items/524c85c5df88bdcc0135
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from PySide.QtGui import QApplication, QMainWindow, QWidget, QPushButton,\
QVBoxLayout
class OnOffButtonWidget(QWidget):
@FGtatsuro
FGtatsuro / python.vim
Created July 3, 2013 17:11
errormaker.vimとQuickFixウインドウの自動開閉 ref: http://qiita.com/FGtatsuro/items/bc596674a5401259a249
setlocal makeprg=/Users/tatsuro/python/pythonbrew/bin/flake8\ %
setlocal errorformat=%f:%l:%m
""" getqflist()でQuickFixのエラー件数が取得できる.
function! s:open_quickfix_window()
silent make | redraw!
if (len(getqflist()) == 0)
cclose
else
copen
@FGtatsuro
FGtatsuro / file0.txt
Created July 6, 2013 15:44
OmniSharp(on Mountain Lion)導入メモ ref: http://qiita.com/FGtatsuro/items/ff29b43fcc9cafaf1e4c
NeoBundleLazy 'nosami/Omnisharp', {
\ 'autoload': {'filetypes': ['cs']},
\ 'build': {
\ 'mac': 'xbuild server/OmniSharp.sln',
\ 'unix': 'xbuild server/OmniSharp.sln',
\ }
\ }
@FGtatsuro
FGtatsuro / file7.txt
Created July 12, 2013 04:05
深イイ意味など全くない並列処理 in Python ref: http://qiita.com/FGtatsuro/items/c7c66362c920622efa83
// Python3
% python3
Python 3.3.0 (default, Mar 2 2013, 11:44:00)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.24)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = range(5)
>>> a
range(0, 5)
>>> type(a)
<class 'range'>
@FGtatsuro
FGtatsuro / mp.py
Created July 16, 2013 15:30
concurrent in python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import math
from multiprocessing import Process, Queue, Pool
from itertools import izip_longest, islice
import cProfile
@FGtatsuro
FGtatsuro / nunit-console2-all
Created July 22, 2013 15:54
nunit-console2で指定したテストのみ流す ref: http://qiita.com/FGtatsuro/items/1aeab6d32ca10997b1db
nunit-console2 (dllへのパス)