Skip to content

Instantly share code, notes, and snippets.

@lazaronixon
lazaronixon / linux.json
Last active August 7, 2025 12:10
Zed Editor
{
"agent": {
"always_allow_tool_actions": true,
"inline_assistant_model": { "provider": "copilot_chat", "model": "claude-3.7-sonnet" },
"default_view": "text_thread",
"default_model": { "provider": "copilot_chat", "model": "claude-3.7-sonnet" },
},
"features": { "edit_prediction_provider": "none" },
"theme": "One Light",
"buffer_font_family": "DejaVu Sans Mono",
@huksley
huksley / mrsk.md
Last active January 12, 2024 17:24
mrsk - the missing manual

MRSK

This documentation adds important additions to the docs for mrsk deploy tool (see github.com/mrsked/mrsk)

Destination flag

You can use mrsk deploy --destination staging

This will read config/deploy.yml and config/deploy.staging.yml files, and also will read .env.staging file if it exists.

@sorentwo
sorentwo / oban_from_rails.md
Created August 22, 2022 20:02
Guide for inserting Oban jobs from Rails

Migrating background jobs to Elixir is easy with Oban because everything lives in your PostgreSQL database. Oban relies on a structured oban_jobs table as its job queue, and purposefully uses portable data structures (JSON) for serialization. That makes it enqueueing jobs into Oban simple for any language with a PostgreSQL adapter, no Oban client necessary.

As a demonstration, let's explore inserting Oban jobs from a Rails application.

To start, define a skeletal ActiveRecord model with a few conveniences for scheduling jobs:

@serradura
serradura / kind_interface.rb
Created March 9, 2022 02:30
Kind::Interface prototype
module Kind
module Interface
module State
extend self
@current = :enabled
def disable!
@current = :disabled
end
@bluzky
bluzky / datetime_parser.ex
Created December 11, 2021 16:19
Elixir datetime parser with regex
defmodule DateTimeParser do
@mapping %{
"H" => "(?<hour>\\d{2})",
"I" => "(?<hour12>\\d{2})",
"M" => "(?<minute>\\d{2})",
"S" => "(?<second>\\d{2})",
"d" => "(?<day>\\d{2})",
"m" => "(?<month>\\d{2})",
"y" => "(?<year2>\\d{2})",
"Y" => "(?<year>-?\\d{4})",
@luizdamim
luizdamim / accounts_fixtures.ex
Last active May 21, 2019 17:36
Elixir manual fixtures
# tests/support/fixtures/accounts_fixtures.ex
defmodule Nononon.TestFixtures.AccountsFixtures do
alias Nononon.Repo
alias Nononon.Accounts.{
Group,
User,
Permission,
GroupUser,
GroupPermission
@josephan
josephan / setup_tailwind_in_phoenix.md
Last active September 5, 2025 05:26
Add Tailwind CSS to an Elixir/Phoenix Project with PurgeCSS
@shadowmaru
shadowmaru / slides.md
Last active November 26, 2020 07:17
Palestras da RubyConf BR 2017
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active October 31, 2025 13:24
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux