Skip to content

Instantly share code, notes, and snippets.

div#content div[id*="update-"] {
max-height: 120px;
overflow: hidden;
}
div#content div[id*="update-"] div > img {
display: none !important;
}
div#content div[id*="update-"]:hover {
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain chain) throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) servletRequest;
HttpServletResponse response = (HttpServletResponse) servletResponse;
OAuthSecurityContextImpl context = new OAuthSecurityContextImpl();
context.setDetails(request);
Map<String, OAuthConsumerToken> rememberedTokens = getRememberMeServices().loadRememberedTokens(request, response);
Map<String, OAuthConsumerToken> accessTokens = new TreeMap<String, OAuthConsumerToken>();
Map<String, OAuthConsumerToken> requestTokens = new TreeMap<String, OAuthConsumerToken>();
if (rememberedTokens != null) {
@darrinholst
darrinholst / markup.html
Created November 5, 2011 01:57
css bubble arrow
<div class="bubble">
<div class="bubble-arrow">
<div class="bubble-arrow-before"></div>
<div class="bubble-arrow-after"></div>
</div>
</div>
group :test, :development do
gem 'sqlite3'
gem 'rspec-rails'
gem 'turnip', :git => "https://github.com/jnicklas/turnip.git"
gem 'capybara'
gem 'database_cleaner'
gem 'guard-rspec'
gem 'guard-spork'
gem 'spork', '0.9.0.rc9'
gem 'guard-jasmine'
module SomeHelper
def text_field(object_name, method, options = {})
options[:readonly] = @readonly
super(object_name, method, options)
end
end
module M1
def fumullins
p "M1#fumullins"
end
end
module M2
def fumullins
p "M2#fumullins"
super
@darrinholst
darrinholst / README.md
Created February 16, 2012 00:57
Rails date handling

requirements

  • Rails 3.2.1
  • column stored as date
  • date entered as text
  • blank/null date allowed
  • validated on input
  • formatted for display
  • using decorator/presenter (i.e. draper)
#!/usr/bin/env ruby -w
require 'digest/md5'
def if_changed(filename)
last_digest_filename = ".#{filename.gsub('/', '_')}"
last_digest = File.read(last_digest_filename) rescue ""
current_digest = Digest::MD5.hexdigest(File.read(filename))
unless last_digest.eql? current_digest
yield
@darrinholst
darrinholst / hipchat.log
Created March 22, 2012 12:21 — forked from rocketraman/hipchat.log
HipChat jenkins plugin debug logs
Mar 21, 2012 9:05:20 PM org.apache.commons.httpclient.HttpConnection releaseConnection
FINE: Releasing connection back to connection manager.
Mar 21, 2012 9:05:20 PM org.apache.commons.httpclient.HttpConnection releaseConnection
FINEST: enter HttpConnection.releaseConnection()
Mar 21, 2012 9:05:20 PM org.apache.commons.httpclient.HttpConnection isResponseAvailable
FINEST: enter HttpConnection.isResponseAvailable()
Mar 21, 2012 9:05:20 PM org.apache.commons.httpclient.HttpMethodBase shouldCloseConnection
FINE: Should NOT close connection in response to directive: keep-alive
Mar 21, 2012 9:05:20 PM org.apache.commons.httpclient.HttpMethodBase canResponseHaveBody
FINEST: enter HttpMethodBase.canResponseHaveBody(int)
class Chef
class Resource
class Deploy < Chef::Resource
def on_start(arg=nil, &block)
arg ||= block
set_or_return(:on_start, arg, :kind_of => [Proc, String])
end
def on_complete(arg=nil, &block)
arg ||= block