Skip to content

Instantly share code, notes, and snippets.

View ronnycoding's full-sized avatar
🇻🇪
The only way to do great work is to love what you do.

Ronny Freites ronnycoding

🇻🇪
The only way to do great work is to love what you do.
View GitHub Profile
@ronnycoding
ronnycoding / tmux-cheat-sheet.md
Created December 31, 2021 16:19 — forked from michaellihs/tmux-cheat-sheet.md
tmux Cheat Sheet
@ronnycoding
ronnycoding / Link-usage.js
Created August 31, 2021 00:39 — forked from aweber1/Link-usage.js
Next.js custom routes with regex + Server support + Client-side routing
@ronnycoding
ronnycoding / post-merge
Created August 13, 2021 03:56 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@ronnycoding
ronnycoding / php-docker-ext
Created February 27, 2021 22:59 — forked from hoandang/php-docker-ext
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@ronnycoding
ronnycoding / vscode_shortcuts.md
Created November 28, 2020 18:53 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@ronnycoding
ronnycoding / _config.scss
Created August 21, 2020 02:56 — forked from michsch/_config.scss
Font size configuration with Sass (SCSS)
/* font size & line height in px */
$font-size-body-px: 14;
$line-height-px: 21;
/* calculate font-size (in %) and line-height (in em) */
$font-size-body: pc($font-size-body-px, 16);
$line-height: em($line-height-px, $font-size-body-px);
@ronnycoding
ronnycoding / docker_debugging.md
Created July 4, 2020 21:13 — forked from veuncent/docker_debugging.md
Debugging Django apps running in Docker using ptvsd - Visual Studio (Code)

Remote debugging in Docker (for Django apps)

In order to enable debugging for your Django app running in a Docker container, follow these steps using Visual Studio (Code):

  1. Add ptvsd to your requirements.txt file
ptvsd == 4.3.2
  1. To your launch.json, add this:
@ronnycoding
ronnycoding / graphql_test_utils.py
Created June 7, 2020 02:45 — forked from Glyphack/graphql_test_utils.py
functions to test graphql api with python
from django.contrib.auth.models import AnonymousUser
from django.test import RequestFactory
from snapshottest.django import TestCase
from graphene.test import Client
from hackernews.schema import schema
class APITestCase(TestCase):
def setUp(self):
@ronnycoding
ronnycoding / README.md
Created May 7, 2020 05:17 — forked from eunomie/README.md
How to send containers log to ELK using gelf log driver

Send docker logs to ELK through gelf log driver

There's so many way to send logs to an elk... logspout, filebeat, journalbeat, etc.

But docker has a gelf log driver and logstash a gelf input. So here we are.

Here is a docker-compose to test a full elk with a container sending logs via gelf.

@ronnycoding
ronnycoding / jwtRS256.sh
Created May 2, 2020 02:39 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub