Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I'm programer and I have wife 😄

Mochamad Arifin ndunks

💭
I'm programer and I have wife 😄
View GitHub Profile
View test-table.xls
<html>
<body>
<table>
<thead>
<th>Sr</th>
<th>Name</th>
<th>Location</th>
<th>Job Profile</th>
</thead>
<tbody>
@ndunks
ndunks / package.json
Last active Nov 5, 2021
Wordpress 5.8 Typescript Webpack Config - Gutenberg Blocks Development Environment
View package.json
{
"name": "wordpress-typescript-sample",
"version": "1.0.0",
"main": "build/index.js",
"scripts": {
"start": "wp-scripts start"
},
"dependencies": {
"@wordpress/blocks": "^11.1.2"
},
@ndunks
ndunks / fix-proteus-8.x-force-close.md
Created Oct 19, 2021
Fix Proteus 8.11, 8.12 Force Close when animating
View fix-proteus-8.x-force-close.md

I experienced force close when animating desing on proteus 8.11 or 8.12.

The fix is simple but weird. When installing proteus, use 'Custom Install', make Library/Data path same as Location of the program install location.

I also block proteus host:

127.0.0.1         secure.labcenter.co.uk
127.0.0.1         secure.labcenter.com
@ndunks
ndunks / vpn-route.bat
Created Sep 29, 2021
VPN Auto Route Specific IP on Windows
View vpn-route.bat
rem Open VPN Connection Properties -> Network -> Ipv4 -> Advanced -> [Uncheck] Use default gateway
rem Create Basic Task Scheduler on specific Event Log to run this cmd
rem Network Profile Operational, NetworkProfiile, eventID:10001
route ADD 192.168.4.0 MASK 255.255.255.0 192.168.5.1
@ndunks
ndunks / docker-compose.yml
Last active Sep 5, 2021
GitLab Omnibus Docker Compose with ZOHO Mail
View docker-compose.yml
version: "3"
services:
gitlab:
image: 'gitlab/gitlab-ce:latest'
restart: unless-stopped
container_name: gitlab
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlab.local'
puma['worker_processes'] = 2
View SQLi-Cheatsheet.sql
-- show all database
SELECT GROUP_CONCAT(SCHEMA_NAME) FROM information_schema.SCHEMATA
-- Show all table on current DB
SELECT GROUP_CONCAT(TABLE_NAME) FROM information_schema.TABLES where TABLE_SCHEMA = database()
-- Show all COLUMNS
SELECT GROUP_CONCAT(COLUMN_NAME) FROM information_schema.COLUMNS where TABLE_SCHEMA = database() and TABLE_NAME = ''
-- Use cast to string if fail
SELECT GROUP_CONCAT(CAST(COLUMN_NAME as CHAR)) FROM information_schema.COLUMNS where TABLE_SCHEMA = database() and TABLE_NAME = ''
View postman-snippets.js
// IF using cookie, make sure the domain was added in "Cookie" -> Whitelist Domain
// Walk cookie
const cookie = pm.cookies.jar();
cookie.getAll(pm.request.url, (v1, cookies) => {
for (let v of cookies.map()) {
if (v.name.length > 32 && v.name.match(/[0-9a-f]/i)) {
pm.request.body.urlencoded.add({
key: v.name,
value: v.value
View toped-pln-response.md

RAW Response ketika order/checkout (Status Pending)

{
    data: {
        type: 'order',
        id: 'H6442F560FDD6BD5017321F10',
        attributes: {
            client_number: '102111106111',
            error_code: '',
            error_detail: '',
View voucher.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 19 columns, instead of 4. in line 4.
id,price,name,code,description,vendor,tnc,imageURL,expiry,createdAt,updatedAt,typeVoucher,deletedAt,inquiry,merchant,merchantData,merchantDataHash,merchantDataUpdateAt,available
5,50000,"Voucher Excelso Coffee Rp 50.000",excelso-coffee-50k,Excelso Coffee kini hadir di Tokopedia dengan voucher Rp 50.000 untuk menemani waktu bersantap siang maupun malam Anda,Excelsocoff,,https://ecs7.tokopedia.net/img/banner/2018/10/15/2892668/2892668_2e7f93c6-1a26-49ad-9190-777d05fa6c6b.png,,2021-07-14 16:30:23.727949+00,2021-07-14 16:30:23.727949+00,ONLINE,,,TOKOPEDIA,,,,
25,20000,"Shell Value Voucher 20.000",shell-20k,"Shell Value Voucher 20.000",Shell,,https://ecs7.tokopedia.net/img/ANWSwT/2021/1/25/17f8a528-bcea-4702-8f2b-dc4d3d1f9ae1.png,,2021-07-14 16:30:23.753251+00,2021-07-14 16:30:23.753251+00,ONLINE,,,TOKOPEDIA,,,,
28,50000,"Rp50,000",pln-prepaid-token-50k,,Token Listrik,,"",,2021-07-14 16:30:23.756561+00,2021-07-14 16:30:23.756561+00,ONLINE,,Masukan nomor meteran,TOKOPEDIA,,,,
6,10000,Go Car Value Voucher 10k,gocar-
View cerbot-ssl.md

Manual Mode

certbot certonly --manual --preferred-challenges dns-01 --manual-public-ip-logging-ok \
-m user@gmail.com -d '*.domain'

SSL RENEW

certbot renew