Skip to content

Instantly share code, notes, and snippets.

Yo-An Lin c9s

Block or report user

Report or block c9s

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@c9s
c9s / vim-buffer sel by pattern.vim
Created Mar 27, 2009
vim: buffer sel by pattern
View vim-buffer sel by pattern.vim
" 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)
View git gc to all git repository
#!/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 ..
View mk_perl_link
View build subversion trunk for mac (including swig)
#!/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
View IRSSI Log Purger
#!/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 Apr 22, 2009
vim syntax support for sd (http://syncwith.us)
View sdticket.vim
" 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)
View c9s.vim
" 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
View poppler-example.pl
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;
View makefile-example.pl
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');
View gist:110378
if ! has('gui')
highlight Comment ctermfg=gray ctermbg=darkblue
endif
You can’t perform that action at this time.