Skip to content

Instantly share code, notes, and snippets.

View rafaelfess's full-sized avatar
🐼
I may be slow to respond.

Rafael rafaelfess

🐼
I may be slow to respond.
View GitHub Profile
@rafaelfess
rafaelfess / README.md
Last active August 14, 2024 13:27
EdgeOS: Scheduled PPPoE reconnect configuration #EdgeRouter

EdgeOS: Scheduled PPPoE reconnect configuration

It will restart the PPPoE connection every day at 7a.m

The benefit to using the task-scheduler is that your commands get saved in config folder which ensures that they get copied over during firmware upgrades.

Creating the script file

cd /config/user-data && sudo mkdir scripts && sudo chown root scripts && cd scripts
@rafaelfess
rafaelfess / PIPENV_error.md
Last active April 30, 2018 02:10
Solution to PIPENV error on MacOS

SETUP:

MacOS version: 10.13.4 (High Sierra)

  • Python 3: brew install python
  • pipenv: brew install pipenv

SOLUTION:

Solved by adding the following lines to ~/.bash_profile:

@rafaelfess
rafaelfess / gist:d30c4c903d43c9454905821517227e2d
Created February 11, 2020 19:12 — forked from sandsu/gist:084e93b990a5aeb74c12
Using cedilha - ArchLinux Cinnamon
Author: Nilo Dantas - n1lo
Based on: https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/518056 - helio-valente post
How to use Cedilha on US Keyboard on ArchLinux
1) Put: English(US, internacional with dead Keys) on your system keyboard layout.
2) Editing the files:
sudo vim /usr/lib/gtk-3.0/3.0.0/immodules.cache
@rafaelfess
rafaelfess / WSL.md
Last active February 22, 2020 00:21
Setting up my personal development environment
@rafaelfess
rafaelfess / portainer-dokku.md
Created February 29, 2020 13:02 — forked from woudsma/portainer-dokku.md
TLS secured TCP exposed Docker daemon on Dokku host - setup

TLS secured TCP exposed Docker daemon on Dokku host - setup

  1. Create certificates
  2. Edit Docker options
  3. Restart Docker
  4. Copy client certificates from host
  5. (optional) Add remote endpoint in Portainer

Tested on a standard $5/mo DigitalOcean VPS running Ubuntu 16.04.


@rafaelfess
rafaelfess / linebreak.md
Created March 6, 2020 20:47
Line breaks in markdown
Hello  (<-- two spaces)
World

Hello
World


@rafaelfess
rafaelfess / elixir-resources.md
Created October 7, 2020 21:47 — forked from ZachParsons/elixir-resources.md
Elixir Resources

Falsehoods programmers believe about prices

  1. You can store a price in a floating point variable.
  2. All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
  3. All currencies are subdivided in decimal units (like dinar/fils)
  4. All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
  5. All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
  6. Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
  7. For any currency you can have a price of 1. (ZWL)
  8. Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)
@rafaelfess
rafaelfess / install_elixir.md
Created April 29, 2021 02:11 — forked from emerleite/install_elixir.md
Elixir installation guide

Elixir installation guide

Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.

The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir and you are good to go.

Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to a specific version, you will need to compile it yourself. Then kerl and exenv are your best friends.

@rafaelfess
rafaelfess / nginx.conf
Created August 15, 2021 01:26 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048