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
| defmodule AppWeb.Toggle do | |
| @moduledoc false | |
| use AppWeb, :live_component | |
| attr :name, :string, required: true | |
| attr :checked, :boolean, required: true | |
| def toggle(assigns) do | |
| assigns = assign_new(assigns, :id, fn %{name: name} -> "toggle_#{name}" end) | |
| ~H|<.live_component module={__MODULE__} {assigns} />| |
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
| Mix.install([ | |
| {:bandit, ">= 1.0.0"} | |
| ]) | |
| defmodule SSE do | |
| use Plug.Builder | |
| require Logger | |
| def init(options), do: options |
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/env elixir | |
| # This is a small HTTP server that accepts requests and is designed to randomly | |
| # fail, allowing other software to be tested for robustness. | |
| Mix.install([ | |
| {:bandit, "~> 0.6.8"}, | |
| {:plug, "~> 1.14"} | |
| ]) |
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
| Mix.install([{:req, "~> 0.3.4"}]) | |
| defmodule MoveNumber do | |
| @spec move(keyword()) :: nil | |
| def move(opts) do | |
| # Validate the keyword list | |
| opts = | |
| Keyword.validate!(opts, [ | |
| :twilio_account_sid, | |
| :twilio_auth_token, |
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
| Mix.install([ | |
| {:jason, "~> 1.4"}, | |
| {:req, "~> 0.3.1"}, | |
| {:zarex, "~> 1.0"} | |
| ]) | |
| organization_id = "INSERT_ORGANIZATION_ID" | |
| email = "INSERT_EMAIL" | |
| api_token = "INSERT_API_TOKEN" |
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/env elixir | |
| [url] = System.argv() | |
| %URI{path: "/j/" <> confno} = url = URI.parse(url) | |
| url | |
| |> Map.update!(:query, fn query -> | |
| query | |
| |> URI.decode_query() | |
| |> Map.merge(%{action: "join", confno: confno}) |
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/env elixir | |
| Mix.install([ | |
| :jason, | |
| :xml_builder | |
| ]) | |
| [input] = System.argv() | |
| defmodule Helper do |
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
| <meta name="theme-color" content="#29B8FF" /> | |
| <input type="color" value="#29B8FF" id="colorPicker" /> | |
| <script> | |
| const colorPicker = document.getElementById("colorPicker") | |
| colorPicker.addEventListener("change", function() { | |
| document | |
| .querySelector("meta[name=theme-color]") | |
| .setAttribute("content", colorPicker.value) |
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
| const trackers = { | |
| "365offers.trade": "trk.365offers.trade", | |
| "Absolutesoftware-email.com": "click.absolutesoftware-email.com\\/open.aspx", | |
| "ActiveCampaign.com": "lt.php(.*)\\?l=open", | |
| "ActionKit.com": "track.sp.actionkit.com\\/q\\/", | |
| "Acoustic.com": "mkt\\d{4,5}.com/open", | |
| "Adobe.com": [ | |
| "demdex.net", | |
| "t.info.adobesystems.com", | |
| "toutapp.com", |
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 Entry::TrackerBlocking | |
| extend ActiveSupport::Concern | |
| included do | |
| has_many :blocked_trackers | |
| end | |
| email_service_blockers = { | |
| "ActiveCampaign" => /lt\.php(.*)?l\=open/, | |
| "AWeber" => "openrate.aweber.com", |
NewerOlder