Skip to content

Instantly share code, notes, and snippets.

View luqmanrom's full-sized avatar

Luqman Rom luqmanrom

View GitHub Profile
bank_id name image_url
AMBB0209 AmBank https://gate.chip-in.asia/static/images/fpx/AMBB0209.png
AGRO01 Agronet https://gate.chip-in.asia/static/images/fpx/AGRO01.png
BMMB0341 Bank Muamalat https://gate.chip-in.asia/static/images/fpx/BMMB0341.png
ABB0233 Affin Bank https://gate.chip-in.asia/static/images/fpx/ABB0233.png
DBB0199 Deutsche Bank https://gate.chip-in.asia/static/images/fpx/DBB0199.png
HLB0224 Hong Leong Bank https://gate.chip-in.asia/static/images/fpx/HLB0224.png
ABMB0212 Alliance Bank (Personal) https://gate.chip-in.asia/static/images/fpx/ABMB0212.png
BSN0601 BSN https://gate.chip-in.asia/static/images/fpx/BSN0601.png
BCBB0235 CIMB Clicks https://gate.chip-in.asia/static/images/fpx/BCBB0235.png
import signal
import time
import os
def handle_sigterm(signum, frame):
print("Received SIGTERM. Cleaning up...")
print("Cleanup done. Exiting gracefully.")
exit(0)
@luqmanrom
luqmanrom / README.md
Created September 12, 2022 03:35 — forked from anchan828/README.md
This is an improvement to allow @nestjs/[email protected] to handle CustomRepository. I won't explain it specifically, but it will help in some way. https://github.com/nestjs/typeorm/pull/1233

You need to provide some classes and decorators yourself to maintain the same style as [email protected].

1. EntityRepository -> CustomRepository

@EntityRepository(UserEntity)
export class UserRepository extends Repository<UserEntity> {}

@luqmanrom
luqmanrom / mac-setup-redis.md
Created June 18, 2021 03:40 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@luqmanrom
luqmanrom / my.cnf
Created October 23, 2019 07:36 — forked from kanibaspinar/my.cnf
Mysql My.cnf Optimization - Best Performance For 1000 + Sites Web Server
# Optimized MySQL configuration for cPanel servers by Kani Baspinar - Updated June 2016
#
# The settings provided below are a starting point for a 24GB RAM server with 8 CPU cores.
# If you have less or more resources available you MUST adjust accordingly to save CPU, RAM and disk I/O usage.
# To fine tune these settings for your system, use MySQL DB diagnostics tools like:
# Test your configuration ; https://launchpad.net/mysql-tuning-primer
# or
# http://blog.mysqltuner.com/download/
# Note that if there is NO comment beside a setting, then you don't need to adjust it.
#
@luqmanrom
luqmanrom / nginx-tuning.md
Created June 10, 2019 01:14 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@luqmanrom
luqmanrom / ffmpeg.md
Created March 4, 2019 16:21 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@luqmanrom
luqmanrom / sysctl.conf
Created January 11, 2019 10:16 — forked from kgriffs/sysctl.conf
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file. Increasing the TCP congestion
# window is particularly important.
# Protection from SYN flood attack.
net.ipv4.tcp_syncookies = 1
@luqmanrom
luqmanrom / install_postgresql9.4_postgis2.1_ubuntu.md
Last active September 30, 2018 00:43 — forked from ansell/install_postgresql9.4_postgis2.1_ubuntu.md
Installing PostgreSQL 9.4 and PostGIS on Ubuntu 14.04

Remove old PostGIS Installation

The first step is to remove older version of PostGIS if any.

sudo apt-get purge postgis

Setup repository

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
@luqmanrom
luqmanrom / Component.jsx
Created March 23, 2018 18:29 — forked from krambertech/Component.jsx
ReactJS: Input fire onChange when user stopped typing (or pressed Enter key)
import React, { Component } from 'react';
import TextField from 'components/base/TextField';
const WAIT_INTERVAL = 1000;
const ENTER_KEY = 13;
export default class TextSearch extends Component {
constructor(props) {
super();