Skip to content

Instantly share code, notes, and snippets.

View jojo89's full-sized avatar

Joseph Burtoft jojo89

View GitHub Profile
<div
class="really_simple_share_prepend_above robots-nocontent snap_nopreview">If you like this please share it with your friends!</div><div
style="min-height:33px;" class="really_simple_share really_simple_share_button robots-nocontent snap_nopreview"><div
class="really_simple_share_specificfeeds_follow" style="width:110px;"><a
href="http://www.specificfeeds.com/follow" target="_blank"><img
src="http://kidsfunreviewed.com/wp-content/plugins/really-simple-facebook-twitter-share-buttons/images/specificfeeds_follow.png" alt="Email, RSS" title="Email, RSS" /> Follow</a></div><div
class="really_simple_share_facebook_like" style="width:100px;"><iframe
src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fkidsfunreviewed.com%2Fback-school-kids-bento-lunchbox-ideas%2F&amp;layout=button_count&amp;width=100&amp;height=27&amp;locale=en_US"
scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe></div><div
class="really_simple_share_google1" s
def update
attributes = params[:client].slice(:username, :email, :password, :pinning_enabled, :engagement_enabled, :total_pins_per_day, :percent_selfie_pins)
attributes[:ip_address] = request.remote_addr
attributes[:user_agent] = request.user_agent
attributes.delete("password") if attributes[:password].blank?
@client.changing_credentials = true
if @client.require_background_task_for_update? attributes
@jojo89
jojo89 / speed.rb
Last active August 29, 2015 14:15
#fast 50000
puts Benchmark.measure { PinterestPinByUserI.find("I have fifty thousand records").categories.map{|x| x} }
#slow 50000
puts Benchmark.measure { PinterestPinByUserH.where(user_pinterest_identifier: "there are 50000 of me").map{|x| x} }
#fast 50 records
puts Benchmark.measure { PinterestPinByUserI.find("I have fifty records").categories.map{|x| x} }
#slow 50 records
puts Benchmark.measure { PinterestPinByUserH.where(user_pinterest_identifier: "there are 50 of me").map{|x| x} }