This is a fairly common question, and there isn't a One True Answer.
These are the most common techniques:
| #!/usr/bin/ruby | |
| require 'rss' | |
| # Usage | |
| # $ ./railscasts.rb http://railscasts.com/subscriptions/YOURRAILSCASTRSS/\/ | |
| # episodes.rss | |
| # OR | |
| # $ ./railscasts.rb | |
| p 'Downloading rss index' |
| # Makefile for a go project | |
| # | |
| # Author: Jon Eisen | |
| # site: joneisen.me | |
| # | |
| # Targets: | |
| # all: Builds the code | |
| # build: Builds the code | |
| # fmt: Formats the source files | |
| # clean: cleans the code |
When you read about how to create and consume a pre-signed url on this guide, everything is really easy. You get your Postman and it works like a charm in the first run.
Then you open your browser, try your usual $.ajax() and send your PUT operation, and you hit the cold iced wall of AWS error message, a simple <Code>SignatureDoesNotMatch</Code> that will steal hours from your productivity.
So here I come to save you and give you a free working example of how to upload a file directly to AWS S3 from your browser. You are wellcome :).
service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-nameservice.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefixservice.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)| defmodule MyApp.AccountLookup.Cache do | |
| @moduledoc """ | |
| Provides a cache that can be used for account lookups. This cache is backed by | |
| Cachex for local storage and pg2 for remote distribution. Keys are set to expire | |
| after 7-10 days (randomly distributed) in order to prevent stale data in our cache | |
| over a long time period. | |
| """ | |
| use Cachex.DistributedCache | |
| defmodule Commerce.Orders.MockWebsocketServer do | |
| use Plug.Router | |
| plug(:match) | |
| plug(:dispatch) | |
| match _ do | |
| send_resp(conn, 200, "Hello from plug") | |
| end |
Migrating background jobs to Elixir is easy with Oban because everything lives in your PostgreSQL
database. Oban relies on a structured oban_jobs table as its job queue, and purposefully uses
portable data structures (JSON) for serialization. That makes it enqueueing jobs into Oban
simple for any language with a PostgreSQL adapter, no Oban client necessary.
As a demonstration, let's explore inserting Oban jobs from a Rails application.
To start, define a skeletal ActiveRecord model with a few conveniences for scheduling jobs: