Skip to content

Instantly share code, notes, and snippets.

View sipamungkas's full-sized avatar
🍅
Js for fun

Ragil Burhanudin Pamungkas sipamungkas

🍅
Js for fun
View GitHub Profile
@sipamungkas
sipamungkas / git-commit-message.rules
Created March 30, 2025 17:50
git commit message cursor rules
Generating commit message
Now, please generate a commit message with English.
Make sure it includes an accurate and informative subject line that succinctly summarizes the key points of the changes, the response must only have commit message content and must have blank line in message template.
Below is the commit message template:
<type>(<scope>): <subject>
// blank line
<body>
@sipamungkas
sipamungkas / Nginx with Scoket io config
Last active October 24, 2023 16:17
Nginx with Scoket io config
server {
server_name my-server.com www.my-server.com;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://localhost:9000;
include proxy_params;
@sipamungkas
sipamungkas / react-native-blob-util-mock.MD
Created September 8, 2022 07:40
MOCK react native blob util package on jestSetup.ts

React native Blob Util Mock for unit test

Package Link: react-native-blob-util

mock code

jest.mock('react-native-blob-util', () => {
  return {
    __esModule: true,
 default: {
{
"description": "asdfadsfsdfasdfasdf data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAMEBI4DASIAAhEBAxEB/8QAHQAAAQUBAQEBAAAAAAAAAAAAAAEFBgcIBAMCCf/EAFsQAAEDBAIBAwIDBQQHBQIBHQECAwQABQYRBxIhCBMxIkEUMlEVIzVhcRZCgbIXGDNigoORJFWWodNSd/E0Q1dydrHwJTdTk7TB0dImNlZ0dYWVo+E4ZHOis//EABsBAQEAAwEBAQAAAAAAAAAAAAABAgQFAwYH/8QAPREAAgIBAwMDAwIEBAQEBwAAAAECEQMEEiEFEzEGIkEyUWEUcSNCgZEVFlKxM2JyoUNTosEkNXS0wtHh/9oADAMBAAIRAxEAPwDDNLSUVkYhRRRQBS0lFAFFFFAFLSUUAUUUUAUtJRQBRRRQBS0lFAFFFFAFOtv/AIHdv+R/nNNVOlv/AIHdv+R/nNANdFFFAbrvPGF05BxzgF+zcrWXDpkLGoqGg9PLVwkKU0wf+ytDXukddEdh8j5qW23llq159z/nlvsL7AxSNYmXWZDRZdmfhxJ9xSgr47AlKFfdAQr76rIfL/MNkzrFuMLTjLN1hT8HsjdvlPvJQ2DISlkBbKkLUrQLZIJCT8eKtLJvVXxlk2AZY2/juQMZtmuNwbTdnmoscQXZcZLoD4V7vfSveI8pJCUIGvFQpPrbx9bsJi893bGOrmLZdgxv9jebTpsx32JSlNp8ADqokBPyEFG/mqn9QL8jFvTrwrhtikLj2m8Wt+8T2m1EJlSlBlza/urqp5zwf
@sipamungkas
sipamungkas / FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory vue js build
Created July 18, 2021 15:08
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory vue js build
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory vue js build
you can solve the problem with
export NODE_OPTIONS="--max-old-space-size=5120" #increase to 5gb
export NODE_OPTIONS="--max-old-space-size=6144" #increase to 6gb
export NODE_OPTIONS="--max-old-space-size=7168" #increase to 7gb
export NODE_OPTIONS="--max-old-space-size=8192" #increase to 8gb
choose one of them
@sipamungkas
sipamungkas / Import_Mysql_8_Database_to_Mysql 10.md
Last active June 26, 2021 01:09
Import_Mysql_8_Database_to_Mysql 10.md

Import Mysql 8 Database to Mysql 10

if you encounter error on of this error

Unknown collation: ‘utf8mb4_unicode_520_ci’
Unknown collation: ‘utf8mb4_0900_ai_ci’
@sipamungkas
sipamungkas / How_to_Install_KVM_on_Ubuntu 18.04_plus.md
Last active May 5, 2021 22:55
How To install KVM on ubuntu 18.03+, in case you have some problem, I hope my private note can help you.

How To install KVM on ubuntu 18.04+

I've Try this on my ubuntu 21.04

Install Cpu checker

$ sudo apt-get install cpu-checker
@sipamungkas
sipamungkas / How_To_Install_Open_JDK_on_Ubuntu_2x.xx.md
Last active May 4, 2021 22:41
Install Open JDK in Ubuntu 21.x

How to install Open JDK 8 on Ubuntu 21.04

It's specific tutorial for ubuntu 21.04, but I think you can use this step for ubuntu 18 and 20

Run this command on your favorite terminal

$ sudo add-apt-repository ppa:openjdk-r/ppa
$ sudo apt update
$ sudo apt install openjdk-8-jdk
@sipamungkas
sipamungkas / default nginx configuration file
Created May 2, 2021 18:25 — forked from skbr1234/default nginx configuration file
The default nginx configuration file inside /etc/nginx/sites-available/default
## Personal note: Muslims are not terrorists and I humbly request my engineering community to help end racism.
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@sipamungkas
sipamungkas / node_nginx_ssl.md
Created February 5, 2021 14:19 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user