flowchart TD
A(Do you want to `malloc`?) -->| yes |Zig
A(Do you want to `malloc`?) -->| No |Rust
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
| ;; ── Per-perspective state files for Emacs daemon mode ────────────── | |
| ;; Requires: perspective, eglot | |
| ;; | |
| ;; Saves each perspective as var/perspectives/<name>.el. | |
| ;; Buffers open lazily — only the perspective you switch into loads files. | |
| ;; Unloaded perspectives appear dimmed in dashboard and load on click. | |
| ;; Works around perspectives not supporting daemon mode (issues #41, #194). | |
| ;; Tested on Emacs 30.2 + daemon + vtsls LSP. | |
| ;; | |
| ;; ── Key design decisions ──────────────────────────────────────────── |
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
| Type Name Plan | |
| + ├─ aws:ecs:Cluster ecs-cluster-mymail create | |
| + ├─ awsx:ecr:Repository repo-mymail create | |
| Type Name Plan | |
| + ├─ aws:ecs:Cluster ecs-cluster-mymail create | |
| + ├─ awsx:ecr:Repository repo-mymail create | |
| Type Name Plan | |
| + │ ├─ aws:ecr:Repository repo-mymail create | |
| + │ └─ aws:ecr:LifecyclePolicy repo-mymail create | |
| Type Name Plan |
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 in your tmux config | |
| bind M run-shell "source ~/.tmux/functions.sh && move_windows" | |
| # this inside ~/.tmux/functions.sh | |
| #!/bin/bash | |
| # | |
| function move_windows() { | |
| windows=$( |
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
| { | |
| "title": "swap numbers and shift+numbers", | |
| "rules": [ | |
| { | |
| "description": "swap numbers and shift+numbers", | |
| "manipulators": [ | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "1", |
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 Fheads do | |
| defp set_required(set, :built, :new), do: set | |
| defp set_required(set, :built, :submit) do | |
| type = get_field(set, :type) | |
| assoc = get_field(set, type) | |
| put_assoc(set, type, required: assoc.required) | |
| end | |
| # Re-usable outside of a changeset! :D |
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 CaseCondIf do | |
| defp set_required(set) do | |
| if !set.valid? do | |
| set | |
| else | |
| state = get_field(set, :__meta__).state | |
| IO.inspect(state) | |
| stage = set.stage | |
| # set_required(set, state, stage) | |
| case {stage, state} 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
| defmodule WordBase.Classifier.Value do | |
| @kinds [ | |
| %{string: "filter", atom: :Filter}, | |
| %{string: "word", atom: :Word} | |
| ] | |
| @types [ | |
| %{string: "bool", atom: :Bool, db_type: :boolean}, | |
| %{string: "text", atom: :Text, db_type: :string}, | |
| %{string: "datetime", atom: :Datetime, db_type: :naive_datetime} | |
| ] |
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
| # the join tables, many_to_many between: | |
| # | |
| # - categories_type(s) | |
| # - filter | |
| # | |
| # - categories_type(s) | |
| # - word | |
| # | |
| # type(s) refer to: bool, text, multi, datetime | |
| # |
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
| var nsp2 = io.of('/2'); | |
| nsp2.on('connection', socket => { | |
| socket.on('change color', (color) => { | |
| nsp2.broadcast.emit('change color', color) | |
| } | |
| var nsp3 = io.of('/3'); | |
| nsp3.on('connection', socket => { | |
| socket.on('change color', (color) => { | |
| nsp3.broadcast.emit('change color', color) |
NewerOlder