Skip to content

Instantly share code, notes, and snippets.

View mqnoy's full-sized avatar
🏠
Working from home

imza mqnoy

🏠
Working from home
View GitHub Profile
@mqnoy
mqnoy / haproxy.cfg
Created March 27, 2025 22:57
haproxy_minio
frontend https_front
bind *:443 ssl crt /etc/haproxy/certs/minio.pem
mode http
option forwardfor
http-request add-header X-Forwarded-Proto https if { ssl_fc }
acl is_console path_beg /console
use_backend minio_console if is_console
default_backend minio_api
@mqnoy
mqnoy / Redux-Persist with Next.js 14 App Router.md
Last active August 20, 2024 00:20
Redux-Persist with Next.js 14 App Router

regarding the issue redux-persist failed to create sync storage. falling back to noop storage i found the solution for implementing redux-persist on NextJS with approuter

currently i'm using:

"next": "14.2.5",
"redux-persist": "^6.0.0",
"react-redux": "^9.1.2",
"@reduxjs/toolkit": "^2.2.6",
@mqnoy
mqnoy / setup.md
Created August 13, 2024 10:56 — forked from Yatoom/setup.md
Thinkfan configuration

Thinkfan setup

Note: I configured this thinkfan setup for my old Thinkpad w520 on Ubuntu 17.10.

1. Install necessary programs

Install lm-sensors and thinkfan.

sudo apt-get install lm-sensors thinkfan
@mqnoy
mqnoy / Dockerfile
Created August 9, 2024 23:35
NextJS 14 SSR + CSR Docker
FROM node:20-alpine AS builder
RUN npm install -g pnpm
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --prod
@mqnoy
mqnoy / httrq.go
Created June 4, 2024 04:27
http client go
package httprq
import (
"bytes"
"encoding/json"
"net/http"
"net/url"
"sync"
"time"
)
@mqnoy
mqnoy / whatsapp-web-emoji-keywords.txt
Created June 2, 2024 14:08 — forked from hkan/whatsapp-web-emoji-keywords.txt
Emoji shortcut keywords for Whatsapp Web
0⃣ 0, keycap, zero
1⃣ 1, number, one
🕜 1, 30, clock, time, one, thirty, 1:30, one-thirty
🕐 1, clock, time, one, 00, o’clock, 1:00, one o’clock
2⃣ 2, number, two
🕝 2, 30, clock, time, two, thirty, 2:30, two-thirty
🕑 2, clock, time, two, 00, o’clock, 2:00, two o’clock
3⃣ 3, keycap, three
🕞 3, 30, three, clock, time, thirty, 3:30, three-thirty
🕒 3, three, clock, time, 00, o’clock, 3:00, three o’clock
@mqnoy
mqnoy / fizzbuzz.js
Created April 21, 2024 11:49
question number one
/**
* @description function print Fizz Buzz
* @param {Number} n
* @returns {void}
*/
const fizzBuzz = (n) => {
// loop all numbers from 1 to n
for (let number = 1; number <= n; number++) {
if (number % 3 === 0 && number % 5 === 0) {
console.log(`${number} FizzBuzz`);
[18540.046541] audit: type=1400 audit(1709661905.764:31): apparmor="DENIED" operation="open" profile="mariadbd_akonadi" name="/sys/devices/system/node/" pid=3540 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[18540.084810] audit: type=1400 audit(1709661905.804:32): apparmor="DENIED" operation="open" profile="mariadbd_akonadi" name="/sys/devices/system/node/" pid=3543 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[18540.111125] audit: type=1400 audit(1709661905.832:33): apparmor="DENIED" operation="open" profile="mariadbd_akonadi" name="/sys/block/" pid=3543 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[18540.124666] audit: type=1400 audit(1709661905.844:34): apparmor="DENIED" operation="open" profile="mariadbd_akonadi" name="/sys/devices/pci0000:00/0000:00:1d.0/0000:02:00.0/nvme/nvme1/nvme1n1/queue/physical_block_size" pid=3543 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[60502.625553] perf: interrupt took too long (2518 >
@mqnoy
mqnoy / Lenovo Thinkpad X1 Extreme gen 2 - gpu passthrough.md
Last active January 7, 2024 12:26
Lenovo Thinkpad X1 Extreme gen 2 - gpu passthrough

Guide for who want to passthrough gpu to virtual machine

Setup:

  • Lenovo Thinkpad X1 Extreame gen 2
  • Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz
  • GPU:
  1. UHD Graphics 630 (igpu)
  2. GTX 1650 Mobile / Max-Q (dgpu)
  • OS
  1. Debian 12 6.1.0-12-amd64 (host)
@mqnoy
mqnoy / currencies.sql
Created November 13, 2023 19:11
currencies.sql
CREATE TABLE IF NOT EXISTS `currencies` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`country` varchar(100) DEFAULT NULL,
`currency` varchar(100) DEFAULT NULL,
`code` varchar(25) DEFAULT NULL,
`symbol` varchar(25) DEFAULT NULL,
`thousand_separator` varchar(10) DEFAULT NULL,
`decimal_separator` varchar(10) DEFAULT NULL,
PRIMARY KEY (`id`)