This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if Bundler::WINDOWS | |
require 'nkf' | |
class << $stdout | |
def write_with_conversion(str) | |
write_without_conversion NKF.nkf('-sxm0', str.to_s) | |
end | |
alias_method_chain :write, :conversion | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSDate+RoundToTime.h | |
// Rh7Kit | |
// | |
// Created by 大木 聡 on 11/09/02. | |
// Copyright 2011 rh7. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jp.rh7.utils; | |
public interface DataHandler { | |
// Transactionで実行する処理をここに書く | |
public abstract void execute(); | |
// モデルを取り出す | |
public abstract Object[] getModels(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jp.rh7.model; | |
import java.io.Serializable; | |
import java.util.Date; | |
import com.google.appengine.api.datastore.Key; | |
import org.slim3.datastore.Attribute; | |
import org.slim3.datastore.CreationDate; | |
import org.slim3.datastore.Model; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mmm_ddns_agent.conf | |
[nameserver_agent] | |
port = 9994 # mmm_ddns_agentを起動するポート | |
dns_server = 10.1.2.3 # レコードを登録するDDNSサーバ | |
dns_port = 53 # DDNSサーバのポート | |
ttl = 10 # Master DBのDNSレコードTTL | |
type = A # Aレコードのみ(MMMがddns_agentに送りつけてくるのかI/FのIPアドレスなので) | |
zone = example.com # Master DBを登録するDNSゾーン | |
# TSIGキー認証の場合は下記を追加 | |
tsig_key_name = example.com. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You would use this object as follows: | |
var xhr = XHRFactory.getInstance(); | |
var url = "http://www.xyz.com/someresource/...."; | |
// do the operation | |
xhr.open("GET", url, true); | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState==4) { | |
// if "OK" | |
if (xhr.status==200) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# coding: utf-8 | |
require 'rubygems' | |
require 'right_resource' | |
# Server Array Response data sample | |
xml = '<server-array> | |
<active type="boolean">false</active> | |
<array-type>queue</array-type> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# coding: utf-8 | |
require 'rubygems' | |
gem 'crack', '~>0.1.0' | |
require 'crack' | |
#gem 'rightresource', '=0.4.5' # with crack 0.1.8 | |
#require 'right_resource' | |
# Core extensions of Hash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* xhrioextbinary.js - goog.net.XhrIo Extension for sendAsBinary | |
* | |
* @license Copyright 2011 The xhrdavclient library authors. All rights reserved. | |
*/ | |
goog.provide('xhrdav.lib.XhrIoExtBinary'); | |
goog.require('xhrdav.lib.Config'); | |
goog.require('goog.net.XhrIo'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
goog.require('xhrdav.DavFs'); | |
goog.require('xhrdav.HttpStatus'); | |
# 変更前 | |
xhrdav.lib.DavFs.getInstance().upload(path, file. handler, null, null, callback_context, onComplete); | |
# 変更後(namespaceからlibを消して、getRequest()をよんでからAPIを呼ぶ) | |
xhrdav.DavFs.getInstance().getRequest().upload(path, file, handler, null, null, callback_context, opt_helper, onComplete); | |
OlderNewer