Skip to content

Instantly share code, notes, and snippets.

@ghousemohamed
ghousemohamed / vigil.md
Created February 9, 2024 19:00
Things to look out for at regular intervals

Daily system & cost audit

  1. Login to AWS Cost Explorer and see last day’s cost and look for abnormalities. If some service is costing more than average.

  1. Nodegroup audits:
@ghousemohamed
ghousemohamed / issues.md
Last active February 9, 2024 18:26
Issues reported since Nov 14th, 2023

The following issues have been reported multiple number of times in #neeto-hq and #neeto-deploy channels

  1. Postgres connection issue:
Caused by:
PG::ConnectionBad: connection to server at "10.100.111.33", port 5432 failed: Connection refused (PG::ConnectionBad)
	Is the server running on that host and accepting TCP/IP connections?
@ghousemohamed
ghousemohamed / kubectl.md
Last active February 7, 2024 20:24
Throwaway scripts
  1. Get all the images that are deployed in the k8s system:
kubectl get pods --all-namespaces -o=jsonpath="{range .items[*]}{'\n'}{.metadata.namespace}:{.metadata.name}{'\n'}{'\t'}{range .spec.containers[*]}{.name}:{.image}{'\n'}{end}{end}"

We can grep for the private registry to filter all the images we are managing from our end, and migrate them easily to the new system.

  1. Get all pods belonging to a particular nodegroup
@ghousemohamed
ghousemohamed / instructions.md
Last active November 8, 2022 05:08
How to Deploy Rails Application using neetoReview

1. Create a file named Procfile in the root directory with the following content:

web:  bundle exec puma -C config/puma.rb
worker: bundle exec sidekiq -C config/sidekiq.yml
release: bundle exec rake db:migrate setup_sample_data

Please make sure you have a rake task available in the project called setup_sample_data. This rake task does not necessarily need to have any associated code in it. It can be a blank rake task, or you can choose to populate it with your own custom logic your app might require.

@ghousemohamed
ghousemohamed / email-domains-setup.md
Last active September 9, 2022 08:45
Setting up authenticated domains for email delivery

Adding SPF Record

A TXT record with the following value can be added to cloudflare or equivalent DNS provider:

value: domainname.com
content: v=spf1 include:sparkpostmail.com ~all

The above is for sparkpost. Similarly for mailgun, it will be:

@ghousemohamed
ghousemohamed / neetoauth-checklist.md
Last active October 10, 2021 18:57
neetoAuth checklist for a neeto client application
  • Integrate neeto_sso gem
  • Make sure neeto_emails is using the latest commit/version
  • Upgrade to latest version of neeto-ui/v2
  • Add App Switcher Component to the client application which uses Organizations::NeetoAppsService.new(current_user).process["neeto_apps"] as props
  • Drop organization_neeto_applications table from client application and remove associated test cases and references throughout the application
  • Verify organization enabling/disabling API is working for client application
  • Verify that favicon when updated in neetoAuth is being updated and in use in the client application as well
  • Verify if the user name and profile image urls when updated in neetoAuth is being updated and in use in the client application as well
  • Verify if User activation/deactivation is being handled properly, i.e. A concern which blocks access
  • Verify User Invitation API
@ghousemohamed
ghousemohamed / docker-setup-instructions.md
Created October 4, 2021 01:17
Updating Ruby and Node.js version for neeto applications in Docker environment

In the following PR for neeto-insights-web repository, note that the ruby version has been set to 3.0.1 and the node.js version to 16

PR: https://github.com/bigbinary/neeto-insights-web/pull/332/files

Follow the above PR to change the ruby version and node.js version for a neeto application.

To update the ruby version and node.js version to different versions, please refer https://github.com/bigbinary/docker-images repository to check the list of available images for a particular ruby version and node.js version and use the respective image.

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

require:
- rubocop-rails
AllCops:
TargetRubyVersion: 2.7
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
# to ignore them, so only the ones explicitly set in this file are enabled.
DisabledByDefault: true
Exclude:
- "**/templates/**/*"