Skip to content

Instantly share code, notes, and snippets.

@snaka
snaka / vimperator_plugin_template.js
Created February 13, 2009 04:26
Vimperator plugin template
//
// (プラグインファイル名).js
//
// LICENSE: {{{
//
// This software distributable under the terms of an MIT-style license.
//
// Copyright (c) 2009 snaka<[email protected]>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
//
// gist.js
//
// LICENSE: {{{
// Copyright (c) 2009 snaka<[email protected]>
//
// Distributable under the terms of an MIT-style license.
// http://www.opensource.jp/licenses/mit-license.html
// }}}
// PLUGIN INFO: {{{
buffer.js
---
/**
* Scrolls the buffer vertically <b>pages</b> pages.
*
* @param {number} pages The number of pages to scroll.
*/
scrollPages: function (pages)
{
let win = findScrollableWindow();
" 行末の空白を可視化
set list
set listchars=trail:@,tab:¥ ¥
<html><head><title>JS Stack trace for IE</title>
<script type="text/javascript">
// --- stack trace ---
function stackTrace() {
var caller = arguments.callee.caller;
var stack = funcName(caller) + '<br/>' +
walker(caller.arguments.callee.caller);
window.open().document.write(stack);
function walker(caller) {
@snaka
snaka / twiget.rb
Created March 14, 2009 14:36
Sample ruby twitter client script for GFW
require 'net/http'
require 'kconv'
require 'rubygems'
require 'json'
require 'pit'
require 'ruby-growl'
max_count = ARGV.shift.to_i
@snaka
snaka / biff.rb
Created March 18, 2009 18:05
Simple biff program by ruby + growl
#
# biff.rb
#
require 'net/pop'
require 'nkf'
require 'rubygems'
require 'ruby-growl'
require 'pit'
@snaka
snaka / gist:88200
Created March 31, 2009 13:52
GNTP test program for ruby
#!/usr/bin/ruby
# GNTP test program for ruby
#
require 'socket'
def send_and_recieve msg
msg.gsub!(/\n/, "\r\n")
print msg
sock = TCPSocket.open('localhost', 23053)
@snaka
snaka / gntp.rb
Created April 4, 2009 14:07
Ruby library for GNTP/1.0 (Worked with Growl for Windows)
#!/usr/bin/ruby
#
# Ruby library for GNTP/1.0
#
# LICENSE:{{{
# Copyright (c) 2009 snaka<[email protected]>
#
# The MIT License
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
#!/usr/bin/ruby
#
# Ruby/GNTP example : twitter notifier
#
require 'net/http'
require 'rubygems'
require 'json'
require 'pit'