Skip to content

Instantly share code, notes, and snippets.

View c9s's full-sized avatar

c9s

  • Taipei, Taiwan
  • 19:39 (UTC +08:00)
  • X @c9s
View GitHub Profile
@c9s
c9s / vim-buffer sel by pattern.vim
Created March 27, 2009 04:57
vim: buffer sel by pattern
" buffer sel by pattern {{{
" ====================================
function! BufSel(pattern)
let buf_count = bufnr("$")
let cur_bufnr = 1
let nummatches = 0
let firstmatchingbufnr = 0
while cur_bufnr <= buf_count
if(bufexists(cur_bufnr))
let currbufname = bufname(cur_bufnr)
#!/bin/bash
ls -1F | grep '/$' | while read dir ; do
echo "--------Processing $dir"
cd $dir
if [ -d '.git' ] ; then
git gc
else
echo "These is no .git directory"
fi
cd ..
#!/bin/bash
# subversion install script
# please run this script as root
# last update: 08 Dec 24 12/24/2008
install_swig=1
install_subversion_svn=1
svn_version=1.5.3
swig_version=1.3.38
#!/usr/bin/env perl
use warnings;
use utf8;
local $|=1;
my @files = @ARGV;
for my $file ( @files ) {
my $out = $file . ".out";
print "Processing $file";
open FH,"<", $file;
@c9s
c9s / sdticket.vim
Created April 22, 2009 00:27
vim syntax support for sd (http://syncwith.us)
" vim:et:sw=2:fdm=marker:
" SD Ticket Syntax File
" Maintainer: Yo-An Lin < cornelius.howl@gmail.com >
" URL: http://oulixe.us/
" Last Change: 09 Apr 21 04/21/2009
" Version: 0.1
" Intro:
"
" This syntax file is for ticket summary file of SD (peer-to-peer bug
" tracking system)
" vim:fdm=marker:sw=2:ts=2:et:noet:fdl=0:
"============================
" Author: Cornelius < cornelius.howl{at}gmail{dot}com >
" WebSite: http://c9s.blogspot.com
" Date: Wed 28 Mar 2007 04:37:26 AM CST
" Usage: {{{
" * press 'za' on each fold. then you can edit the settings.
" * press 'zm' , 'zr' to open/close all folds.
" * template for filetype is located in .vim/skeleton/
" * gvim configuration is located at .gvimrc
use Poppler;
my $path = 'file:///path/to/some.pdf';
my $o = Poppler::Document->new_from_file($path);
my $page = $o->get_page( 0 );
my $dimension = $page->get_size;
warn $dimension->get_width;
use inc::Module::Install 0.46;
name('Jifty');
license('Perl');
include('Module::AutoInstall');
perl_version '5.8.3';
requires('App::CLI' => 0.08 ); # App::CLI::Command::Help App::CLI::Command
requires('Cache::Cache'); #Cache::FileCache
requires('Calendar::Simple');
requires('Class::Accessor'); # Class::Accessor::Fast
requires('Class::Container');
if ! has('gui')
highlight Comment ctermfg=gray ctermbg=darkblue
endif