Skip to content

Instantly share code, notes, and snippets.

var scrollBox = scrollView.get('contentDiv'),
maxScroll = scrollBox.get('scrollHeight') - scrollBox.get('clientHeight'),
scrollTop = item.get('scrollTop');
scrollView.scrollTo(Math.min(maxScroll, scrollTop));
Building native extensions. This could take a while...
ERROR: Error installing memcached:
ERROR: Failed to build gem native extension.
/usr/bin/ruby18 extconf.rb
Building libmemcached.
tar xzf libmemcached-0.32.tar.gz 2>&1
Patching libmemcached source.
patch -p1 -Z < libmemcached.patch
patching file libmemcached-0.32/libmemcached/memcached_response.c
YUI.add('myoverlay', function(Y) {
Y.MyOverlay = Y.Base.create('myOverlay', Y.Overlay, [], {}, {});
}, '1', {requires: ['overlay']});
Y.use('myoverlay', function() {
var dialog1 = new Y.MyOverlay({contentBox:'#widget1',width:'12em',height:'12em', centered:true, zIndex:10}).render();
});
YUI.add('paginator', function(Y) {
Y.Test = Y.Base.create('test', Y.Widget, [Y.WidgetParent, Y.WidgetChild], {
initializer: function (config) { ... }
}, {
CONTENT_TEMPLATE: '<ul></ul>',
ATTRS: { ... }
});
}, '0.1', {requires: ['widget', 'selector-css3', 'widget-parent', 'widget-child'] });
We couldn’t find that file to show.
Caption.ATTRS = {
title_element: {},
edit_input: {},
edit_button: {},
save_button: {}
};
Caption.HTML_PARSER = {
title_element: '.view h3',
edit_input: '.edit input',
.yui-caption-content .edit { display: none; }
.yui-caption-content.editing .edit { display: block; }
.yui-caption-content.editing .view { display: none: } /* if you like */
<div id="caption1" class="yui-caption-content">
<div class="view">
<h3>Title</h3>
</div>
<div class="edit">
<input value="" name="title" />
<button type="button">Save</button>
</div>
</div>
<html>
<head>
<title>Test</title>
<script src="http://yui.yahooapis.com/3.0.0b1/build/yui/yui-min.js" type="text/javascript"></script>
</head>
<body>
<form>
<div class="thediv">
<textarea name="textarea">Foo</textarea>
</div>
diff --git a/lib/hoptoad_notifier.rb b/lib/hoptoad_notifier.rb
index 1301daa..5b568d2 100644
--- a/lib/hoptoad_notifier.rb
+++ b/lib/hoptoad_notifier.rb
@@ -256,7 +256,10 @@ module HoptoadNotifier
private
def public_environment? #nodoc:
- defined?(RAILS_ENV) and !['development', 'test'].include?(RAILS_ENV)
+ if defined?(RAILS_ENV)