RSSAmplifier

Blog

Code Maven

code-maven.comRSS feed ↗500 posts

Latest posts

Curl examples

Run httpbin locally Start as: docker run --rm -p 80:80 --name httpbin kennethreitz/httpbin Then run the curl commands curl To stop the Docker container open another terminal and execute docker container stop -t0 httpbin 301 MOVED PERMANENTLY $ curl -i http://localhost/status/301 HTTP/1.1 301 MOVED PERMANENTLY Server: gunicorn/19.9.0 Date: Fri, 26 Sep 2025 10:32:08 GMT Connection: keep-alive…

VirtualBox

VirtualBox did not allow the Windows Machine to run: I asked Chat GPT: I have a Linux machine running ubuntu 2025.04. On it I have VirtualBox installed. I used to be able to run an MS Windows guest in it but not any more. It gives me the following error AMD-V is being used by another hypervisor (VERR_SVM_IN_USE). VirtualBox can't enable the AMD-V extension. Please disable the KVM kernel extension,…

Setting environment variables on the command line on Windows, Linux, macOS

Setting an environment variable on Linux and macOS can be done before we run some program. $ python -c 'import os; print(os.getenv("NAME"))' None $ NAME=Foo python -c 'import os; print(os.getenv("NAME"))' Foo On Windows we need to do it separately: In CMD: > set NAME=Foo > python -c "import os; print(os.getenv('NAME'))" Foo In PowerShell > [Environment]::SetEnvironmentVariable("NAME", "Foo",…

Vanilla Boot - Developing reusable UI components with Vanilla JavaScript with Eyal Lior

Eyal Lior on LinkedIn VanillaBoot We'll analyze the limitations of popular JavaScript frameworks, the advantages of using Vanilla JavaScript, and how Vanilla Boot offers a minimalist approach to building reusable UI components. The session will cover core concepts like direct DOM manipulation, component-based architecture, dynamic dependency loading, and full rendering control, followed by a…

Do not limit the length of the passwords!

Every once in a while I encounter a web site where the length of the password is limited. Usually to 8 characters. This is really scary. I am trying to figure out why would any developer want to limit the length of the password you use. I can think of two explanations. One is that someone thought that "it would be hard for you to remember a longer password so we limit it to 8 characters". Is this…

Programming Projects

Some simple project ideas to practice programming.

Job search manager

A system that helps keep tracking of your job search Add company, link to job ad. Maybe includ details of the job ad (title, etc) copied from the ad. List of events with the specific job post: When you saw it. When you submitted your CV. How did you submit your CV? (Via LinkedIn, via the web site of the company, via a recruiter company, etc.) When did you talk to them (with whom did you talk,…

Repeated shopping list

A shopping list application for buying in a Supermarket where we often buy the same items. In this system we will have a "master list" where we only have the types of items. Each item can be either without the amount or with the range of amounts based on our past purchases. When the user wants to start a new purchase s/he can do so either from an empty list, from the list of all the items in the…

SurrealDB

SurrealDB articles

Docker uses a lot more disk-space than docker system df reports

Docker system df can provide detailed reports on disk usage but it does not include the disk space used by the log files.

Contributing to Open Source Software: VS Code (Visual Studio Code)

Visual Studio Code is one of the most popular IDEs these days. Contributing to it would probably be cool, but also extremely difficult. Given that is a mature product with millions of users, most likely the easy issues have all been addressed. If you visit the web site the only indication as to how to contribute to it I found was a small GitHub logo at the bottom that leads to the GitHub…

Open Source Projects

How to contribute to Open Source projects? Meta::CPAN (Perl, ElasticSearch) Visual Studio Code (Electron, TypeScript)

Code Diggers

Most of the popular programming languages have open source 3rd-party libraries with library registries . In the Digger projects we try to collect data about these project and show them in a way that help the users and the potential contributors. What are the goals? Each 3rd-party registry provides some meta-data about the projects. e.g. information about the license of the project, the…

Use Docker both as regular user and as root (with or without sudo)

The problem I encountered with the solution to create a file on a mounted volume in Docker as the external user (and not as root) was that using a regular user internally made it impossible to execute commands as root. In particular it made it impossible to install packages using the package-management system of the operating system. This is not a problem during regular software development…

Creating a file on a mounted volume in Docker as the external user (and not as root)

For a long time I had this problem that I did not know how to solve: When you run Docker on a linux host, mount an external folder, all the files created in the docker will be owned by user root on the host file-system. Finally I think I understood how this works and found a solution. At least a partial solution for Ubuntu and CentOS-based images. The Problem Here is the problem again: I run…

Local development environment for the data.table R project

After the partial success with the development environment for R-yaml we tried another R package called data.table . Eventually we managed to run the tests of this too. This one actually had a lot of details in the README, but some parts were still missing, or at least were assumed to be obvious, which was not the case for us. Clone the repo git clone git@github.com:Rdatatable/data.table.git cd…

Setup local development environment for R-yaml

One of the participants in Open Source Development Course uses R for her research work. So we decided that in one of the meetings we'll try to explore how to set up local development environment for one of the R-based packages using Docker. Disclaimer: none of the participants had any experience in contributing to open source projects in R so we might have totally misunderstood how one should set…

GitHub Actions and Workflows

I feel a bit cheated. Maybe it is only I who misunderstood things, or maybe GitHub had a bit of a name-mess. For each GitHub project you can set up something they call GitHub Actions , even the link in every project is called "Actions". So if you happen to visit the source of the Code Maven web site then you'll have a link called Actions . However what you see there is actually the output of the…

Setup local development environment and run tests of PHP Twig

I believe that removing obstacles from contribution to an open source project is one of the keys to getting more contributors. Having a good description of the contribution process and the culture of the development team is crucial, so is making it easy for a new potential developer to set up the local development environment and run the tests of a project locally. It took me a while to find a PHP…

Simple command-line counter with file storage in R

I have been learning R and preparing examples for R . One of the fun small script I created is also part of the counter example series . examples/r/counter.R filename = "count.txt" count = 0 if (file.exists(filename)) { as.numeric(readLines(filename)) -> count } count <- count + 1 cat(count, end="\n") fh <- file(filename, "w") cat(count, end="\n", file = fh) close(fh) After installing R we can run…

Counter Example: Improved Vanilla JavaScript

This code is part of the counter example project. It is an impoved version of the Vanilla JavaScript counter I posted a while ago. This version was posted by Jon Randy as a reply to my post on dev.to . examples/javascript/improved-vanilla-javascript-counter.html <form> <input id="counter" type="button" value="0"> <input type="reset"> </form> <script> const form = document.forms[0] const increment…

Static Site Generator

Create a Static Site Generator. It is easy and fun.

Download charts from Google Forms on Ubuntu Linux

If you run a survey using Google forms it will create a report with the results. For questions where people need to select one or more values you will see a pie-chart showing the results. You might want to download save these charts and then use it on a web site or in a presentation. I found two options: Screenshot The first one is to create a screenshot of the chart. I just click on the Print…

Save content of clipboard to file in Ubuntu Linux

I used Google Forms for a survey and wanted to save the generated graphs. They have a "copy" button that copies the graph to the clipboard. I was not sure what is really in the clipboard and how to save it. After some search and experimenting I found this command to be working: xclip -selection clipboard -t text/html -o > out.html It saved the content of the clipboard the out.html . The format…

Counter Example: Vanilla JavaScript

This code is part of the counter example project. If you are looking for the buzz-words for this project then this is a Single Page Application implemented using HTML5 and Vanilla JavaScript. It has two buttons. One of them is a counter. Every time you click on it the value on it will increase by one. The other one is a reset button. examples/javascript/vanilla-javascript-counter.html <button…

Backup your LinkedIN data!

It's all nice to have all my data in the cloud, but I also like to back it up. In case I get locked out or who knows what happens. For example, I have a reminder every month to back up my data from LinkedIn. Primarily the list of my connections though now that I am writing this I'll also check how could I backup all my other data from LinkedIn. This backup is kept in a private git repository on…

CI for Data::Alias in Perl - including threaded perl

CPAN Digger has a never ending 3rd party Perl libraries, many without any CI configured. This time I picked the one called Data::Alias . At first I sent a "standard" configuration of GitHub Actions, but then I noticed 2 things. Some tests were dependent on some extra modules and some tests needed a threaded Perl. Apparently the one that I used in my "standard" configuration isn't. So In addition…

CI for perl5-MIME-Types

After the heavy-lifting of the previous entry in the Daily CI series this was a very easy task. Looking at CPAN Digger I saw MIME-Types . That sounded like a simple Perl module and indeed adding CI was straight forward. Pull-request Conclusion There are many projects that are low-hanging fruits where you can add GitHub Actions in a matter of minutes and get the benefits immediately.

CI using timescaledb a PostgreSQL based time series database

A couple of days ago while browsing the Ruby Digger I bumped into the timescaledb Ruby Gem . It had a .travis.yml file indicating a Travis-CI configuration, but Travis stopped providing free service to open source projects and I already found out that this file is part of the Ruby gem skeleton, so its existence now does not mean much. Not even that it ever worked. It took me quite a while and some…

Full gas in neutral - CI for prepper

full gas in neutral is phrase used in Hebrew. It is the idea that you floor the gas pedal in your car while the gear is in neutral. So you urn a lot of gas, but has no useful effect. It is used in many cases where one works really hard, but it has no (positive) impact. Like washing your car while raining or when you turn on the irrigation system while raining. I was really surprised that my…

CI for the draftjs_html Ruby Gem

It took me quite a few failed attempts on various Ruby Gems found on the Ruby Digger till I found one that passed its tests. I reported the failures for the others, but this is getting a bit frustrating. Default setup I noticed that many Ruby Gems have the same instructions to set up the development environment and to run the tests. I guess this means they used some tool to generate the skeleton…

CI for Plack-Middleware-LogAny

Today I spent about 3-4 hours on various other projects. Managed to make good progress on some really interesting ones, but could not finish the CI for either one of them. I opened GitHub Issues reporting the problems, but I still could not get either of them done. Finally I found this Perl module called Plack-Middleware-LogAny . I copied the CI file from Plack-Middleware-Greylist that I created…

GitHub Workflow for ruby-request-builder

Today, while looking at the newly fixed Ruby Digger I noticed a gem called request-builder . It had Travis-CI configured. However, Travis-CI stopped its free service a while ago. I thought I check this out. Instructions This project has instruction in its README file how to set it up locally and how to run its tests. This is awesome as it seems there are several ways to do this depending on the…

A JavaScript bug and GitHub Workflow CI for the four-pillars Ruby gem

I thought I'd like to try another Ruby Gem today and went back to the Ruby Digger . I noticed that the gems are not listed in the order they were released. I think I already noticed this earlier, but did not deal with it. Now it really bothered me. I looked at the code and as I remembered, I have sorted the entries. So how come they are not sorted on the web site. First I tried it locally. I ran…

Moving from Travis-CI to GitHub Actions for Marpa::R2

Marpa::R2 can parse any language whose grammar can be written in BNF. It used Travis-CI, but since Travis-CI discontinued its free offering for Open Source project the project was without CI. I asked the author if he would be interested in a GitHub Actions configuration. A warning during build I tried to build the module locally and run its tests locally, but I encountered some issues: First I…

CI For the Log::Any Perl module

Adding CI to Perl modules is usually quite easy as the way to install dependencies and the way to test them is almost fully standardized. True, there are 3-4 different standards, but it is quite easy to see which standard you have. As always I started at the CPAN Digger . This time found the Log-Any distribution. Pull-Request Conclusion Simple is good for work. Less exciting for the blog. Check…

CI for wp2txt Ruby project

After the success yesterday adding CI to a Ruby Gem I thought I can give another try to more Ruby Gems so I looked at the Ruby Digger . As I can see there is even less action there than on CPAN Digger for Perl . Error reports First I looked at a project called nezekan . I tried to run the tests locally, but failed. I am not sure if I was even trying to run them as the authors intended, but this…

GitHub Actions CI for the rdf-kv Ruby Gem

Finally I managed to set up CI for a Ruby Gem. ere were some errors that stopped me from doing the regular steps. A few days ago I sent a pull-request with a CI configuration to the RDF::KV module in Perl . I was not very happy with the solution, but sent the pull-request anyway. The author of the module was very responsive and soon pointed me to the step I missed, but also pointed at the Ruby…

CI for Mojo-UserAgent-Cached and Plack-Middleware-Greylist

Today I can report about two pull-requests for two web-related Perl projects. One of them is called Mojo-UserAgent-Cached and the other one is Plack-Middleware-Greylist . Mojo-UserAgent-Cached It was quite straight-forward. There were only two small issues. I had to install Module::Install before I could use the regular tools as the Makefile.PL relies on that. That's a known drawback of…

Adding CI to Perl::Efl - sometimes you need to do some extra work

Originally I wanted to do a very diverse set of CI configurations during December, but so far I was only successful on Python and Perl packages. I failed on a number of Ruby packages and I have not even really search anything else. This is partially due to the fact that I am a lot more familiar with the first two languages than with anything else and I don't have enough time for the others. At…

Be pragmatic setting up CI for the RDF::KV

Today I tried to set up CI on GitHub Actions for the RDF::KV Perl module that I found on CPAN Digger to be lacking CI. It wasn't supposed to be difficult but I encountered some issues and had to be pragmatic in the setup even if far from ideal. IMHO it is better to have a working CI that already checks part of what can be checked than to have nothing. I cloned the Git repository of the package and…

CI for Win32-Wlan Perl module

I found Win32-Wlan on CPAN Digger as a Perl package that does not have CI configured in its GitHub repository . While the indicates that this is a Windows-related thing, there are a number of packages on CPAN that are in the Win32 namespace, but also work on Linux. This one, it seems does not. It seems at least one of its dependencies, the Win32-API does not work on anything else besides Windows.…

Add GitHub Action CI to the Net-Async-Redis-XS Perl module

The preparation was hard, but once I have everything prepared configuring GitHub Actions was quite easy.

The 2022 December CI Challenge

As series of articles - one every day - to show how to configure CI for various Open Source porjects

GitHub Actions

A list of repositories with sample GitHub Action configuration

How do files really look like in the computer?

When you create a file with some text in it, you would think that that text is stored in the computer as it is. It is not. It is just numbers.

Docker course: mounting host directory

Slides Source of slides on GitHub YouTube channel LinkedIn page

Infinite scrolling and footer don&#39;t work well together (not even on DEV.to)

I like the DEV.to website, I even posted some articles there , but the infinite scrolling on some of the pages that also have a footer is driving me mad. Go to the page of this article on DEV.to and press the END button on your keyboard. It will jump to the bottom of the page where you'll see a footer with a number of links including one to Forem the platform DEV runs on. However, if you open the…

Docker course: crontab

Slides Source of slides on GitHub YouTube channel LinkedIn page

Docker course: ENTRYPOINT vs CMD

Slides Source of slides on GitHub YouTube channel LinkedIn page