Skip to content

Instantly share code, notes, and snippets.

View exonomyapp's full-sized avatar
💭
Decentralizing Life

Exonomy App exonomyapp

💭
Decentralizing Life
View GitHub Profile
@exonomyapp
exonomyapp / Coolify PostgreSQL.md
Created September 20, 2024 13:09
Coolify PostgreSQL

How to launch a PostgreSQL service using Coolify 3.x, ensure that we secure the server, harden the PostgreSQL instance, and perform necessary administrative tasks at the Ubuntu 24.04 VPS layer.

Step-by-Step Instructions for Launching PostgreSQL on Coolify 3.x

1. Log in to Coolify

First, we log into the Coolify 3.x dashboard using our credentials.

2. Create a New Service

  • From the sidebar, we navigate to "Services" and click "Add new service".
  • We select PostgreSQL from the list of available services.
@exonomyapp
exonomyapp / Nuxt3 Settings and Preferences with Pinia.md
Created September 17, 2024 14:27
Nuxt3 Settings and Preferences with Pinia

Here’s how we can implement the "Settings" architecture using Pinia following the Nuxt3 approach:

1. Set Up Pinia in Nuxt3

First, make sure Pinia is installed and integrated into our Nuxt3 app:

  • Install Pinia:
    npm install pinia

There are several directives in nuxt.config.ts that you can use to explicitly tell Nuxt3 that your app is client-side only and does not need backend functions. Here are a few key ones:

1. Disable Server-Side Rendering (SSR):

Since our app is purely client-side and P2P, we should disable SSR entirely to avoid any server-side rendering behavior.

export default defineNuxtConfig({
  ssr: false,  // Disable server-side rendering
})
@exonomyapp
exonomyapp / Agile, Scrum, and Sprints.md
Last active September 9, 2024 16:30
This gist briefly introduces Agile, Scrum, and Sprints and then elaborates

Introduction to Agile, Scrum, and Sprint

Agile is a set of principles and practices designed to guide project management and software development in a flexible and iterative way. The core idea of Agile is to break large projects into smaller, manageable units of work, allowing teams to deliver incremental progress and receive feedback throughout the development process. This approach allows teams to adapt quickly to changes, be it in requirements or market conditions, and ultimately deliver higher-quality results.

Scrum is one of the most popular Agile frameworks used to implement Agile principles. Scrum provides a structured approach to team collaboration and product development, emphasizing teamwork, accountability, and continuous improvement. It is designed to help teams work on complex projects through time-boxed iterations called Sprints.

A Sprint is a short, defined period during which a specific set of work must be completed and made ready for review. Typically, a Sprint lasts be

Step 1: Decide on a Location for the Shared Code Folder

We will use /opt/projects as our shared folder where all code will be developed. The /opt directory is appropriate for optional software and shared resources.

Step 2: Create the Shared Folder

Let's create the directory /opt/projects where our code will be stored:

sudo mkdir /opt/projects
@exonomyapp
exonomyapp / Typing Databases.md
Created August 26, 2024 15:53
AI Commentary on How to Fully Type database.ts

Here's some AI commentary on our database.ts file to ensure that it's fully typed and follows best practices.

Analysis and Improvements:

  1. Type Annotation for db:

    • We've correctly typed the db variable as Database<sqlite3.Database, sqlite3.Statement> | null. This indicates that it can either be a Database object or null. However, to improve type safety, we could make db non-nullable once it's initialized.
  2. Environment Variables:

    • The dbPath is currently inferred as a string, which is fine, but we could explicitly type it to make our code more robust.
  3. Function Return Types:

@exonomyapp
exonomyapp / Shared VPS Projects Folder.md
Created August 24, 2024 08:42
How to set up a Shared Projects folder on our VPS

When setting up a shared projects folder for multi-user access to all the code we're developing on your VPS and where multiple users have their own accounts, we’ll want to choose a location that is accessible to all users but also secure. Here’s how we can achieve this on our Ubuntu 24.04 VPS:

Step 1: A location for the shared code folder to which users can be given access

A good place to store the shared code folder is within the /opt directory, which is typically used for optional software packages and can be a good place for shared resources.

For example, we can create the directory /opt/projects.

Step 2: Create the Shared Folder

First, create the directory where the code will be stored:

@exonomyapp
exonomyapp / Parent-child-issue-relationship.md
Created August 23, 2024 14:21
GitHub Action for Managing Parent-Child Issue Relationships

Functional Specification: GitHub Action for Managing Parent-Child Issue Relationships


Title: Automated Management of Parent-Child Issue Relationships in GitHub Projects

Version: 1.0

Author: Tamir Halperin

@exonomyapp
exonomyapp / nuxt.config.js.md
Created August 18, 2024 22:55
Configuring and using auth-next

Example Usage:

  • nuxt.config.js:
    export default {
      modules: [
        '@nuxtjs/auth-next',
        '@nuxtjs/axios',
      ],
      auth: {
@exonomyapp
exonomyapp / Global South Auth Providers.md
Last active August 18, 2024 19:10
Authentication Providers Popular in the "Global South"

Here's a list of the top 10 most popular authentication providers from China, India, Southeast Asia, Russia, and Africa, excluding the original 10 providers. Each of these platforms is tailored to its region, with unique features and conditions that set them apart, including unique aspects of their authentication flows. These unique aspects highlight the different authentication needs and challenges developers face when working with providers in these regions, particularly in managing security, localization, and integration with regional services.

1. WeChat (China)

  • Platform: Super app used for messaging, social media, payments, and more.
  • Scopes: Provides access to user profile, contacts, payments, and social data.
  • User Base: Over 1 billion active users, making it the dominant platform in China.
  • Unique Aspects:
    • Super App Functionality: WeChat is more than just social media; it’s also used for payments, shopping, and even government services.
  • **Mini