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
##### Email Opens: | |
### Event Test Endpoint: | |
https://ga-dev-tools.appspot.com/hit-builder/ | |
### Creating GA query properties: | |
Unique Member ID, Message ID, Message Network & Message Content | |
From Admin > Custom Definitions > Custom Dimension(order sensitive), create these properties as dimensions(see article https://support.google.com/analytics/answer/2709829) | |
The resultant properties with the the keys: cd1, cd2, cd3 & cd4. These will be used in the event hit. |
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
<h3>Client side IP geolocation using <a href="http://ipinfo.io">ipinfo.io</a></h3> | |
<hr/> | |
<div id="ip"></div> | |
<div id="country"></div> | |
<div id="welcome"></div> | |
<hr/>Full response: <pre id="details"></pre> | |
<div id="color-code" style="width: 300px; height: 300px;"> | |
<input type="text" name="color" id="color" class="form-control" placeholder="Enter Color Code or color name"> |
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 Comment < ApplicationRecord | |
include Trashable | |
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
source 'https://rubygems.org' | |
# Specify your gem's dependencies in thetvdb.gemspec | |
gemspec | |
gem 'nokogiri' | |
gem 'rest-client' |
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
.. | |
module SnippetDemo | |
class Application < Rails::Application | |
.. | |
config.cache_store = :redis_store, 'redis://localhost:6379/0/cache', { expires_in: 90.minutes } | |
.. | |
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
class Conversation < ActiveRecord::Base | |
belongs_to :sender, :foreign_key => :sender_id, class_name: 'User' | |
belongs_to :recipient, :foreign_key => :recipient_id, class_name: 'User' | |
has_many :messages, dependent: :destroy | |
validates_uniqueness_of :sender_id, :scope => :recipient_id | |
scope :involving, -> (user) do | |
where("conversations.sender_id =? OR conversations.recipient_id =?",user.id,user.id) |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'mechanize' | |
class Bubblews | |
@rational = Mechanize.new { |agent| | |
agent.user_agent_alias = 'Windows Mozilla' | |
} |
NewerOlder