Skip to content

Instantly share code, notes, and snippets.

View rafaelsteil's full-sized avatar

Rafael Steil rafaelsteil

View GitHub Profile
@rafaelsteil
rafaelsteil / instructions.md
Created April 25, 2023 02:36
Self signed SSL certificate for local development

Instructions on how to generate a self signed ssl certificate and enable it on the OS level so that browsers accept it.

1. Add domains to /etc/hosts

These are the domains you plan to access over https

e.g:

127.0.0.1 local.dev
127.0.0.1 site1.local.dev
127.0.0.1 site2.local.dev
@rafaelsteil
rafaelsteil / metro+0.66.2.user.patch
Created July 26, 2022 12:34
Node packages custom patches
diff --git a/node_modules/metro/src/lib/logToConsole.js b/node_modules/metro/src/lib/logToConsole.js
index f573433..eb7479c 100644
--- a/node_modules/metro/src/lib/logToConsole.js
+++ b/node_modules/metro/src/lib/logToConsole.js
@@ -19,6 +19,8 @@ const groupStack = [];
let collapsedGuardTimer;
module.exports = (terminal, level, mode, ...data) => {
+ if (level === 'warn') return;
+

Keybase proof

I hereby claim:

  • I am rafaelsteil on github.
  • I am rafaelsteil (https://keybase.io/rafaelsteil) on keybase.
  • I have a public key ASA_WM_DJwSIhZhM00_9ZIgWS4HGFmKoL5MPLEjKAFk1aAo

To claim this, I am signing this object:

@rafaelsteil
rafaelsteil / snippet4.js
Last active January 9, 2016 15:46
Documentation blog post snippet 4
/*
Updates data in the "Resume" sheet.
@today is the Date object from the day you want to update
@key is the sheet's column value you want to update, which
is the customer's first name followed by theorder id (like "Maria7865")
@type any of "new", "renew" or "change"
*/
function updateResumeSheet(today, key, type) {
// ...
}
@rafaelsteil
rafaelsteil / snippet3.js
Created January 9, 2016 15:29
Documentation blog post snippet 3
/*
Updates data in the "Resume" sheet
*/
function updateResumeSheet(today, key, type) {
// ...
}
@rafaelsteil
rafaelsteil / snippet2.js
Last active January 9, 2016 15:47
Documentation blog post snippet 2
/*
Returns the corresponding row number of a given month in the "resume sheet"
@month: The value of new date.getMonth() for the month you want
*/
function getResumeRow(month) {
/*
16 is the row number of Jan/15 in the sheet. It was chosen because the
previous months were already processed when this code was created.
Doing this way, it is easier to determine which line corresponds
to which month, without the need of a more complex routine.
@rafaelsteil
rafaelsteil / snippet1.js
Last active January 9, 2016 15:28
Documentation blog post snippet 1
function getResumeRow(month) {
return 16 + month;
}