Skip to content

Instantly share code, notes, and snippets.

View dnavarrom's full-sized avatar
🎯
Focusing

Diego Navarro M dnavarrom

🎯
Focusing
View GitHub Profile
@dnavarrom
dnavarrom / Recipe-bundling-fonts-with-headless-chrome.md
Created November 10, 2023 00:55 — forked from nat-n/Recipe-bundling-fonts-with-headless-chrome.md
How to build a fontconfig bundle for adding arbitrary fonts to headless chrome independent of the OS. This is specifically useful for deploying headless chrome to AWS lambda where it is necessary to include fonts for rendering CJK (Chinese, Japanese, Korean) characters into the deployed bundle.

Building fontconfig

Start up a lambda-like docker container:

docker run -i -t -v /tmp:/var/task lambci/lambda:build /bin/bash

Install some dependencies inside the container:

yum install gperf freetype-devel libxml2-devel git libtool -y

easy_install pip

@dnavarrom
dnavarrom / Complete.md
Created October 7, 2023 23:46 — forked from kaigouthro/Pine_Script_5_Mini_Reference.md
A minimal reference to pine script v5

Pine Mini-Reference for more information

Pine Script™ Operators

The following operators are available.

Operator Description
+ Adds two operands
### Keybase proof
I hereby claim:
* I am dnavarrom on github.
* I am navd (https://keybase.io/navd) on keybase.
* I have a public key ASAIuPNs0XU1HSHFRo9VZ1BHFppD3GP25sJKmBZ0bzhDrwo
To claim this, I am signing this object:
@dnavarrom
dnavarrom / remove-all-from-docker.sh
Created February 16, 2021 01:49 — forked from beeman/remove-all-from-docker.sh
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@dnavarrom
dnavarrom / install-docker-mint20.sh
Created August 19, 2020 01:43
Install docker and docker compose en linux mint 20
#docker setup
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" | sudo tee /etc/apt/sources.list.d/docker.list
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io pigz
#execution permission
sudo usermod -aG docker $USER
#docker compose
@dnavarrom
dnavarrom / install-ruby.sh
Created August 1, 2020 16:04
Install Ruby via RVM linux Mint 20
\curl -L https://get.rvm.io | bash -s stable --ruby
source /home/diego/.rvm/scripts/rvm
rvm install current && rvm use current
@dnavarrom
dnavarrom / journalctl view logs
Created July 18, 2020 02:13
systemctl view logs for service
#no trunc, append new logs, for this boot
journalctl -u service-name.service -b --no-pager -f -l
@dnavarrom
dnavarrom / install-brotherhl1202-cups-arm.sh
Created February 24, 2020 01:43
Install ARM Driver for Brother HL-1202 (HL-1200 Series) to fix blank pages
# Instala el driver correcto para la impresora Brother HL-1202 (o cualquiera de la serie HL-1200)
# * Ademas repara el problema de impresion en pagina en blanco
# * Install arm drivers that fix blank pages on HL-1202 (or HL-1200 series)
# * Tested on orangepi zero - using Armbian_20.02.1_Orangepizero_bionic_current_5.4.20.7z and CUPS 2.2.7
#
#!/usr/bin/env bash
pushd /tmp
wget http://download.brother.com/welcome/dlf103361/brgenprintml2pdrv-4.0.0-1.armhf.deb
sudo dpkg -i brgenprintml2pdrv-*.armhf.deb
@dnavarrom
dnavarrom / install-docker.sh
Created May 25, 2019 15:01 — forked from sethbergman/install-docker.sh
Install Docker CE on Linux Mint 19
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/
#download image
git clone https://github.com/cachethq/Docker.git cachet-docker
cd cachet-docker
#run Database
docker run --name postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -d postgres:9.5
#run cachet
docker run -d --name cachet --link postgres -e DB_DRIVER=pgsql -e DB_HOST=postgres -e DB_DATABASE=postgres -e DB_USERNAME=postgres -e DB_PASSWORD=postgres -d cachethq/docker:latest