Skip to content

Instantly share code, notes, and snippets.

View xavier83ar's full-sized avatar
🏠
Working from home

Javier xavier83ar

🏠
Working from home
  • Soluciones yPunto
  • Santa Fe, Argentina
View GitHub Profile
@xavier83ar
xavier83ar / readme.md
Last active December 20, 2024 07:38
Setting up dnsmasq + NetworkManager + systemd-resolved to support wildcard domain resolution for development Ubuntu 20.04

Motivation

The goal is to have our local dns resolution resolves to localhost any host name ended by certain tld (top level domain), e.g. if we want to use *.loc as tld, then example.loc should resolve to localhost, as well as any hostname ending by .loc.

This is very convenient for local development, having the chance to use different host names resolving localhost without the need of setting them up individually.

Background

Ubuntu, as of version 20.04, uses systemd-resolved as name resolution service, and NetworkManager to handle pretty much everything related to connectivity. NetworkManager includes dnsmasq which in the past used to be enabled by default, but as now name resolution is handled by systemd-resolved, is disabled by default.

@xavier83ar
xavier83ar / ItemsController.php
Last active August 25, 2022 21:12
DataTables + CakePHP 2.x Ajax integración
<?php
// controller file
class ItemsController {
public function index()
{
// nada que hacer, solo renderizar la vista
}