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
class ActionView::Base | |
@@field_error_proc = Proc.new{ |html_tag, instance| "<span class=\"fieldWithErrors\">#{html_tag}</span>" } | |
end | |
ActionView::Helpers::ActiveRecordHelper.module_eval do | |
def error_message_on(object, method, *args) | |
options = args.extract_options! | |
unless args.empty? | |
ActiveSupport::Deprecation.warn('error_message_on takes an option hash instead of separate ' + | |
'prepend_text, append_text, and css_class arguments', caller) |
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
class RequestMethodOverrider | |
HTTP_METHODS = %w(GET HEAD PUT POST DELETE OPTIONS) | |
HTTP_METHOD_OVERRIDE_KEY = "__method".freeze | |
def initialize(app) | |
@app = app | |
end | |
def call(env) |
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
begin | |
require File.expand_path('../.bundle/environment', __FILE__) | |
rescue LoadError | |
require 'rubygems' | |
require 'bundler' | |
Bundler.setup | |
Bundler.require | |
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
--- config.mk.old 2010-10-17 19:35:43.000000000 +0900 | |
+++ config.mk 2010-10-17 18:56:26.000000000 +0900 | |
@@ -8,10 +8,10 @@ | |
HAS_XLINK=n | |
# Support Wpa_Supplicant | |
-HAS_WPA_SUPPLICANT=n | |
+HAS_WPA_SUPPLICANT=y | |
# Support Native WpaSupplicant for Network Maganger |
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
--- rtusb_dev_id.c.old 2010-10-17 19:51:34.000000000 +0900 | |
+++ rtusb_dev_id.c 2010-10-17 19:53:46.000000000 +0900 | |
@@ -60,6 +60,7 @@ | |
{USB_DEVICE(0x14B2,0x3C06)}, /* Conceptronic */ | |
{USB_DEVICE(0x14B2,0x3C28)}, /* Conceptronic */ | |
{USB_DEVICE(0x2019,0xED06)}, /* Planex Communications, Inc. */ | |
+ {USB_DEVICE(0x2019,0xAB24)}, /* Planex GW-US300MiniS */ | |
{USB_DEVICE(0x07D1,0x3C09)}, /* D-Link */ | |
{USB_DEVICE(0x07D1,0x3C11)}, /* D-Link */ | |
{USB_DEVICE(0x14B2,0x3C07)}, /* AL */ |
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
--- rt_linux.h.old 2010-10-17 19:55:36.000000000 +0900 | |
+++ rt_linux.h 2010-10-17 18:58:08.000000000 +0900 | |
@@ -1074,8 +1074,8 @@ | |
#define RT28XX_PUT_DEVICE usb_put_dev | |
#define RTUSB_ALLOC_URB(iso) usb_alloc_urb(iso, GFP_ATOMIC) | |
#define RTUSB_SUBMIT_URB(pUrb) usb_submit_urb(pUrb, GFP_ATOMIC) | |
-#define RTUSB_URB_ALLOC_BUFFER(pUsb_Dev, BufSize, pDma_addr) usb_buffer_alloc(pUsb_Dev, BufSize, GFP_ATOMIC, pDma_addr) | |
-#define RTUSB_URB_FREE_BUFFER(pUsb_Dev, BufSize, pTransferBuf, Dma_addr) usb_buffer_free(pUsb_Dev, BufSize, pTransferBuf, Dma_addr) | |
+#define RTUSB_URB_ALLOC_BUFFER(pUsb_Dev, BufSize, pDma_addr) usb_alloc_coherent(pUsb_Dev, BufSize, GFP_ATOMIC, pDma_addr) | |
+#define RTUSB_URB_FREE_BUFFER(pUsb_Dev, BufSize, pTransferBuf, Dma_addr) usb_free_coherent(pUsb_Dev, BufSize, pTransferBuf, Dma_addr) |
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
# coding: utf-8 | |
# This program is free software. It comes without any warranty, to | |
# the extent permitted by applicable law. You can redistribute it | |
# and/or modify it under the terms of the Do What The Fuck You Want | |
# To Public License, Version 2, as published by Sam Hocevar. See | |
# http://sam.zoy.org/wtfpl/COPYING for more details. | |
require 'rubygems' | |
require 'net/https' |
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
Before do | |
require 'factory_girl' | |
require 'faker' | |
Dir.glob(File.join(File.dirname(__FILE__), '../../spec/factories/*.rb')).each {|f| require f} | |
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
前提 /^携帯でアクセスしている$/ do | |
header('user_agent', 'DoCoMo/2.0 P906i(c100;TB;W24H15)') | |
header('x_dcmguid', 'subscriber') | |
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
# coding: utf-8 | |
require 'openssl' | |
def encrypt(str, secret) | |
enc = OpenSSL::Cipher::Cipher.new("AES-256-CBC") | |
enc.encrypt | |
enc.pkcs5_keyivgen(secret) | |
return (enc.update(str) + enc.final).unpack("H*").first.to_s | |
end |
OlderNewer