4
submitted 10 months ago by bahmanm@lemmy.ml to c/programming@lemmy.ml

If you've found yourself manually crafting complex Docker images or repeatedly installing tools, I've got something for you 😁

Check out "fusions" in bdockerimg project (https://github.com/bahmanm/bdockerimg).


With fusions, you merge base images into powerful composite images.

Currently there are:

  • sdkman.bmakelib
  • quicklisp.bmakelib

Let me know what other fusions would make your Docker life easier πŸ™

9
submitted 10 months ago by bahmanm@lemmy.ml to c/programming@lemmy.ml

I've been working on a small project called bdockerimg.

It's a collection of pre-built Docker images for some less common development tools (currently bmakelib, QuickLisp, and SDKMAN).

The idea is to streamline setup, especially for CI/CD pipelines, where I found myself repeating the same Dockerfile steps a lot. Basic functionality tests are included for a bit of extra peace of mind.


πŸ‘€ Here's the repo if you're interested: https://github.com/bahmanm/bdockerimg
πŸ—£ And here's the the Matrix room: https://matrix.to/#/#bdockerimg:matrix.org


I'm curious:

  • Does this seem like something you might find useful?
  • Are there any specific tools you'd love to see as easy-to-use Docker images?

This project is still in its early stages, so any feedback or contributions are much appreciated πŸ™

7
submitted 10 months ago by bahmanm@lemmy.ml to c/vancouver@lemmy.ca

Do you know any chess clubs/programmes for a 5-7 year old in Vancouver/Richmond area?

I would preferably want to be able to look up the coach(es) online or attend one of their lessons before enrolling my kid.

PS: I know I may sound very picky, but I have witnessed first hand how a not great tutor in the early ages can ruin the enthusiasm for chess and change the future.

3
submitted 1 year ago by bahmanm@lemmy.ml to c/programming@lemmy.ml

cross-posted from: https://lemmy.ml/post/8492082

bmakelib is a collection of useful targets, recipes and variables you can use to augment your Makefiles.


I just released bmakelib v0.6.0 w/ the main highlight being the ability to define enums and validate variable values against them.


➀ Makefile:

define-enum : bmakelib.enum.define( DEPLOY-ENV/dev,staging,prod )
include define-enum

deploy : bmakelib.enum.error-unless-member( DEPLOY-ENV,ENV )
deploy :
	@echo πŸš€ Deploying to $(ENV)...

➀ Shell:

$ make ENV=local-laptop deploy
*** 'local-laptop' is not a member of enum 'DEPLOY-ENV'.  Stop.

$ make ENV=prod deploy
πŸš€ Deploying to prod...
[-] bahmanm@lemmy.ml 19 points 1 year ago

Good question!

IMO a good way to help a FOSS maintainer is to actually use the software (esp pre-release) and report bugs instead of working around them. Besides helping the project quality, I'd find it very heart-warming to receive feedback from users; it means people out there are actually not only using the software but care enough for it to take their time, report bugs and test patches.

30
submitted 1 year ago by bahmanm@lemmy.ml to c/lemmy@lemmy.ml

lemmy-synapse is a light-weight observability and monitoring stack for Lemmy servers.


Using Prometheus and Grafana, it allows the admins to visualise and query the stats of their instance. v1.0.0 comes out of the box with 3 detailed dashboards:

  • Host stats (CPU, RAM, disk, network, ...)
  • PostgreSQL stats (connections, locks, transations, queries, ...)
  • Docker stats (container CPU, RAM, disk, network, OOM signals, ...)

It runs as Docker compose cluster alongside the Lemmy cluster and does not require any changes to it in most cases. Uninstalling lemmy-synapse is as easy as tearing down its cluster and deleting its installation directory.


Got questions/feedback? Pray drop a line:

8
submitted 1 year ago by bahmanm@lemmy.ml to c/programming@lemmy.ml

cross-posted from: https://lemmy.ml/post/6863402

Fed up w/ my ad-hoc scripts to display the targets and variables in a makefile(s), I've decided to write a reusable piece of code to do that: https://github.com/bahmanm/bmakelib/issues/81


The first step toward that would be to understand the common commenting styles. So far I have identified 4 patterns in the wild which you can find below.

Are there any style guides/conventions around this topic? Any references to well-written makefiles I can get inspiration from?


A

VAR1 = foo   ## short one-liner comment
my-target:   ## short one-liner comment 
	…

B

# longer comment which 
# may span
# several lines
VAR1 = foo

## comments can be prefixed w/ more than # 
## lorem ipsum dolor
my-target: 
	…

C

#####
# a comment block which is marked w/ several #s on
# an otherwise blank line
#####
VAR1 = foo

D

#####
#>    # heading 1
#     This is a variation to have markdown comments
#     inside makefile comments.
#
#     ## It's a made-up style!  
#     I came up w/ this style and used it to document `bmakelib`.
#     For example: https://is.gd/QtiqyA (opens github)
#<
#####
VAR1 = foo
12
submitted 1 year ago by bahmanm@lemmy.ml to c/programming@lemmy.ml

cross-posted from: https://lemmy.ml/post/6856563

When writing a (GNU) Makefile, there are times when you need a particular target(s) to be run before anything else. That can be for example to check the environment, ensure variables are set or prepare a particular directory layout.

... take advantage of GNU Make's mechanism of includeing and makeing makefiles which is described in details in the manual:

14
submitted 1 year ago by bahmanm@lemmy.ml to c/programming@lemmy.ml

I just stumbled upon a collection of bash completions which can be quite handy: https://github.com/perlpunk/shell-completions

I tried mojo, cpan and pip completions in a sandbox and they worked like a charm!

The only question I've got is, has anyone ever done a security audit of the repository? Anyone has taken the time to look at the code? I could try auditing but I'm not even sure what to look for.

I feel quite wary of letting an unknown source access to my bash session and what I type.

[-] bahmanm@lemmy.ml 14 points 1 year ago

Thanks! So much for my reading skills/attention span πŸ˜‚

33
submitted 1 year ago* (last edited 1 year ago) by bahmanm@lemmy.ml to c/main@sh.itjust.works

Follow up on a previous post: [DISCUSS] Recent momentary outages


I've been working on a simple opt-in solution, primarily for Lemmy end users like me (but also helpful for admins), to easily check the status/health of their favourite instance.

🌎 lemmy-meter.info

You can find the details of the implementation in lemmy-meter github repo.


❓ @admins: would you be interested in adding your instance to lemmy-meter?

You don't need to do anything except confirming - I'll handle the rest. It should only take a few minutes for your instance to show up in lemmy-meter.

Out of the box it will send only 4 HTTP GET requests per minute to your instance. However that is totally configurable if it sounds too much or too little.


PS: I wasn't sure how to reach out to the admins short of messaging them individually.

1
submitted 1 year ago by bahmanm@lemmy.ml to c/meta@lemm.ee

cross-posted from: https://lemmy.ml/post/5719058

Follow up on a previous post: [DISCUSS] Recent momentary outages


I've been working on a simple opt-in solution, primarily for Lemmy end users like me (but also helpful for admins), to easily check the status/health of their favourite instance.

🌎 lemmy-meter.info

You can find the details of the implementation in lemmy-meter github repo.


❓ @admins: would you be interested in adding your instance to lemmy-meter?

You don't need to do anything except confirming - I'll handle the rest. It should only take a few minutes for your instance to show up in lemmy-meter.

Out of the box it will send only 4 HTTP GET requests per minute to your instance. However that is totally configurable if it sounds too much or too little.


PS: I wasn't sure how to reach out to the admins short of messaging them individually.

[-] bahmanm@lemmy.ml 10 points 1 year ago

Something that I'll definitely keep an eye on. Thanks for sharing!

11
submitted 1 year ago* (last edited 1 year ago) by bahmanm@lemmy.ml to c/lemmy_support@lemmy.ml

I'm working on lemmy-meter which is a simple observability solution for Lemmy end-users like me, to be able to check the health of a few endpoints of their favourite instance in a visually pleasing way.

πŸ‘‰ You can check out a screenshot of the pre-release landing page.


πŸ’‘ Currently, lemmy-meter sends 33 HTTP GET requests per minute to a given instance.

For a few reasons, I don't wish lemmy-meter to cause any unwanted extra load on Lemmy instances.
As such I'd like it be an opt-in solution, ie a given instance's admin(s) should decide whether they want their instance to be included in lemmy-meter's reports.

❓ Now, assuming I've got a list of instances to begin w/, what's the best way to reach out to the admins wrt lemmy-meter?


PS: The idea occurred to me after a discussion RE momentary outages.

13
submitted 1 year ago by bahmanm@lemmy.ml to c/programming@lemmy.ml

TLDR; The author argues that free-form logging is quite useless/expensive to use. They also argue that structured logging is less effective than tracing b/c of mainly the difficulty of inferring timelines and causality.


I find the arguments very plausible.

In fact I very rarely use logs produced by several services b/c most of the times they just confuse me. The only time that I heavily use logs is troubleshooting a single service and looking at its stdout (or kubectl log.)

However I have very little experience w/ tracing (I've used it in my hobby projects but, obviously, they never represent the reality of complex distributed systems.)

Have you got real world experience w/ tracing in larger systems? Care to share your take on the topic?

[-] bahmanm@lemmy.ml 15 points 1 year ago

πŸ˜†Can someone make a similar one for bluetooth devices too, pretty please?

[-] bahmanm@lemmy.ml 12 points 1 year ago

I agree w/ you RE posts looking horrible πŸ‘

Though I'd say for one-liners like this, it's mostly OK. It gets really messy when folks post more complex posts and mention and tag a bunch of times.

[-] bahmanm@lemmy.ml 11 points 1 year ago

NOTE: Today is NOT Mozilla's birthday!

Fun read nevertheless πŸ™‚

[-] bahmanm@lemmy.ml 10 points 1 year ago

Yes. I wrote down the procedure a few weeks ago which may come in handy for you as well: https://www.bahmanm.com/2023/07/firefox-profiles-quickly-replicate-your-settings.html

[-] bahmanm@lemmy.ml 10 points 1 year ago* (last edited 1 year ago)

I'd say VirtualBox is still your best bet b/c of its well-polished user interface - ie unless you plan to play games.

very laggy

Had you installed "extension pack" & "guest additions"? If not, please do! They make a world of difference.

Grab them for the version you've installed from VirtualBox downloads directory. Install Oracle_VM_VirtualBox_Extension_Pack-x.y.z.vbox-extpack on your machine and VBoxGuestAdditions_x.y.z.iso on your VM.

For example, for version 7.0.10:

HTH

[-] bahmanm@lemmy.ml 13 points 1 year ago

So I can just boost the automated post in Mastodon instead of copy-pasting everything over.

Hopefully it didn't clutter the post.

[-] bahmanm@lemmy.ml 12 points 1 year ago

Given I was recently involved in minimising the impact of Lightbend's similar move earlier this year, AFAIU it means their products will be conditionally open source. They'll be free to use for non-commercial use but you'd need to pay for anything else.

[-] bahmanm@lemmy.ml 16 points 1 year ago
[-] bahmanm@lemmy.ml 14 points 1 year ago* (last edited 1 year ago)

Hopefully they pull it off for real and it will not get bogged down by bureaucracy and red tapes.

view more: β€Ή prev next β€Ί

bahmanm

joined 2 years ago