This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--sample.php | |
<?php | |
/** | |
* function something | |
*/ | |
function something() { | |
return 1; | |
} | |
?> | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:mock(context) | |
let mock = {'context' : a:context, 'instance_map' : {}} | |
function! mock.function(name) | |
let instance = s:mock_instance(self.context, a:name) | |
let self.instance_map[instance.funcname_full] = instance | |
return instance | |
endfunction | |
function! mock.assert() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 指定したVim scriptをsourceしてエラーをquickfixに表示 | |
function! s:vim_lint(file) | |
let messages = s:vim_lint_messages(s:vim_lint_hook_file(a:file)) | |
let srclines = readfile(a:file) | |
let errors = [] | |
let start_pos = 0 | |
let info = {} | |
echo g:__func_lnums__ | |
for l in split(messages, "\n") | |
if l =~ '^行' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
def plus(a, b): | |
return a + b | |
def minus(a, b): | |
return a - b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use 5.012; | |
use strict; | |
use warnings; | |
use List::Util qw(max); | |
sub my_max(\[$@%]) { | |
my $arg = shift; | |
my $max = 0; | |
my $ref = ref($arg); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.mono-project.com/Compiling_Mono_on_OSX | |
require 'formula' | |
class Mono < Formula | |
url 'http://download.mono-project.com/sources/mono/mono-3.0.12.tar.bz2' | |
sha1 'be46f28e16721e9b975ba17ae02b021ddcc7406e' | |
homepage 'http://www.mono-project.com/' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! OpenWithDWM(action, line) | |
call ctrlp#acceptfile(a:action, a:line) | |
if winnr() !=# 1 && exists('*DWM_Focus') | |
call DWM_Focus() | |
endif | |
endfunction | |
let g:ctrlp_open_func = { | |
\ 'files' : 'OpenWithDWM', | |
\ 'buffers' : 'OpenWithDWM', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
=head1 Examples | |
$ tail -f access_log | perl colorize.pl | |
$ plackup app.psgi 2>&1 | perl colorize.pl | |
=cut | |
use strict; |