Skip to content

Instantly share code, notes, and snippets.

View jimmyadaro's full-sized avatar
💬
So much going on right now!

Jimmy Adaro jimmyadaro

💬
So much going on right now!
  • Buenos Aires, Argentina
  • 04:26 (UTC -03:00)
View GitHub Profile
@jimmyadaro
jimmyadaro / README.md
Created March 22, 2025 15:01
Use npm packages inside n8n (Docker)

Use npm packages inside n8n

Their docs and forums suck to be specific about this.

Install specific packages inside the n8n Docker container and then use it in its nodes:

# Use the official n8n image as the base
FROM n8nio/n8n:1.82.4
@jimmyadaro
jimmyadaro / README.md
Created June 11, 2021 18:54
Remove "ONLY_FULL_GROUP_BY" from SQL mode in Docker MySQL

We should simply mirror a local config file to the MySQL config directory in Docker

File: ./docker-compose.local.yml (or however you name it)

services: 
  # [...]
  mysql:
      # [...]
 image: mysql:5.7
@jimmyadaro
jimmyadaro / .zshrc
Created May 20, 2021 12:16
Execute a Docker container with bash as shell (using an alias)
# I'm using .zshrc but should be valid in any sh or bash shell
alias dexec='(){docker exec -it $1 /bin/bash;}'
# Use it like this:
# dexec <container name or ID>
# dexec my_website
# dexec ea2bdf44
@jimmyadaro
jimmyadaro / custom-script-php-docker.md
Created May 19, 2021 08:27
Run custom shell script in PHP's Docker image

Run a custom shell script in PHP's Docker image

In case you need to run some custom script in the container, you may use CMD, like so:

FROM php:7.3-apache

# ...

COPY ./local/path/to/script.sh /remote/path/to/script.sh
@jimmyadaro
jimmyadaro / packages.cson
Created November 11, 2020 20:13
Packages list for Atom's "package-sync" package
packages: [
"atom-bracket-highlight"
"auto-update-packages"
"busy-signal"
"color-picker"
"emmet"
"file-icons"
"file-templates"
"highlight-line"
"highlight-selected"
@jimmyadaro
jimmyadaro / retinajs-onerror.html
Created June 28, 2020 08:35
Image with retina.js fallback "onerror"
<!-- This will include a "data-rjs" attribute on the PNG (or JPG) error fallback in case the SVG failed to load -->
<!-- See: https://github.com/strues/retinajs -->
<img src="/path/to/some.svg" onerror="this.src='/path/to/some.png'; this.data-rjs='2'; this.onerror=null;">
@jimmyadaro
jimmyadaro / .zshrc
Created June 7, 2020 22:40
OhMyZSH config file
# Remove everything from Docker system
alias dockerpurge='docker system prune --all --force --volumes'
# Man I hate DS_Store files so much...
alias rds='find . -name '.DS_Store' -type f -delete && echo ".DS_Store files removed!"'
# Open the hosts file with Atom (really useful for VirtualHosts)
alias hosts='atom /private/etc/hosts'
# Go to htdocs
@jimmyadaro
jimmyadaro / bash-concat-example.sh
Created September 16, 2019 21:27
Concat function return with string for "read -p"
# DESCRIPTION: Simple example of "read -p" and it's usage when trying to print a simple concat from a function and a user input
# Here we'll assume "$folder" comes from a previously-checked "getopts options" loop
# (given as an argument for our script/command option, like "ourscript -f MyFolderName")
##################################################################
##################################################################
##################################################################
# Print a styled "important:" text
@jimmyadaro
jimmyadaro / .bash_profile
Last active October 15, 2019 20:54
Simple config for macOS' .bash_profile (or .zshrc)
# Repeat this line as much as needed so you can access to project's SSH console asap using just the project name
alias <PROJECT_NAME>='ssh -i /Users/<USER_NAME>/.ssh/<KEY_NAME> <USER>@<HOST>'
# Remove everything from Docker system
alias dockerpurge='docker system prune --all --force --volumes'
# Man I hate DS_Store files so much...
alias rds='find . -name '.DS_Store' -type f -delete && echo ".DS_Store files removed!"'
# Open a new terminal window on the same location as the current one is
@jimmyadaro
jimmyadaro / deploy.php
Created June 6, 2019 21:51
Deployer config base
<?php
namespace Deployer;
require 'recipe/common.php';
// Project name
set('application', 'App Name');
// Project repository
set('repository', '[email protected]:repo-name/project-name.git');