open-menu closeme
Home
RetroComp icon
Retro Computing Articles Composition Notebooks 8bit
DevOps icon
Automation K8s Done Right
GenAI icon
Fatlama Newsletter Generative AI
Projects icon
Software Projects Arduino Misterio Esp8266 SQLite
Status
Links icon
GitHub LinkedIn
About
github linkedin rss
  • How GenAI works & hot news on Gemma

    calendar Feb 24, 2024 · 3 min read
     en featured generativeai knowledgebase  · 373 ideas macm1 macos ollama
     ·
    Share on: twitter facebook linkedin copy
    How GenAI works & hot news on Gemma

    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

    calendar Feb 17, 2024 · 10 min read
     en featured generativeai knowledgebase  · 373 ideas macm1 macos ollama
     ·
    Share on: twitter facebook linkedin copy
    Exploring Generative AI: LLama2 on MacM1 Take 1

    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
  • Feature toggle in Java Spring

    calendar Jan 24, 2024 · 5 min read
     en featured  · java spring spring-boot
     ·
    Share on: twitter facebook linkedin copy

    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
  • Healthcheck

    calendar Sep 15, 2023 · 2 min read
     devops en featured  · docker docker-compose k8s
     ·
    Share on: twitter facebook linkedin copy
    Healthcheck

    I am always amused on how complex K8s/Docker Swarm are, and how easy “plain” docker is.


    Read More
  • Latency numers every programmer should know

    calendar Aug 23, 2023 · 2 min read
     en featured knowledgebase lang retro-computing software
     ·
    Share on: twitter facebook linkedin copy
    Latency numers every programmer should know

    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
  • Gitea hardening and healthchecks.io

    calendar Mar 22, 2023 · 1 min read
     devops en featured knowledgebase unix-featured
     ·
    Share on: twitter facebook linkedin copy
    Gitea hardening and healthchecks.io

    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
  • Docker History

    calendar Dec 8, 2022 · 1 min read
     devops en featured knowledgebase  · docker history
     ·
    Share on: twitter facebook linkedin copy
    Docker History

    Bullet points:

    1. 1979: Unix V7 Introduced the chroot command to isolate the filesystem a process "access" to.
    2. Various technology was introduced up to 2006, like Virtuozzo (which patched Linux in a proprietary ways)
    3. 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.
    4. 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.
    5. 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
    6. On September 2014 Google published the first release of Kubernetes
    7. 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
  • Next.js: Give it a Try!

    calendar Jul 10, 2022 · 1 min read
     en featured knowledgebase  · reactjs
     ·
    Share on: twitter facebook linkedin copy
    Next.js: Give it a Try!

    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
  • SQLite Tool-set

    calendar Jun 20, 2022 · 2 min read
     featured knowledgebase sql
     ·
    Share on: twitter facebook linkedin copy
    SQLite Tool-set

    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:

    1. sqlite-utils is a rather useful tool for managing SQLite databases, importing structured data and manipulating them from the command line
    2. A simple approach to use json, virtual column and indexes to get NoSQL features on SQLite
    3. Full text search FTS5
    4. Tools from datasette ecosystem (like DogSheep)
    5. 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.
    6. 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.
    7. Xlite: Query Excel and Open Document spreadsheets as SQLite virtual tables A lot of tools, from plugin like Xlite to command line export tools.
    Extra feature you can find useful:
    1. 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
  • Git Servers for your very secret projects

    calendar Jun 7, 2022 · 1 min read
     devops en featured  · git nttdata
     ·
    Share on: twitter facebook linkedin copy

    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

    calendar Apr 3, 2022 · 1 min read
     devops featured knowledgebase unix-featured  · docker-compose pihole
     ·
    Share on: twitter facebook linkedin copy
    Let PiHole play nice with docker-compose

    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
  • Simple method to add historic feature to SQLite

    calendar Apr 8, 2021 · 5 min read
     en featured knowledgebase sql  · database sqlite
     ·
    Share on: twitter facebook linkedin copy
    Simple method to add historic feature to SQLite

    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
  • How to re-enable right click

    calendar Feb 21, 2021 · 1 min read
     en featured knowledgebase
     ·
    Share on: twitter facebook linkedin copy
    How to re-enable right click

    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 TCP conection feature

    calendar Jan 7, 2021 · 1 min read
     featured unix-featured  · bash unix
     ·
    Share on: twitter facebook linkedin copy

    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
    

     

  • Git History Squash for fun and profit

    calendar Dec 12, 2019 · 2 min read
     en featured knowledgebase  · git
     ·
    Share on: twitter facebook linkedin copy
    Git History Squash for fun and profit

    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
    • ««
    • «
    • 1
    • 2
    • 3
    • 4
    • 5
    • »
    • »»

Recent Posts

  • Arduino Q da far crescere
  • Postgres Take it All
  • La ruota del Destino
  • Darth Android
  • Vps Provider
  • Chat
  • RSS Readers

Latest comments

    Giovanni Giorgi

    Copyright 1999-  GIOVANNI GIORGI. All Rights Reserved

    to-top