Skip to content

Instantly share code, notes, and snippets.

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

David Flores dmouse

🏠
Working from home
View GitHub Profile
@dmouse
dmouse / .lando.yml
Created March 12, 2024 22:37
lando dev jaeger
# ...
proxy:
jaeger:
- jaeger.project.lndo.site:16686
services:
jaeger:
type: compose
app_mount: false
@dmouse
dmouse / .lando.yml
Last active March 12, 2024 22:39
lando dev meilisearch service
#...
proxy:
meilisearch:
- search.project.lndo.site:7700
services:
meilisearch:
type: compose
@dmouse
dmouse / App.php
Created September 18, 2021 02:38
How to integrate my own route system with Symfony components. (Router)
<?php
namespace Legacy;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ContainerControllerResolver;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver;
@dmouse
dmouse / docker-compose-ip.fish
Created July 8, 2016 17:52
Show the IP address within a docker-compose project
function docker-compose-ip
docker-ip (docker-compose ps | awk '{ if ($1 !~ "---------------------------------------------------------------------------" && $1 !~ "Name"){ print $1 } }') $argv;
end
@dmouse
dmouse / docker-ip.fish
Created July 8, 2016 17:51
docker-ip show the IP address and container name
function docker-ip
docker inspect --format '{{ .Name }} {{ .NetworkSettings.IPAddress }}' $argv;
end
@dmouse
dmouse / cursor.php
Last active November 20, 2015 18:19
Move cursos in PHP Command Line from Symfony Console check https://github.com/dmouse/select-helper
<?php
$sttyMode = shell_exec('stty -g');
shell_exec('stty -icanon -echo');
$stdout = fopen('php://stdout', 'w');
fwrite($stdout, " 1.- option 1" . PHP_EOL );
fwrite($stdout, " 2.- option 2" . PHP_EOL );
fwrite($stdout, " 3.- option 3" . PHP_EOL );
@dmouse
dmouse / Dockerfile
Last active June 2, 2022 20:52
Run Firefox or Google Chrome into a Docker container | based on http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/
FROM ubuntu:14.04
# Replace 1000 with your user / group id
RUN export uid=1000 gid=1000 && \
mkdir -p /home/developer && \
echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \
echo "developer:x:${uid}:" >> /etc/group && \
echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \
chmod 0440 /etc/sudoers.d/developer && \
chown ${uid}:${gid} -R /home/developer
@dmouse
dmouse / Dockerfile
Last active February 9, 2016 00:57
Drupal 8 docker-compose
FROM php:5.5-apache
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libbz2-dev \
curl \
git \
@dmouse
dmouse / config.fish
Last active August 29, 2015 14:15
My config to fish shell
function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function fish_prompt
set_color green --bold
printf '%s [at] ' (whoami)
set_color blue
printf '%s ' (hostname)