Mix.install(
[
{:kino_bumblebee, "~> 0.1.3"},
{:exla, "~> 0.4.1"}
],
config: [nx: [default_backend: EXLA.Backend]]
)
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
| @default_timeout 100 | |
| @check_interval 10 | |
| # Test Helpers | |
| defp wait_for(fun, timeout \\ @default_timeout) do | |
| start_time = System.monotonic_time(:millisecond) | |
| ref = make_ref() | |
| try 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
| 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
| Application.put_env(:sample, PhoenixDemo.Endpoint, | |
| http: [ip: {127, 0, 0, 1}, port: 8080], | |
| server: true, | |
| live_view: [signing_salt: "bumblebee"], | |
| secret_key_base: String.duplicate("b", 64), | |
| pubsub_server: PhoenixDemo.PubSub | |
| ) | |
| Mix.install([ | |
| {:plug_cowboy, "~> 2.6"}, |
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
| defmodule SqlParser do | |
| def run() do | |
| input = "select col1 from ( | |
| select col2, col3 from ( | |
| select col4, col5, col6 from some_table | |
| ) | |
| ) | |
| " | |
| IO.puts("input: #{inspect(input)}\n") | |
| IO.inspect(parse(input)) |
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 Mix.Tasks.NTest do | |
| use Mix.Task | |
| @wildcard "apps/*/test/**/*_test.exs" | |
| def run([i, n | args]) do | |
| {i, _} = Integer.parse(i) | |
| {n, _} = Integer.parse(n) | |
| test_paths = |
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
| # This file contains the configuration for Credo and you are probably reading | |
| # this after creating it with `mix credo.gen.config`. | |
| # | |
| # If you find anything wrong or unclear in this file, please report an | |
| # issue on GitHub: https://github.com/rrrene/credo/issues | |
| # | |
| %{ | |
| # | |
| # You can have as many configs as you like in the `configs:` field. | |
| configs: [ |
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
| git log --author="Linus Torvalds" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }' | |
I largely followed Florin's blog post, but have a few notes to add regarding issues I encountered:
- I used a YubiKey 4, while the blog describes using a YubiKey NEO. I'm sure a YubiKey 5 would also work. I'm also running macOS 10.13.6.
- I installed GPGTools as recommended. However, as I'll note later, it seems that
gpg-agentonly automatically starts when gpg is used; for ssh, you'll need to ensure it's running. - Before generating your keys, decide what key size you want to use. If you run the
listcommand insidegpg --edit-card, look for theKey attributesline to see what is currently selected. On my YubiKey 4, it defaulted to 2048 bits for all keys:
Key attributes ...: rsa2048 rsa2048 rsa2048
NewerOlder