Posts

  • Windows - membuat popup hitungan dengan command prompt

    start cmd /c "@echo off & mode con cols=60 lines=20 & echo MyApp Message & (FOR /L %A IN (1,1,1000) DO CLS & echo Please wait MyApp downloading required package .. & ECHO Timelapse : %A s & Timeout /t 1 >nul)"
  • git undo last commit

    undo last commit dengan tetap meninggalkan perubahan git reset --soft HEAD~1
  • Missing X server or $DISPLAY

    ketika snap app dijalankan muncul error seperti ini [2908:2908:0604/142258.367159:ERROR:ui/ozone/platform/x11/ozone_platform_x11.cc:249] Missing X server or $DISPLAY [2908:2908:0604/142258.367202:ERROR:ui/aura/env.cc:257] The platform failed to initialize. Exiting. solusinya tambahkan extension dan environment ke snap/snapcraft.yaml apps: electron-packager-hello-world: command: electron-quick-start/electron-quick-start --no-sandbox extensions: [gnome] plugs: - browser-support - network - network-bind environment: # Correct the TMPDIR path for Chromium...
  • Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules'

    install npm package muncul error seperti ini Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules’ cara mengatasinya : 1. buat folder baru untuk npm global mkdir ~/.npm-global 2. atur npm untuk menggunakan folder baru tersebut npm config set prefix '~/.npm-global' 3. tambahkan baris ini pada file ~/.bashrc atau ~/.zshrc export PATH=~/.npm-global/bin:$PATH 4....
  • NodeJS - Menampilkan output dari child_process seperti spawn , spawnSync, dll

    Untuk menampilkan output dari command yang dijalankan dari node js secara realtime gunakan opsi {stdio: ‘inherit’} contoh: import { spawn,spawnSync } from 'node:child_process'; const cmd = 'ls'; const args = ['a']; spawn(cmd, args, {stdio: 'inherit'});
  • Package 'libasound2' has no installation candidate

    Hal ini dikarenakan package libasound2 tidak ditemukan. Solusinya ganti dengan libasound2t64
  • Full uninstall WSL distro

    Untuk meng uninstall distro WSL secara penuh di windows tidak berfungsi sebagaimana mestinya jika uninstall dari store atau setting. Solusinya uninstall lewat prompt. Contoh untuk uninstall distro kali-linux dari WSL. C:\Users\nuzul>wsl -l -v NAME STATE VERSION * docker-desktop Stopped 2 kali-linux Stopped 2 docker-desktop-data Stopped 2 C:\Users\nuzul>wsl --unregister kali-linux Unregistering....
  • Linux - Install Chromium Dependencies

    sudo apt-get install ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils
  • error: cannot communicate with server: Post "http://localhost/v2/snaps/hello-world": dial unix /run/snapd.socket: connect: no such file or directory

    di wsl windows ketika mau install snap contohnya hello-word dengan perintah: snap install hello-world akan muncul error : error: cannot communicate with server: Post “http://localhost/v2/snaps/hello-world”: dial unix /run/snapd.socket: connect: no such file or directory solusinya: 1. sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig sudo daemonize /usr/bin/unshare...
  • error: Flatpak system operation ConfigureRemote not allowed for user

    ketika mau menambahkan flathub dengan perintah flatpak remote-add –if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo terjadi error: Flatpak system operation ConfigureRemote not allowed for user solusinya tambahkan perintah sudo sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
  • error: No remote refs found for flathub

    ketika akan menginstall paket flatpak dari flathub di linux terjadi error: No remote refs found for ‘flathub’ sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
  • Linux - Melihat Daftar Aplikasi yang di Install

    daftar package yang di install baik secara manual maupun otomatis apt list --installed daftar package yang di install manual saja apt-mark showmanual
  • Reverting remote git to a specific previous commit

    git reset --hard 998c5d24f1b5b4920c6cbbae2e0bc6f9d04513a6 git push --force
  • Git ignore config file after commiting repository

    Ignore config.json git add config.json git commit git push git update-index --assume-unchanged config.json Update config.json git update-index --no-assume-unchanged config.json git commit -a git update-index --assume-unchanged config.json
  • Menghapus Semua HTML Entities Pada Text Menggunakan JavaScript Regex

    Karakter special umumnya dikonversi menjadi HTML ENTITIES agar dapat ditampilkan pada dokumen HTML. Namun ada kalanya kita tidak membutuhkannya dan ingin menghapus semuanya. Berikut contoh cara menghapusnya dengan menggunakan JavaScript Regex. const catatan = "Copyright © 2024" const hasil = catatan.replace(/&[^>]*;/g,"") console.log(hasil) //Copyright 2024 Regex diatas akan mencari semua kata...
  • Create a new empty branch in Git

    $ git checkout --orphan NEWBRANCH $ git rm -rf .
  • Reset local git repo

    git remote add origin https://github.com/nuzulul/nuzulul.github.io git fetch --all git reset --hard origin/main
  • Git - Clear All Git History

    Clear Git history by removing all commits git checkout --orphan temp_branch git add -A git commit -am "The first commit" git branch -D main git branch -m main git push -f origin main Referensi : https://www.shellhacks.com/git-remove-all-commits-clear-git-history-local-remote/
  • Unable to load the EventMachine C extension; To use the pure-ruby reactor, requi re 'em/pure_ruby'

    Masalah : Setelah melakukan perintah “bundle update” jekyll tidak bisa dijalankan dan muncul error EventMachine seperti dibawah ini : E:\data\github\nuzulul.github.io>bundle exec jekyll serve --future --livereload Configuration file: E:/data/github/nuzulul.github.io/_config.yml Source: E:/data/github/nuzulul.github.io Destination: E:/data/github/nuzulul.github.io/_site Incremental build: disabled. Enable with --incremental Generating... Jekyll Feed: Generating feed for posts done in 1.441 seconds. Auto-regeneration:...

subscribe via RSS