- Install qemu
brew install qemu
- Download QEMU_EFI.fd
x-select is an Alpine.js directive which provides a styled enhancement over a native <select> element.
Its main goal is to be a progressive enhancement adding no actual features to a select dropdown apart from making it more visually appealing to use (especially for select fields with multiple).
Further goals include:
| class AsyncMethodJob < ApplicationJob | |
| queue_as :default | |
| def perform(target:, method_name:, args:, queue_name: :default) | |
| self.class.queue_as(queue_name) | |
| # `target` could be either an instance or a class | |
| target = target.constantize if target.is_a?(String) # Convert class name to class object if needed | |
| target.send(method_name, *args) | |
| end | |
| end |
| defmodule Lector.Template do | |
| @moduledoc """ | |
| Defines helper functions for rendering Templates. | |
| What this allows is a naive re-implementation of how Phoenix handles views/templates. | |
| When 'using' `Lector.Template`, files sharing the same module name as the view being used get pre-compiled | |
| into named render functions. In other words, `Lector.Templates.Home` will pre-compile a `home.html.eex` file | |
| in the same folder into a function of the same name (`Lector.Templates.Home.home(assigns)`), which renders | |
| the template. |
| # spec/system/support/login_helpers.rb | |
| # See this blog post for setup guide: https://evilmartians.com/chronicles/system-of-a-test-setting-up-end-to-end-rails-testing | |
| module LoginHelpers | |
| def login_as(user) | |
| # Craft session cookie to make request authenticated (to pass even routing constraints) | |
| # Compilation of these: | |
| # - https://dev.to/nejremeslnici/migrating-selenium-system-tests-to-cuprite-42ah#faster-signin-in-tests | |
| # - https://turriate.com/articles/2011/feb/how-to-generate-signed-rails-session-cookie | |
| # - https://github.com/rails/rails/blob/43e29f0f5d54294ed61c31ddecdf76c2e1a474f7/actionpack/test/dispatch/cookies_test.rb#L350 |
| defmodule Acme.Repo do | |
| use Ecto.Repo, | |
| otp_app: :acme, | |
| adapter: Ecto.Adapters.Postgres | |
| def with_prefix(prefix) do | |
| module_atom = Module.concat([Acme, Repo, WithPrefix, Macro.camelize(prefix)]) | |
| # We could not find a better way to see if this module already existed | |
| if !Kernel.function_exported?(module_atom, :prefix, 0) do |
First install all required packages:
pkg install git-lite libtool automake autoconf curlSet up the building blocks:
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Routing\ResponseFactory; | |
| use Illuminate\Support\ServiceProvider; | |
| use Illuminate\Contracts\Support\Responsable; | |
| use Illuminate\Contracts\View\Factory as ViewFactoryContract; | |
| use Illuminate\Contracts\Routing\ResponseFactory as ResponseFactoryContract; |
Install rust
jail-app is name of jail.
$ jexec jail-app
$ pkg install curl
Download and install rustup
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh