Skip to content

Instantly share code, notes, and snippets.

View yamaya's full-sized avatar

Masayuki Yamaya yamaya

  • Sapporo, Hokkaido, Japan
View GitHub Profile
@miku
miku / mysqldump2sqlite3.sh
Created December 14, 2010 20:28
Convert a mysql database dump into something sqlite3 understands.
#!/bin/sh
# ================================================================
#
# Convert a mysql database dump into something sqlite3 understands.
#
# Adapted from
# http://stackoverflow.com/questions/489277/script-to-convert-mysql-dump-sql-file-into-format-that-can-be-imported-into-sqlit
#
# (c) 2010 Martin Czygan <[email protected]>
@mdippery
mdippery / book.m
Created October 28, 2010 18:11
An example of using @dynamic properties in Objective-C
#import <Foundation/Foundation.h>
@interface Book : NSObject
{
NSMutableDictionary *data;
}
@property (retain) NSString *title;
@property (retain) NSString *author;
@end
#!/usr/bin/env ruby
# vim: encoding=utf-8 filetype=ruby
require 'rubygems'
require 'optparse'
require 'yaml'
options = YAML.load(<<CONF)
color: true
verbose: false
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("www.tumblr.com"),
domain("www.tumblr-beta.com")
{
ol#posts li blockquote,
body.mceContentBody blockquote {
margin-left: 0 !important;
margin-right: 0 !important;
padding-left: 3px !important;
if expand('%') =~# '_spec\.rb$'
syn keyword rubyRspec describe context it specify it_should_behave_like before after setup subject
endif
hi def link rubyRspec Function
@ishikawa
ishikawa / MyTextView.h
Created November 8, 2008 10:28
Cocoa custom text view with managing marked text
#import <Cocoa/Cocoa.h>
@interface MyTextView : NSView <NSTextInput, NSTextInputClient> {
NSMutableAttributedString *_text;
NSRange _selectedRange;
NSRange _markedRange;
}
@end