The config file is stored here:
~/.config/humanlog/config.json
The only thing I really configure is formatter.themes.dark.levels.debug.foreground.html_hex_color
, which I set to #8CBBFF
:
Tip
You can view via humanlog config show
.
The config file is stored here:
~/.config/humanlog/config.json
The only thing I really configure is formatter.themes.dark.levels.debug.foreground.html_hex_color
, which I set to #8CBBFF
:
Tip
You can view via humanlog config show
.
Tip
"I think many people misunderstand the purpose of code review. The purpose of code review is not for the reviewer to find bugs, and certainly not for them to ensure that the code is bug-free. Anyone who depends on code review to find bugs is living in a fool's paradise. As everyone should know by now, it is not in general possible to find bugs by examining the code.
The primary purpose of code review is to find code that will be hard to maintain. The reviewer looks at the code and tries to understand what it is doing and how. If they can't, that means it will be hard to maintain in the future, and should be fixed now, while the original author is still familiar with it." -- https://infosec.exchange/@[email protected]/115096720467521263
The following commands will indicate if the specified file (/tmp/cache-lazy-op
) was modified more than 60 minutes ago:
find "/tmp/cache-lazy-op" -mmin +60
fd cache-lazy-op /tmp --type f --changed-before 60m
The find
command is more readily available and simpler to remember, but some people prefer more modern tools like fd
.
// https://go.dev/play/p/IwFfNFlIq_x | |
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/dromara/dongle" | |
"github.com/google/uuid" | |
) |
# Example configuration that's quite detailed in its approach. | |
# .github/dependabot.yaml | |
version: 2 | |
updates: | |
- package-ecosystem: github-actions | |
directory: "/" | |
schedule: | |
day: monday | |
interval: weekly |
terraform { | |
required_providers { | |
fastly = { | |
source = "fastly/fastly" | |
version = "7.0.0" | |
} | |
} | |
required_version = ">= 1.0" | |
} |
You can't install specific package versions using Homebrew.
If you have a version installed you can pin it:
brew pin <package>
That will prevent a brew upgrade
from updating the package.
Here is some problematic code...
func WriteJSON(l *slog.Logger, w http.ResponseWriter, r *http.Request, code int, v any) {
ctx := r.Context()
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(code)
if err := json.NewEncoder(w).Encode(v); err != nil {
l.LogAttrs(ctx, slog.LevelError, "encode_json_response", slog.Any("err", err))
// This code demonstrates how iterators work in Go. | |
// This particular example is contrived, but I wanted something simple enough to demonstrate the point. | |
package main | |
import ( | |
"fmt" | |
"iter" | |
"strings" | |
) |