This file contains 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
require 'date' | |
def remove_similar_dates(dates, delta=3) | |
dates.map!{ |date| date.strftime("%s").to_i }.sort! | |
for index_1 in (0..dates.size) do | |
item_1 = dates[index_1] | |
if item_1 != nil | |
marked = [] |
This file contains 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
# config/routes.rb | |
Rails.application.routes.draw do | |
mount ActionCable.server, at: '/cable' | |
end | |
# app/channels/chat_channel.rb | |
class ChatChannel < ApplicationCable::Channel | |
def subscribed | |
stream_from "chat_channel" | |
end |
This file contains 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
import UIKit | |
import StoreKit | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
SKStoreReviewController.requestReview() | |
} |