Skip to content

Instantly share code, notes, and snippets.

View pocket7878's full-sized avatar
🏠
Working from home

Masato Sogame pocket7878

🏠
Working from home
View GitHub Profile
@pocket7878
pocket7878 / patch
Created June 28, 2011 12:46
little-patch-for unite-colorscheme
*** colorscheme.vim.orig 2011-06-28 21:43:56.000000000 +0900
--- colorscheme.vim 2011-06-28 21:44:41.000000000 +0900
***************
*** 8,14 ****
\ }
function! s:unite_source.hooks.on_init(args, context)
! let s:beforecolor = g:colors_name
endfunction
@pocket7878
pocket7878 / little.patch
Created June 28, 2011 14:13
little-patch-for unite-colorscheme
diff --git autoload/unite/sources/colorscheme.vim autoload/unite/sources/colorscheme.vim
index 63cea36..8cca97c 100644
--- autoload/unite/sources/colorscheme.vim
+++ autoload/unite/sources/colorscheme.vim
@@ -8,7 +8,11 @@ let s:unite_source = {
\ }
function! s:unite_source.hooks.on_init(args, context)
- let s:beforecolor = g:colors_name
+ if exists('g:colors_name')
@pocket7878
pocket7878 / little.patch
Created June 29, 2011 14:04
little patch for vinarise by Pocket
diff --git autoload/vinarise.vim autoload/vinarise.vim
index 49c0991..e757cf9 100644
--- autoload/vinarise.vim
+++ autoload/vinarise.vim
@@ -53,6 +53,7 @@ else
let s:vinarise_BUFFER_NAME = '*vinarise*'
endif
"}}}
+
" Variables "{{{
@pocket7878
pocket7878 / little.patch
Created July 5, 2011 00:43
Define little test's for prelude.vim
diff --git spec/prelude.vim spec/prelude.vim
index bee45d1..f44de4b 100644
--- spec/prelude.vim
+++ spec/prelude.vim
@@ -2,6 +2,96 @@ source spec/base.vim
let g:V = vital#of('vital')
+"Test of wrapper function for type()"{{{
+Context Prelude.is_numeric()
@pocket7878
pocket7878 / gist:1084085
Created July 15, 2011 04:44
little change for syncj
func! s:sync(bang, bundle) abort
let git_dir = expand(a:bundle.path().'/.git/')
if isdirectory(git_dir)
if !(a:bang) | return 0 | endif
let cmd = 'git pull'
if (has('win32') || has('win64'))
"let cmd = substitute(cmd, '^cd ','cd /d ','') " add /d switch to change drives
let cmd = '"'.cmd.'"' " enclose in quotes
endif
"cd to bundle path"
@pocket7878
pocket7878 / gist:1091515
Created July 19, 2011 06:48
little change for outputz.vim
let l:cmd = printf('curl --form-string key=%s --form-string uri=%s --form-string "size=%d" http://outputz.com/api/post',
\ fnameescape(g:outputz_secret_key),
\ fnameescape({g:outputz_uri_function}()),
\ a:n)
if s:V.has_vimproc()
call vimproc#system_bg(cmd)
else
call system(cmd)
endif
@pocket7878
pocket7878 / gist:6561697
Created September 14, 2013 12:36
Shibuya.Lisp Meetup8のライブコーディングを僕もやってみた。
(load "~/quicklisp/setup.lisp")
(let* ((*standard-output* (make-broadcast-stream))
(*error-output* *standard-output*))
(ql:quickload :split-sequence))
(defun parse-ls-l ()
;;Throught first line
(read-line)
(loop for line = (read-line t nil nil)
@pocket7878
pocket7878 / gist:6680752
Created September 24, 2013 05:36
ナムドット問題僕の回答 出力の行数を減らすためにSetを使ってる。
require 'set'
k = [0]*5; m = [0]*5
begin
puts Set.new([*1..5]).divide{|i| k[i-1]}.map{|i| i.to_a*""}*"."
end while
(if i = [4,3,2,1].index{|i| k[i] <= m[i-1]}; then i=4-i
k[i]+=1; m[i] = m[i]>k[i] ? m[i] : k[i]
((i+1)..4).each{|j| k[j] = k[0]; m[j] = m[i]; }
end)
@pocket7878
pocket7878 / MultiSplitPane.java
Last active April 10, 2018 11:40
MultiSplitPane.java
import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
public class MultiSplitPane extends JPanel {
private int orientation;
private Boolean needSplit;
private Boolean splited;
private Component firstChild;
private MultiSplitPane private_second_child;
@pocket7878
pocket7878 / 0_reuse_code.js
Created March 20, 2014 04:34
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console