sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Next.js: debug server-side", | |
"type": "node-terminal", | |
"request": "launch", | |
"command": "yarn dev" | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cache-dir = "~/.cache/ruff" | |
# Exclude a variety of commonly ignored directories. | |
exclude = [ | |
".bzr", | |
".direnv", | |
".eggs", | |
".git", | |
".git-rewrite", | |
".hg", | |
".mypy_cache", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"[blade]": { | |
"editor.defaultFormatter": "onecentlin.laravel-blade", | |
"editor.formatOnSave": true | |
}, | |
"[css]": { | |
"editor.foldingStrategy": "indentation", | |
"editor.tabSize": 4 | |
}, | |
"[graphql][handlebars]": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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'