This file contains hidden or 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 | |
module Filters | |
class TraceLogFilter | |
def initialize(logger = nil) | |
unless logger | |
@logger = Rails.logger | |
else | |
@logger = logger | |
end |
This file contains hidden or 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 | |
module Loggers | |
if Settings.logger.trace.nil? or Settings.logger.trace.output.nil? | |
TRACE_LOGGER = ActiveSupport::TaggedLogging.new(Logger.new(STDERR)) | |
else | |
TRACE_LOGGER = ActiveSupport::TaggedLogging.new(Logger.new(Settings.logger.trace.output)) | |
end | |
end |
This file contains hidden or 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
# see http://ar156.dip.jp/tiempo/publish/52 | |
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
rescue_from Exception, :with => :error_500 | |
def error_500(exception) | |
logger.error "#{exception.message}" | |
render :file => "#{Rails.root}/public/500.html", :status => 500, :layout => false, :content_type => 'text/html' | |
end |
This file contains hidden or 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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>control+[ with ime-off</name> | |
<identifier>private.ctrl-L2ctrl-L+IME-OFF</identifier> | |
<appendix></appendix> | |
<autogen>__KeyToKey__ KeyCode::BRACKET_LEFT, ModifierFlag::CONTROL_L, KeyCode::BRACKET_LEFT, ModifierFlag::CONTROL_L, KeyCode::JIS_EISUU</autogen> | |
</item> | |
</root> |
This file contains hidden or 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_name.camelize.constantize.new |
This file contains hidden or 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
options.logging = function(args) { | |
logger.debug(args); | |
}; | |
var sequelize = new Sequelize(db, username, password, options); |
This file contains hidden or 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
var child = spawn(cmd, args, opts.opts); | |
var stdout = []; | |
var stdoutLength = 0; | |
var stderr = []; | |
var stderrLength = 0; | |
if (child.stdout) { | |
child.stdout.on('data', function(buf) { | |
stdout.push(buf); | |
stdoutLength += buf.length; | |
}); |
This file contains hidden or 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
Show hidden characters
{ | |
"settings": { | |
"sublimeclang_options": [ | |
"-Wall", | |
"-isysroot", "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk", | |
"-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include", | |
"-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks", | |
"-arch", "arm", | |
"-I${project_path:your-project}/**" | |
] |
This file contains hidden or 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
brew tap | awk '{print "tap " $0}' >> Brewfile | |
brew list | awk '{print "install " $0}' >> Brewfile |
This file contains hidden or 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
git ls-files --deleted -z | xargs -0 -t git rm --ignore-unmatch |
OlderNewer