Send email asynchroniously using Sidekiq.
Create your mailer us usual:
| // | |
| // UIScrollViewWrapper.swift | |
| // lingq-5 | |
| // | |
| // Created by Timothy Costa on 2019/07/05. | |
| // Copyright © 2019 timothycosta.com. All rights reserved. | |
| // | |
| import SwiftUI |
| // listening for current item change | |
| self.audioQueueObserver = self.playerQueue?.observe(\.currentItem, options: [.new]) { | |
| [weak self] (player, _) in | |
| print("media item changed...") | |
| } | |
| // listening for current item status change | |
| self.audioQueueStatusObserver = self.playerQueue?.currentItem?.observe(\.status, options: [.new, .old], changeHandler: { | |
| (playerItem, change) in | |
| if playerItem.status == .readyToPlay { |
| http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query | |
| http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails | |
| #payload: [{"kind"=>"person"}] | |
| Segment.where("payload @> ?", [{kind: "person"}].to_json) | |
| #data: {"interest"=>["music", "movies", "programming"]} | |
| Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json) | |
| Segment.where("data #>> '{interest, 1}' = 'movies' ") | |
| Segment.where("jsonb_array_length(data->'interest') > 1") |
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <title>GoogleMap</title> | |
| <meta charset="utf-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <style> |
| function trimSvgWhitespace() { | |
| // get all SVG objects in the DOM | |
| var svgs = document.getElementsByTagName("svg"); | |
| // go through each one and add a viewbox that ensures all children are visible | |
| for (var i=0, l=svgs.length; i<l; i++) { | |
| var svg = svgs[i], | |
| box = svg.getBBox(), // <- get the visual boundary required to view all children |
| let styles: [UIFont.TextStyle] = [ | |
| // iOS 17 | |
| .extraLargeTitle, .extraLargeTitle2, | |
| // iOS 11 | |
| .largeTitle, | |
| // iOS 9 | |
| .title1, .title2, .title3, .callout, | |
| // iOS 7 | |
| .headline, .subheadline, .body, .footnote, .caption1, .caption2, | |
| ] |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)