Skip to content

Instantly share code, notes, and snippets.

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

Hiroshi SHIBATA hsbt

🏠
Working from home
View GitHub Profile
--- a/mark.c 2009-06-25 02:03:01.000000000 +0900
+++ b/mark.c 2009-06-25 02:03:50.000000000 +0900
@@ -59,6 +59,8 @@
static void MarkRedisplayLine __P((int, int, int, int));
static int MarkRewrite __P((int, int, int, struct mchar *, int));
+void pbcopy(const char *strings);
+
extern struct layer *flayer;
extern struct display *display, *displays;
diff -ur screen-4.0.3.org/ansi.c screen-4.0.3/ansi.c
--- screen-4.0.3.org/ansi.c 2003-12-05 22:57:05.000000000 +0900
+++ screen-4.0.3/ansi.c 2010-10-18 22:49:55.000000000 +0900
@@ -716,6 +716,10 @@
LPutChar(&curr->w_layer, &omc, ox, oy);
LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
}
+ if (curr->w_mbcs)
+ {
+ curr->w_rend.mbcs = curr->w_mbcs = 0;
@hsbt
hsbt / _rake
Created November 22, 2010 14:06
#compdef _rake rake
_rake_does_task_list_need_generating () {
if [[ ! -f .rake_tasks ]]; then return 0;
else
return $([[ Rakefile -nt .rake_tasks ]])
fi
}
_rake () {
#!/usr/bin/env perl
use strict;
use warnings;
use Pod::Usage;
use Text::Markdown 'markdown';
use HTML::TreeBuilder;
use List::Util 'max';
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>org.postgresql.postgres.master</string>
<key>ProgramArguments</key>
<array>
<VirtualHost *:8080>
ServerAdmin [email protected]
ServerName www.hsbt.org
DocumentRoot /var/www
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo AuthConfig Limit Options Indexes
Order allow,deny
@hsbt
hsbt / gemenv
Created October 15, 2011 00:21
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.10
- RUBY VERSION: 1.9.3 (2011-09-23 patchlevel -1) [x86_64-darwin11.2.0]
- INSTALLATION DIRECTORY: /Users/hsbt/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /Users/hsbt/.rbenv/versions/1.9.3-rc1/bin/ruby
- EXECUTABLE DIRECTORY: /Users/hsbt/.rbenv/versions/1.9.3-rc1/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-11
- GEM PATHS:
# -*- coding: utf-8 -*-
require 'pathname'
task "default" => ["show", "unlink", "symlink"]
HOME = Pathname.new("~")
dotfiles =[]
%w(public private).each do |path|
dotfiles += Pathname.glob("#{path}/dot.[a-zA-Z0-9]*")
def scoped_env(env)
old = {}
ENV.each {|k,v| old[k] = v}
env.each {|k,v| ENV[k] = v}
yield
old.each {|k,v| ENV[k] = v}
end
ENV['foo'] = 'buzz'
p ENV['foo']
:a
$!N
$!b a
s/\#\! \/opt\/local\/bin\/ruby \-w\n//g