Skip to content

Instantly share code, notes, and snippets.

test

こんにちは。

FROM httpd:2.4
ENV TDIARY_VERSION 5.0.7
WORKDIR /usr/local/apache2/htdocs
RUN apt-get update && apt-get install -y \
curl \
ruby \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
@machu
machu / jquery.socialbutton.js.patch
Created August 18, 2011 14:45
jQueryのソーシャルボタンプラグインを2回以上呼び出したときに、Google+ボタンがa表示されない問題へのパッチ
diff --git a/js/jquery.socialbutton.js b/js/jquery.socialbutton.js
index d4bb90c..03ca664 100644
--- a/js/jquery.socialbutton.js
+++ b/js/jquery.socialbutton.js
@@ -731,7 +731,11 @@ function socialbutton_google_plusone(target, options, defaults, index, max_index
script_params = '{' + script_params + '}';
}
- $('body').append('<script type="text/javascript" src="https://apis.google.com/js/plusone.js">' + script_params + '</script>');
+ if (typeof gapi === "undefined" || typeof gapi.plusone === "undefined") {
Index: section_footer2.rb
===================================================================
--- section_footer2.rb (revision 38267)
+++ section_footer2.rb (working copy)
@@ -26,6 +26,31 @@
link
end
+unless defined?(subtitle)
+ def subtitle( date, index, escape = true )
# = CachedPStore -- PStore extension w/ cache mechanism
#
# Copyright (C) 2010, MATSUOKA Kohei
# You can redistribute it and/or modify it under GPL2.
#
# == Usage examle:
#
# require 'cached_pstore'
#
# db = CachedPStore.new('test.dat', :expire => 3600) {|db, key|
diff --git a/misc/lib/compatible.rb b/misc/lib/compatible.rb
index 6f5b5cf..9968536 100644
--- a/misc/lib/compatible.rb
+++ b/misc/lib/compatible.rb
@@ -34,23 +34,6 @@ unless "".respond_to?('each')
end
end
-# Auto convert ASCII_8BIT pstore data (created by Ruby-1.8) to UTF-8.
-if "".respond_to?('force_encoding')
require 'rubygems'
require 'rack/auth/twitter'
class ProtectedApp
def call(env)
Rack::Response.new("Hello, #{env['REMOTE_USER']}").finish
end
end
use Rack::Session::Pool, :expire_after => 2592000
# This is the Apache server configuration file for providing FastCGI support
# through mod_fcgid
#
# Documentation is available at http://fastcgi.coremail.cn/doc.htm
LoadModule fcgid_module modules/mod_fcgid.so
# Use FastCGI to process .fcg .fcgi & .fpl scripts
# Don't do this if mod_fastcgi is present, as it will try to do the same thing
<IfModule !mod_fastcgi.c>
module Safe
def safe( level = 4 )
result = nil
if $SAFE < level then
Proc.new {
$SAFE = level
result = yield
}.call
else
result = yield
# -*- coding: utf-8 -*-
require 'safe'
describe Safe, "safe mode module" do
before(:each) do
$SAFE = 1
ENV["sample"] = "default"
end