Skip to content

Instantly share code, notes, and snippets.

@Phize
Phize / gist:1268481
Created October 6, 2011 19:59
Sass function to join multiple lists with separator (An emulation of Compass's compact function).
// 複数のリストを区切り文字で連結
//
// http://twitter.com/#!/Phize/status/68721136401260544
// http://twitter.com/#!/Phize/status/68721331155386368
// http://twitter.com/#!/Phize/status/68723540031057922
//
// <code>
// $value-1: 1px 2px 3px #fff;
// $value-2: 4px 5px 6px #000;
// property: join-lists(($value-1) ($value-2));
@Phize
Phize / gist:1268489
Created October 6, 2011 20:02
An emulation of Adobe Photoshop's layer blend mode on RSL(Renderman Shading Language).
# Renderman Shading Language
# http://twitter.com/Phize/status/122033158265901056
float pblend(float c1; float c2; string mode) {
float result = 0.0;
float d = 0.0;
if (mode == "normal") {
result = c2;
}
@Phize
Phize / .vimrc
Created October 21, 2011 09:11
:MakeWith <compiler> command. (コンパイラを一時的に変更して :make するコマンド)
augroup qflist-copen
autocmd!
autocmd vimrc_autocmd QuickfixCmdPost make,grep,grepadd,vimgrep,vimgrepadd,cscope
\ if len(getqflist()) != 0 | copen | endif
augroup END
augroup loclist-lopen
autocmd!
autocmd vimrc_autocmd QuickfixCmdPost lmake,lgrep,lgrepadd,lvimgrep,lvimgrepadd,lcscope
\ if len(getloclist(0)) != 0 | lopen | endif
augroup END
@Phize
Phize / css.vim
Created October 21, 2011 12:49 — forked from tsukkee/css.vim
http://www.vim.org/scripts/script.php?script_id=2150 にrgb()/rgba()のサポート,256colorsターミナル最適化済みのもののbug fix & buffer localなautocmdに修正
" Language: Colored CSS Color Preview
" Maintainer: Niklas Hofer <niklas+vim@lanpartei.de>
" URL: svn://lanpartei.de/vimrc/after/syntax/css.vim
" Last Change: 2008 Feb 12
" Licence: No Warranties. Do whatever you want with this. But please tell me!
" Version: 0.6
" Modified Date: 2010 Jan 19
" Original Version: 0.7
" Current Version: 0.7.2
@Phize
Phize / tidy.vim
Created October 21, 2011 16:02
HTML (tidy) compiler plugin.
" Vim compiler file
" Compiler: HTML Tidy
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/tidy.vim
" Last Change: 2004 Nov 27
" NOTE: set 'tidy_compiler_040800' if you are using the 4th August 2000 release
" of HTML Tidy.
if exists("current_compiler")
@Phize
Phize / php.vim
Created October 21, 2011 16:03
PHP compiler plugin.
" Vim compiler file
" Compiler: PHP
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/php.vim
" Last Change: 2004 Nov 27
if exists("current_compiler")
finish
endif
let current_compiler = "php"
@Phize
Phize / js.vim
Created October 21, 2011 16:03
JavaScript (Rhino) compiler plugin.
if exists('current_compiler')
finish
endif
let current_compiler = 'javascript'
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
@Phize
Phize / jshint.vim
Created October 21, 2011 16:04
JSHint (Rhino) compiler plugin.
if exists('current_compiler')
finish
endif
let current_compiler = 'jshint'
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
@Phize
Phize / rhinoed_jslint.vim
Created October 21, 2011 16:05
JSLint (Rhino) compiler plugin.
if exists('current_compiler')
finish
endif
let current_compiler = 'rhinoed_jslint'
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
@Phize
Phize / csslint.vim
Created October 21, 2011 16:05
CSSLint (Rhino) compiler plugin.
if exists('current_compiler')
finish
endif
let current_compiler = 'csslint'
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo