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
  • 00:49 (UTC -03:00)
View GitHub Profile
@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 / 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 / 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 / .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 / 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