Skip to content

Instantly share code, notes, and snippets.

@wgcvc
wgcvc / README.md
Created August 29, 2024 07:42
MacOS iTerm key mapping to quickly navigate words in the current line
@wgcvc
wgcvc / docker-host-hostname.md
Last active June 18, 2024 09:43
Docker host machine's hostname

Docker Host Machine's Hostname

  • host.docker.internal
  • docker.for.mac.localhost (MacOS only)

You can also reach the gateway using gateway.docker.internal

Source

@wgcvc
wgcvc / README.md
Created March 8, 2024 08:46
PHP Linter using PHP 8.2 CLI Alpine based Docker image
docker run -it --rm --name php-8.2-cli-alpine \
  -v "$PWD":/usr/src/app -w /usr/src/app php:8.2-cli-alpine \
  php -l admin/cronjobs/daemon.prise.product.price.calculated.php
@wgcvc
wgcvc / daemon.json
Created January 30, 2024 13:42
/etc/docker/daemon.json
{
"default-address-pools": [
{
"base": "172.240.0.0/16",
"size": 24
}
],
"dns": [
"127.0.2.2",
"127.0.2.3",
@wgcvc
wgcvc / launch.json
Created January 24, 2024 15:13
Visual Studio Code Launch Config for Golang (.vscode/launch.json)
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Go Dynamic Launch",
"type": "go",
"request": "launch",
@wgcvc
wgcvc / install-php-amqp.sh
Created October 27, 2023 12:16 — forked from wcomnisky/install-php-amqp.sh
Install PHP AMQp on MacOS
#!/bin/bash
brew search librabbitmq
brew install rabbitmq-c
pecl install amqp
# set the path to librabbitmq install prefix [autodetect] : /usr/local/Cellar/rabbitmq-c/0.10.0
# if it fails follow the following (reference: https://github.com/pdezwart/php-amqp/issues/355#issuecomment-563203121):