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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Fullscreen Image Viewer</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
} |
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
Source: https://github.com/zed-industries/community/issues/1526#issuecomment-1543891012 | |
{ | |
// ... | |
"language_overrides": { | |
"Elixir": { | |
"format_on_save": { | |
"external": { | |
"command": "mix", | |
"arguments": ["format", "--stdin-filename", "{buffer_path}", "-"] | |
} |
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 SupportChat do | |
import Phoenix.Component | |
alias Phoenix.LiveView.JS | |
@doc """ | |
Chat bubble at the bottom right corner. | |
""" | |
def bubble(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
/* | |
Usage of INET (Uses TSKEY environment variable) | |
... | |
if ips := inet.Wait(context.Background()); len(ips) > 0 { | |
log.Printf("connected to tailscale (ips=%v)", ips) | |
} else { | |
log.Printf("not connected to tailscale") | |
} | |
defer inet.Shutdown() |
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
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 Day3 do | |
# Since my last answer wasn't purely Nx, I'm going | |
# to try to stick to Nx as much as is possible, but | |
# we don't have string manipulation stuff so that will | |
# have to be done in Elixir | |
import Nx.Defn | |
def part1 do | |
File.read!("aoc/3.txt") | |
|> 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
##-------------------------- | |
## Terraform: Functions ## | |
##-------------------------- | |
## Open terraform console | |
terraform console | |
####################### | |
## Numeric Functions ## | |
####################### |
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
resource "aws_ecs_service" "service" { | |
name = "${var.app}" | |
cluster = "${var.cluster}" | |
# Use task revision in AWS if it is greater than task revision in tfstate | |
# Prevents rolling back revision when it has been incremented by CI | |
task_definition = "${aws_ecs_task_definition.app.family}:${data.external.task_definition.result["task_definition_revision"] > aws_ecs_task_definition.app.revision ? data.external.task_definition.result["task_definition_revision"] : aws_ecs_task_definition.app.revision }" | |
desired_count = "${var.task_count}" | |
depends_on = [ | |
"aws_ecs_task_definition.app" |
NewerOlder