Skip to content

Instantly share code, notes, and snippets.

View riandoza's full-sized avatar
🏠
Everyday is holiday

Rizki Doza riandoza

🏠
Everyday is holiday
View GitHub Profile
@riandoza
riandoza / ERR_unicode-display_width.md
Created June 24, 2025 14:59
Error after install colorls on Arch Linux

Found error unicode-display_width or something when run command colorls
Installation URL https://aur.archlinux.org/packages/ruby-colorls
Problem : Could not find 'unicode-display_width'

/usr/lib/ruby/3.4.0/rubygems/specification.rb:1421:in 'block in Gem::Specification#activate_dependencies': Could not find 'unicode-display_width' (>= 1.7, < 3.0) among 69 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/home/doza/.local/share/gem/ruby/3.4.0:/usr/lib/ruby/gems/3.4.0' at: /usr/lib/ruby/gems/3.4.0/specifications/colorls-1.5.0.gemspec, execute `gem env` for more information
        from /usr/lib/ruby/3.4.0/rubygems/specification.rb:1407:in 'Array#each'
        from /usr/lib/ruby/3.4.0/rubygems/specification.rb:1407:in 'Gem::Specification#activate_dependencies'
        from /usr/lib/ruby/3.4.0/rubygems/specification.rb:1389:in 'Gem::Specification#activate'
        from /usr/lib/ruby/3.4.0/rubygems.rb:290:in 'block in Gem.activate_bin_path'
@riandoza
riandoza / ci3-fix.md
Last active June 11, 2025 17:24
Fix Error CodeIgniter3 on PHP8.3+

Message: Creation of dynamic property ... is deprecated

Message: Creation of dynamic property CI_URI::$config is deprecated. Solution is to have the classes affected explicitly declare that they allow dynamic attributes

/system/core/URI.php

#[\AllowDynamicProperties]
class CI_URI {
#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13), macOS Sonoma (14) and macOS Sequoia (15)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user
@riandoza
riandoza / settings.json
Last active May 30, 2025 19:14
Advanced VS Code Global Settings
{
"[blade]": {
"editor.defaultFormatter": "onecentlin.laravel-blade",
"editor.formatOnSave": true
},
"[css]": {
"editor.foldingStrategy": "indentation",
"editor.tabSize": 4
},
"[graphql][handlebars]": {
@riandoza
riandoza / ruff.toml
Last active March 19, 2025 17:16
My Ruff configuration
cache-dir = "~/.cache/ruff"
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
@riandoza
riandoza / set-timezone-ubuntu.md
Created February 22, 2024 20:23
Set Timezone for Web Development

Set Timezone in Ubuntu 22.04 LTS

Note: We use configuration for Indonesia Timezone UTC+7

Change timezone in OS (Ubuntu 22.04 LTS)

sudo timedatectl set-timezone Asia/Jakarta

Change timezone in database (Mariadb Server)

@riandoza
riandoza / multiple-php-versions.md
Last active August 21, 2024 20:31
Installing multiple PHP Versions [Ubuntu 22.04 LTS]

Multiple PHP Versions

For Ubuntu LTS Versions

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update

For Debian

@riandoza
riandoza / launch.json
Last active December 26, 2023 03:34
Next.JS VSCode debug launch Brave Browser MacOS
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "yarn dev"
},
{
@riandoza
riandoza / date_id.py
Last active November 13, 2023 19:53
Menampilkan nama hari dan bulan Indonesia
from datetime import datetime
def date_id(date_str, show_day=False, sep=False):
if isinstance(date_str, str):
date_object = datetime.strptime(date_str, "%Y-%m-%d").date()
else:
date_object = date_str
nama_hari = ["Senin", "Selasa", "Rabu", "Kamis", "Jum'at", "Sabtu", "Minggu"]
nama_bulan = [
@riandoza
riandoza / prisma-sqlite-bulk.js
Created September 15, 2023 18:15
Prisma SQLite Bulk Insert or Update
const domains = ['google.com','github.com','instagram.com'];
/*** Method 1 ***/
const upsertManyDomains = domains.map((post) =>
prisma.domains.upsert({
where: { domain: post.trim() },
create: {
domain: post.trim(),
},
update: {