Skip to content

Instantly share code, notes, and snippets.

View heavenshell's full-sized avatar
💭
Use Vim

Shinya Ohyanagi heavenshell

💭
Use Vim
  • Hyogo, Japan
  • 18:25 (UTC +09:00)
View GitHub Profile
<?php
$foo = array(
'foo' => 'bar', 'bar' => 'baz',
'hogehoge' => 'fugafuga', 'fugafuga' => 'hogehoge'
);
:'<,'>Align =>
<?php
$foo = array(
@heavenshell
heavenshell / macvim crash reports
Created August 6, 2011 12:44
MacVim crash reports
Process: Vim [10144]
Path: /Applications/MacVim.app/Contents/MacOS/Vim
Identifier: Vim
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: zsh [9472]
Date/Time: 2011-08-06 17:57:49.307 +0900
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6
@heavenshell
heavenshell / replace.py
Created August 11, 2011 16:54
Benchmark re.sub() or str.replace()
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from benchmarker import Benchmarker, cmdopt
def replace_reserved_chars(value):
"""
Replace reserved chars to '-'.
:param value: Replace string
@heavenshell
heavenshell / app.py
Created September 30, 2011 16:01
Flask static file
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@heavenshell
heavenshell / gist:1277548
Created October 11, 2011 08:16
Colorscheme
augroup TDD
autocmd!
autocmd BufWinEnter,BufNewFile *test.php set filetype=php.unit
autocmd FileType php.unit colorscheme blue
augroup END
@heavenshell
heavenshell / Socket.php
Created October 21, 2011 14:33
Net_Okuyama for PHP5.2
<?php
/**
* Socket-based adapter for Net_Okuyama for PHP5.2
*
* This module is deprecated.
* Use \Net\Okuyama instead if you are using PHP5.3
*
* PHP version 5.2
*
* Copyright (c) 2011 Shinya Ohyanagi, All rights reserved.
Linux(Scientiffic linux):486581715bb2d5d80a7ddef8db81804e
Mac(Snow Leopard):7d1e354a752529921cd202fea2c57c7a
@heavenshell
heavenshell / ng.py
Created December 29, 2011 09:03
For Unite-outline issue
#!/usr/bin/env python
# -*- coding: utf-8 -*-
class Sample(object):
def __init__(self):
""" init """
pass
def none_docstring(self):
pass
# -*- coding: utf-8 -*-
def bar():
pass
function <SNR>84_call_vimfiler..vimfiler#switch_filer..vimfiler#create_filer..vi
mfiler#handler#_event_handler..<SNR>128_on_BufReadCmd..<SNR>128_initialize_vimfi
ler_directory..vimfiler#force_redraw_screen..vimfiler#get_directory_files..unite
#get_vimfiler_candidates..<SNR>10_get_candidates..<SNR>10_recache_candidates..<S
NR>10_recache_candidates_loop..<SNR>10_get_source_candidates..484..482..unite#ut
il#glob..vimproc#readdir..<SNR>108_libcall, 行 4
Vim(let):dlerror = "dlsym(0x1016e0de0, vp_readdir): symbol not found"
Error occured in vimfiler_gather_candidates!
Source name is file