Mix.install([
{:zoi, "0.8.1"},
{:req_llm, github: "agentjido/req_llm", ref: "main"},
{:kino, "~> 0.17.0"}
])
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
| # Single-file Phoenix LiveView demo showing how to batch events to reduce/control the flow of UI updates. | |
| # | |
| # Run with `elixir batcher_demo.exs`, then open a browser at http://localhost:5001/. | |
| # | |
| # For comparison, the "inc" event is batched while the "dec" event is not. | |
| # | |
| # References | |
| # | |
| # https://github.com/phoenixframework/phoenix_live_view/blob/main/.github/single-file-samples/main.exs | |
| # https://elixirforum.com/t/optimizing-liveview-for-realtime-applications-by-marlus-saraiva-elixirconf-eu-2023/59265?u=rhcarvalho |
by the time you're reading this, this probably no longer works since the policy has been removed. I reccomend you to check out https://github.com/r58Playz/uBlock-mv3 instead
- google's manifest v3 has no analouge to the
webRequestBlockingAPI, which is neccesary for (effective) adblockers to work - starting in chrome version 127, the transition to mv3 will start cutting off the use of mv2 extensions alltogether
- this will inevitably piss of enterprises when their extensions don't work, so the
ExtensionManifestV2Availabilitykey was added and will presumably stay forever after enterprises complain enough
You can use this as a regular user, which will let you keep your mv2 extensions even after they're supposed to stop working
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
| config :wps, WPSWeb.Endpoint, | |
| live_reload: [ | |
| notify: [ | |
| live_view: [ | |
| ~r"lib/wps_web/core_components.ex$", | |
| ~r"lib/wps_web/(live|components)/.*(ex|heex)$" | |
| ] | |
| ], | |
| patterns: [ | |
| ~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$", |
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([:mint, :castore]) | |
| defmodule Main do | |
| def run() do | |
| total = | |
| Stream.resource( | |
| fn -> | |
| {:ok, conn} = Mint.HTTP.connect(:https, "ftp.bit.nl", 443, mode: :passive) | |
| {:ok, conn, _ref} = Mint.HTTP.request(conn, "GET", "/speedtest/10mb.bin", [], nil) | |
| {conn, true} |
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
| # lib/party_web/components/example_component.ex | |
| defmodule PartyWeb.ExampleComponent do | |
| @moduledoc """ | |
| An example LiveComponent under test. | |
| """ | |
| use Phoenix.LiveComponent | |
| def render(assigns) do | |
| ~H""" | |
| <div> |
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
| export class DurationUnit { | |
| constructor(public readonly value: number, public readonly name: string) {} | |
| } | |
| export const nanoSecond = new DurationUnit(1, 'ns'); | |
| export const microSecond = new DurationUnit(1000 * nanoSecond.value, 'µs'); | |
| export const milliSecond = new DurationUnit(1000 * microSecond.value, 'ms'); | |
| export const second = new DurationUnit(1000 * milliSecond.value, 's'); | |
| export const minute = new DurationUnit(60 * second.value, 'm'); | |
| export const hour = new DurationUnit(60 * minute.value, 'h'); |
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
| rem to disable private dns | |
| adb shell settings put global private_dns_mode off | |
| rem to enable private dns with hostname (example with dns.adguard.com) | |
| adb shell settings put global private_dns_mode hostname | |
| adb shell settings put global private_dns_specifier dns.adguard.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
| defmodule ApiDataStructure do | |
| defmodule User do | |
| use Ecto.Schema | |
| import Ecto.Changeset | |
| alias ApiDataStructure.Profile | |
| embedded_schema do | |
| field :username, :string |
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 python | |
| import argparse | |
| import calendar | |
| import itertools as it | |
| from datetime import datetime | |
| from csv2ofx import utils | |
| from csv2ofx.mappings.default import mapping | |
| from csv2ofx.ofx import OFX |
NewerOlder