Skip to content

Instantly share code, notes, and snippets.

View JudahSan's full-sized avatar
🎯
Focusing

Judah JudahSan

🎯
Focusing
  • Ba sing se
View GitHub Profile
@JudahSan
JudahSan / README.md
Created June 28, 2024 15:47
Unix Threads in C notes

Processes and threads

  • A process represents an instance of a running program
  • Threads are individual units of execution within a process.

Process

  • A process is an active program, ie, a program that is under execution. It includes the program code, program counter, process stack, registers, etc
@JudahSan
JudahSan / Makefile
Created May 21, 2024 20:16
Error running golang backend
DATABASE_URL:=postgres://postgres:foobarbaz@localhost:5432/postgres
.PHONY: run-postgres
run-postgres:
@echo Starting postgres container
-docker run \
-e POSTGRES_PASSWORD=foobarbaz \
-v pgdata:/var/lib/postgresql/data \
-p 5432:5432 \
postgres:15.1-alpine
@JudahSan
JudahSan / README.md
Created May 16, 2024 11:23
Configure Soundcore life q30 in Ubuntu
# bluetoothctl
# scan on

then, find and copy address for your headphone

@JudahSan
JudahSan / README.md
Created May 9, 2024 12:51
LangChain

Memory Types

ConversationBufferMemory

  • This memory allows for storing of messages and then extracts the messages in a variable.

CoversationBufferWindowMemory

@JudahSan
JudahSan / README.md
Created April 2, 2024 15:41
ActiveStorage::Variant on RoR 7: vips

Problem:

  • The application crashed when attempting to resize the image to a size of 50px x 50px.
  • ActiveStorage was properly configured with the required dependencies.
def image_as_thumbnail
    image.variant(resize_to_limit: [50, 50]).processed
end
@JudahSan
JudahSan / README.md
Last active February 29, 2024 18:58
What is DynamoDB� Is it a typo? This is an into to NoSQL- DynamoDB lab

3 - Create Tables

You will create 4 tables based on JSON format. For that, you will use the DynamoDBManager.create_table method.

To make it easy to access the properties of each of the tables, create the dictionaries that have the following attributes:

  • table_name: Name of the table, composed of a course prefix and the table name.
  • kwargs: Dictionary with additional arguments used in the DynamoDBManager.create_table method.
@JudahSan
JudahSan / README.md
Created January 22, 2024 11:36
Request for Assistance: LHCI Setup Issue in GitHub Actions

Here is the link to the GitHub Actions run where the issue occurred: GitHub Actions Run Link

The specific error message is as follows:

Error: Command exited with code 127
 at ChildProcess.exitListener (/home/runner/.config/yarn/global/node_modules/@lhci/utils/src/child-process-helper.js:51:19)
@JudahSan
JudahSan / README.md
Created January 9, 2024 07:54
ARC repo setup

Africa Ruby Community(ARC) Platform

Introduction

The project aims to build a platform for African Ruby language enthusiasts to connect, share their knowledge and experience, collaborate on projects, and stay up-to-date with the latest developments in the Ruby community, whether they are seasoned developers or beginners just starting out. The platform features a variety of resources, including different chapters for different countries and cities, merchandise, and meetup information. It will also help users get information on online workshops, webinars, and meetups organized by the community, enabling them to learn from experts and network with other enthusiasts.

Project Design: https://still-snowflake-8822.animaapp.io/

Database Design: https://dbdiagram.io/d/62afab7c9921fe2a96397c1e

N.B. Please note that this project is open source, you are therefore encourage to contribute

@JudahSan
JudahSan / db.go
Last active December 23, 2023 13:28
Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work ERROR
package db
import (
"database/sql"
"fmt"
_ "github.com/mattn/go-sqlite3"
)
var DB *sql.DB
@JudahSan
JudahSan / README.md
Created December 19, 2023 17:01
PROXY REVERSE PROXY LOAD BALANCER

Proxy works on Layer 3 while Reverse Proxy works on Layer 7 aka Load Balancer (special type of RP). Proxy generally works on IP and RP works on application layer.

Proxy reroute the port and ip while RP or Load balancer reroute the paths of url example, /image, /getRequest... and so on.

Certainly! Let's break down the concepts of proxy, reverse proxy, and load balancer:

  1. Proxy Server: