Skip to content

Instantly share code, notes, and snippets.

@milgroma
milgroma / facebook_like_twitter_follow_links
Last active December 22, 2015 14:39
how you can put a facebook like button and twitter follow button right in your email: copy and paste the following, insert the name of your page/account/handle in place of ours, test by sending it to another account where you can receive email like the person you're sending it to will, edit as you see fit
@milgroma
milgroma / tracking_usage
Created February 3, 2014 15:35
Are people using our tool?
def self.are_you_using_this
## get all of the users
u = User.all
## for each user, do the following thing
u.each do |u|
## get the date of user’s latest session
last_session_date = u.sessions.last ? u.sessions.last.created_at : nil