Skip to content

Instantly share code, notes, and snippets.

@paulfermoreyes
paulfermoreyes / REACT_VERSION.md
Created March 22, 2023 14:19
React version in prod

There are several ways to get the current version of a deployed React application in the browser, but one recommended approach is to use a package called "react-scripts" which comes with Create React App, a popular React development tool.

To get the current version using react-scripts, follow these steps:

  1. Install react-scripts by running the following command in your project's root directory:
npm install react-scripts --save-dev
  1. In your React app, create a new file called version.js in the public folder.
  2. Inside the version.js file, add the following code:

DevOps Adoption Checklist

  • Make the Entire Team Understand the Software Lifecycle: Teams must understand the overall lifecycle of the application, so that they what they are required to do right now and in the future.
  • Reduce Cycle Time: Aim to minimize the time it takes to move from ideas to usable software.
  • Develop a Learning Mindset: Failures are inevitable, but it's important to learn from failures to avoid repeating them.
  • Spend Time on Building New Skills: Before moving on to new projects, allow enough time to gather the important lessons, and make sure those lessons are absorbed by your team.
  • Document Operations: Document all tools, processes, automated tasks and more with the same level of quality as your product code. Moreover, regularly review and update the documentation.
  • Automate Testing: Automate common testing tasks and integrate the tests into your build processes to ensure consistent test coverage.
@paulfermoreyes
paulfermoreyes / devops_best_practices.md
Created January 28, 2022 14:19 — forked from jpswade/devops_best_practices.md
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, at the Agile Conference in Toronto, Andrew Shafer posted an offer to moderate an ad hoc "Birds of a Feather" meeting to discuss the topic of "Agile Infrastructure". Only one person showed up to discuss the topic: Patrick Debois. Their discussions and sharing of ideas with others advanced the concept of "agile systems administration". In that same year, Debois and Shafer formed an Agile Systems Administrator group on Google, with limited success. Patrick Debois did a presentation called "Infrastructure and Operations" addressing issues around involving more of the comp

@paulfermoreyes
paulfermoreyes / bastion.md
Last active November 10, 2020 16:20
Setup Bastion host in cloud

Bastion Setup

  1. Create an instance. I have used Ubuntu 20.04 for the following steps

  2. Connect to your instance

  3. Disable short module

    awk '$5 >= 3071' /etc/ssh/moduli > /etc/ssh/moduli.tmp && mv /etc/ssh/moduli.tmp /etc/ssh/moduli`
  4. Configure /etc/ssh/sshd_config and add the following lines: