- Catalina
- Big Sur
- Monterey
- Ventura
- Sonoma
| name: Elixir CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| env: | |
| MIX_ENV: test |
| # Step 1 | |
| def create_subscription(email, plan_id, payment_method_id) do | |
| with %User{customer_id: nil, name: name} = user <- | |
| Repo.get_by(User, email: email), | |
| {:ok, %Stripe.Customer{id: customer_id}} <- | |
| Stripe.Customer.create(%{ | |
| name: name, | |
| email: email, | |
| payment_method: payment_method_id, |
| # TODO: replace :token, :user, and :repo | |
| curl -H "Authorization: token :token" \ | |
| -H 'Accept: application/vnd.github.everest-preview+json' \ | |
| "https://api.github.com/repos/:user/:repo/dispatches" \ | |
| -d '{"event_type": "awesomeness", "client_payload": {"foo": "bar"}}' |
If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech
This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team
Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it.
All I need to do is npm i -D webpack@next, right?
+ webpack@4.0.0-beta.2
| defmodule MyApp.Web.ComponentHelpers do | |
| def component(template, assigns) do | |
| MyApp.Web.ComponentView.render(template, assigns) | |
| end | |
| def component(template, assigns, do: block) do | |
| MyApp.Web.ComponentView.render(template, Keyword.merge(assigns, [do: block])) | |
| end | |
| def c(name, assigns) do |
There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.
All other files should be in your own global gitignore file:
- Create a file called
.gitignorein your home directory and add any filepath patterns you want to ignore. - Tell git where your global gitignore file is.
Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute
.config/git/ignorefor.gitignorein your home directory, if you prefer.
| # SSL self signed localhost for rails start to finish, no red warnings. | |
| # 1) Create your private key (any password will do, we remove it below) | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |
| # (create oauth2 tokens from Google Console) | |
| client_id = "" | |
| client_secret = "" | |
| # (paste the scope of the service you want here) | |
| # e.g.: https://www.googleapis.com/auth/gan | |
| scope = "" | |
| # # your config.ru | |
| # require 'unicorn_killer' | |
| # use UnicornKiller::MaxRequests, 1000 | |
| # use UnicornKiller::Oom, 400 * 1024 | |
| module UnicornKiller | |
| module Kill | |
| def quit | |
| sec = (Time.now - @process_start).to_i | |
| warn "#{self.class} send SIGQUIT (pid: #{Process.pid})\talive: #{sec} sec" |
