Skip to content

Instantly share code, notes, and snippets.

View papplo's full-sized avatar
💭
Working from 127.0.0.1

Pablo Anttila papplo

💭
Working from 127.0.0.1
View GitHub Profile
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u devops-papplo --hp /home/devops-papplo
@papplo
papplo / node-pm2-nginx.md
Last active September 25, 2022 01:19
pm2-node

Prerequisites

This guide assumes that you have the following:

An Ubuntu 22.04 server setup, as described in the initial server setup guide for Ubuntu 22.04. You should have a non-root user with sudo privileges and an active firewall. A domain name pointed at your server’s public IP. This tutorial will use the domain name example.com throughout. Nginx installed, as covered in How To Install Nginx on Ubuntu 22.04. Nginx configured with SSL using Let’s Encrypt certificates. How To Secure Nginx with Let’s Encrypt on Ubuntu 22.04 will walk you through the process. Node.js installed on your server. How To Install Node.js on Ubuntu 22.04 When you’ve completed the prerequisites, you will have a server serving your domain’s default placeholder page at https://example.com/.

@papplo
papplo / pp.md
Last active September 24, 2022 22:06
Get: Planning Poker

Planning poker är en teknik inom systemutveckling för att genomföra tidsuppskattningar. Tekniken används företrädesvis inom agil systemutveckling, till exempel scrum och extrem programmering.

I Planning poker gör deltagare i en grupp individuella tidsuppskattningar under tystnad genom att använda "spelkort" med förangivna siffror. Därefter diskuterar gruppen de tidsuppskattningar som är mest avvikande.

Uppskattningen görs av alla i en utvecklingsgrupp, exempelvis utvecklare, testare och användare. Tanken med metoden är att gruppens resultat blir bättre än individernas tack vare de synergieffekter som uppstår när gruppen resonerar och driver på varandra mot resultat.

Tekniken börjar med att en person beskriver ett krav för en grupp och efter en stunds diskussioner uppskattar varje deltagare hur lång tid kravet tar att realisera. Varje deltagare gör tidsuppskattningen genom att välja det kort ur sin kortlek som bäst stämmer in på den uppskattade tiden. På korten står siffror som motsvarar hur lång tid utveck

@papplo
papplo / daily.md
Last active September 24, 2022 22:08
Read on 25/9

Read on 25/9

  • Widgy app for iOS, customizable widgets for everyone, by everyone. Winamp is back!
  • Gist editor, want to Share code Snippets off my laptop
  • Following Vitaly Friedman on LinkedIn for some quality editorial curation on current advancements in the digital field.
  • Gum road has a great ui, need to copy for an assignment I have.

Follow up on Corro.cl, do some basic architectural assumptions on how to get the site up and running

@papplo
papplo / ssh-key-generation.md
Created July 8, 2022 20:25 — forked from cybersamx/ssh-key-generation.md
Generate a new SSH key pair

Mac and Linux

  • Open Terminal

  • Check if you already have a SSH keypair generated. Do the following:

    $ ls -la ~/.ssh/id_rsa*
    

If the files exist, you already have SSH installed. IMPORTANT: But if you wish to regenerate the SSH key pair, at least back up your old SSH keys.

Prelude

So im taking on a role at my current job as a developer with shared responsibilities for onboarding and coaching new members in our developer teams. I will need to take on more and learning and teaching as a part of my role, thus i need to brush up on some basics, as well as getting accustomed to do research on general topics and more specific themes in the current field of web development. This is why i recently started documenting my findings on web technology topics. In short form, stored as gist md-documents.

TIL: WebApi's pt1: A-Frame

Today-I-Learned was inspired by fellow developers who write and share their thoughts on teir respective work experience. *Tatiana Mac

@papplo
papplo / The Virtual Dom.md
Last active June 6, 2024 10:01
Virtual DOM

The Virtual DOM

The Virtual DOM is a light-weight abstraction of the DOM. You can think of it as a copy of the DOM, that can be updated without affecting the actual DOM. It has all the same properties as the real DOM object, but doesn’t have the ability to write to the screen like the real DOM. The virtual DOM gains it’s speed and efficiency from the fact that it’s lightweight. In fact, a new virtual DOM is created after every re-render.

Originially from Medium/devinder

How does React update the dom?

Grokking the term reconciliation and DOM rendering, you have to keep in mind that the virtual tree and the actual Dom tree are separate entities, living side by side.

  • On the first load, ReactDOM.render() will create the Virtual DOM tree and real DOM tree.
  • As React works on Observable patterns, when any event(like key press, left click, api response, etc.) occurred, Virtual DOM tree nodes are notified for props change, If the
@papplo
papplo / Loading_performance_overview.md
Created January 20, 2022 12:48
Google Web Fundamentals

Originally from developers.google.com

Performance in Loading, according to Google

This document set contains explanations, examples, and recommendations that focus on low-effort, high-return performance wins. The content is progressive, not cumulative; that is, you don't have to use all of the proposed techniques, nor do you have to use them in any particular order. But the more of them you can apply to your web pages, the better those pages will perform.

Text content

@papplo
papplo / Critical_rendering_path.md
Last active September 10, 2024 12:33
Critical Rendering Path: MDN Docs

(Originally from Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/Performance/Critical_rendering_path)

The Critical Rendering Path is the sequence of steps the browser goes through to convert the HTML, CSS, and JavaScript into pixels on the screen. Optimizing the critical render path improves render performance.The critical rendering path includes the Document Object Model (DOM), CSS Object Model (CSSOM), render tree and layout.

The document object model is created as the HTML is parsed. The HTML may request JavaScript, which may, in turn, alter the DOM. The HTML includes or makes requests for styles, which in turn builds the CSS object model. The browser engine combines the two to create the Render Tree. Layout determines the size and location of everything on the page. Once layout is determined, pixels

@papplo
papplo / vortextab75.md
Created December 21, 2021 08:04 — forked from herpiko/vortextab75.md
Vortex Tab 75 Programming

Programming

  • Plug in the cable, you need the LED to guide you
  • Pn + Left Ctrl to enter programming mode
  • Press the key that want to be programmed
  • Press the target key
  • Pn to apply
  • Pn + Left Ctrl to exit

It's possible to lose a key. Sometimes you need to backup it first.