-
How GenAI works & hot news on Gemma
Feb 24, 2024 · 3 min read ·
This week was very hot because Google published Gemma, a smal-size LLM, and also Nvidia has a rush on stock market, with a evaluation around 2000 BILLIONS dollars. Last but not least, Mistral.ai published a service for its more advanced model, which can also run on-prem.
Read More -
Exploring Generative AI: LLama2 on MacM1 Take 1
Feb 17, 2024 · 10 min read ·
Generative artificial intelligence (GenAI) is artificial intelligence capable of generating text, images or other data using generative models, often in response to prompts.
Generative AI models learn the patterns and structure of their input training data and then generate new data that has similar characteristics. This similarity is probability-based.
At low level, these systems are based on Transformer deep-learning architecture and are called generative pre-trained transformer (GPT) first defined in 2018 (for a complete description refer to Wikipedia)
Read More -
Today I have an hard time using the @Profile directive for enable feature toggle on Spring, so I decided to write a small guide on it.
Introduction
Feature toggle is a way to write your code to be able to 'turn' on/off specific modules of your (micro) service. Because Spring Autowiring can 'discover' the right service for the right need, you can easily introduce feature toggle in an Inversion of Control engine like Spring.
I am not a super fan of feature toggle, but it helped me on more than one project. Also sometimes on production delivery you have some legal constraints (like enable a service not before a specifica date) and so a dynamic, parametrized run become a must.
Read More -
Modern computer are very very very fast. C/64 was about 1Mhz and you can hangs it just throwing a 10.000 cycle in interpreted BASIC v2 language.
Slowest computer today are clocked 3Ghz (3000Mhz!) and are super scalar: it means they can usually execute 2 or more instructions per core in parallel, and you get at least 2 cores on the tiny one (RasperryPi2 has 4 ARM cores, for instance). The sow Intel centrino has at least 2 ALU and can execute between one and two instruction in parallel (mostly arithmetic one).
Read More -
A friend of mine asked some insight on how to harden a Gitea server on Internet. Gitea is a web application for manging git repositories.
Gitea is quite compact and is less feature-rich than GitLab, but it is light and can manage issues, wiki and users.
Read More -
Bullet points:
- 1979: Unix V7 Introduced the chroot command to isolate the filesystem a process "access" to.
- Various technology was introduced up to 2006, like Virtuozzo (which patched Linux in a proprietary ways)
- 2006: Process Containers Launched by Google in 2006 was designed for limiting, accounting and isolating resource usage (CPU, memory, disk I/O, network) of a collection of processes. It was renamed “Control Groups (cgroups)” a year later and eventually merged to Linux kernel 2.6.24.
- 2008: LXC LXC (LinuX Containers) was the first, most complete implementation of Linux container manager. It was implemented in 2008 using cgroups and Linux namespaces, and it works on a single Linux kernel without requiring any patches.
- 2013: Docker Docker used LXC in its initial stages and later replaced that container manager with its own library, libcontainer. Docker offered a way to configure and manage containers, i.e a standard de-facto for this technology. As you see Docker was based on cgroups and LXC, seven-years old technologies
- On September 2014 Google published the first release of Kubernetes
- In 2015 Docker, CoreOS and others founded the Open Container Initiative's (OCI). K8s does not need docker anymore to work, but Docker traction is still strong.
References:
Read More -
I was trying to explore a way to build a client/server application in Typescript; after some failed experiments, I found something better: Next.js offer the ability to build a React application and to render server-side its dynamic components.
So you can have the best of the two words: static pre-rendered pages pushed to the browser, and server side components (for doing your overwhelming BORING queries you know :)
Read More -
Random list of very interesting projects (will be updated, guys).
I will add my own ideas/impression as soon as possible.
From simpler to more complex stuff:
- sqlite-utils is a rather useful tool for managing SQLite databases, importing structured data and manipulating them from the command line
- A simple approach to use json, virtual column and indexes to get NoSQL features on SQLite
- Full text search FTS5
- Tools from datasette ecosystem (like DogSheep)
- Litestream Litestream is a standalone streaming replication tool for SQLite. It runs as a background process and safely replicates changes incrementally to another file or S3. Litestream only communicates with SQLite through the SQLite API so it will not corrupt your database.
- Dqlite (distributed SQLite) extends SQLite across a cluster of machines, with automatic failover and high-availability to keep your application running. It uses C-Raft, an optimised Raft implementation in C, to gain high-performance transactional consensus and fault tolerance while preserving SQlite’s outstanding efficiency and tiny footprint.
- Xlite: Query Excel and Open Document spreadsheets as SQLite virtual tables A lot of tools, from plugin like Xlite to command line export tools.
- STRICT TABLES SQLite uses duck-typing and it is very "elastic" on typing. Anyway in the more recent versions you can enable a "STRICT" typing, which does not work on date types, but can help to avoid mixing integer, real and strings in the same column.... see https://www.sqlite.org/stricttables.html
-
Hosting a Git repository can be a strong need if you want to keep your projects outside the cloud providers.
Keep in mind security offered by GitHub, GitLab and Cloud providers like AWS, MS-Azure, etc are damn good (often offering 2FA, two factor authentication, for free) , so think twice before deciding to hosting your own git server. It is a good shot if you do not plan to expose it to Internet, otherwise the expertise required to secure it, it is not trivial.
Read More -
Let PiHole play nice with docker-compose
Apr 3, 2022 · 1 min read ·
When you run pihole in a docker container, it could be difficult to build images on the same docker daemon, because docker-compose cannot pass DNS request to another container during build, and normal dns resolution fixes won’t work.
I solved this issue reading this article and configuring my docker daemon to use a public DNS service:
Read More -
Abstract: Make a database which can be store historic modification is often considered a “secondary” activity, but bad design leads to databases that are difficult to optimize and often not very understandable. In this article we illustrate a simple method that respects the dictates of relational theory & is easy to understand. As a plus we will show it on SQLite, a small but powerful database system.
Read More -
Some news site still try in 2021 to disable right click and ability to copy content. These tactis are very very poor, and only block the users not interested in copying/stealing your code.
The idea is to put something like that on body tag:
<body oncopy="return false" oncut="return false" onpaste="return false" onbeforecopy="return false" ondragstart="return false" onselectstart="return false" oncontextmenu="return false">
The code to re-enable it is easy to find out:
Read More -
Bash support tcp connection out of the box :)
So you can write something like
#!/bin/bash webhost="gioorgi.com" exec 5<>/dev/tcp/$webhost/80 echo -e "GET / HTTP/1.1\\r\\nHost: $webhost\\r\\nContent-Length: 0\\r\\n\\r" >&5 # get reply: HTTP/1.1 301 Moved Permanently^M cat <&5
-
Suppose you are developing a boring Jenkins pipline (like Jenkinsfile-s) with no time at all.
You are forced to commit and then run the jenkins pipeline. Jenkins download the code from your LOCAL repository.
To avoid commit& push roundtrip you are using the simple git daemon command to expose your local repository to jenkins. So jenkins see every commit you has just done.
And you end up doing a lot of commits, full of trial and errors: you would like to “squash” them before pushing your work to your remote repository, to avoid co-worker laugh your wasted time(!)
Git can do that, but I have an hard time to find the easier way of doing it, even reading git books!
So let me explain to you:
Read More