Skip to content

Instantly share code, notes, and snippets.

View h4ckm03d's full-sized avatar
🚴

Moch Lutfi h4ckm03d

🚴
View GitHub Profile
@h4ckm03d
h4ckm03d / makro.md
Last active November 29, 2023 06:21
prql_makro
from employees
filter start_date > @2021-01-01
```typescript
export class ManualCreditPointDTO {
@ApiProperty({ description: 'must be string' })
@IsNotEmpty()
customerId: string;
@ApiProperty({ description: 'must be string' })
eventId: string;
@ApiProperty({ description: 'must be string' })
@h4ckm03d
h4ckm03d / interview
Last active January 17, 2023 09:03
interview
Zeals
- STAR
- Prepare 3 questions
- q: Why do you want to work for X company?
s:
t:
a:
r:
- q: Why do you want to leave your current/last company?
@h4ckm03d
h4ckm03d / continuous-aggregate.md
Last active December 4, 2022 11:13
PostgreSQL Mastery
CREATE TABLE
  transactions (
    id BIGSERIAL NOT NULL,
    datetime TIMESTAMPTZ NOT NULL,
    amount numeric(6, 2) NOT NULL,
    PRIMARY KEY(wallet, datetime)
  );

SELECT
@h4ckm03d
h4ckm03d / issue.md
Created October 3, 2022 08:33
Issue list

-> Graceful shutdown qore console

Background

Qore console is doing everything related to deployment and long process tasks in the background. The problem is when qore console still doing something in the background then the pods service got a termination signal or SIGTERM, it should wait for processing till done. Currently, it will shut down immediately after getting SIGTERM

Proposal

Add graceful shutdown to prevent immediate pod termination if any long process still occurs. List waiting process:

  • Clone the environment before applying deploy
  • Migration to a new environment
  • To be added more if any long process that must include.
@h4ckm03d
h4ckm03d / issue.md
Last active October 6, 2022 07:27
SDLC problem
  • get latest release log issue
test migrate qore apps
import { deployApps } from "../../src/app/infra/app_migrator";

describe("migrate", () => {
    test("returns ok", async () => {
 try {
@h4ckm03d
h4ckm03d / postgres-cheatsheet.md
Created March 24, 2022 09:56 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@h4ckm03d
h4ckm03d / rfc-template.md
Created January 24, 2022 04:08 — forked from michaelcurry/rfc-template.md
RFC Template [Markdown]

RFC Template

Feature Name: (fill me in with a unique identity, myawesomefeature)

Type: (feature, enhancement)

Start Date: (fill me in with today's date, YYYY-MM-DD)

Author: (your names)

Table "bills" {
"id" bigint [not null]
"amount" double [not null]
"discount" double [not null]
"void" boolean [not null, default: false]
"created_at" timestamp [not null]
"updated_at" timestamp [not null]
"payments_id" bigint
}