All posts by josuamarcelc

Razer Opus Headset Problem Cannot Turn Off

Razer Opus headset froze, cannot hear anything, but the blue light is turning on, it didn’t react to any buttons, I could not turn it off, the noise cancelling was still on.

I had to wait for a day until the battery ran out, then recharged it. Since then, every time I put it in pairing mode, I hear the bleeps two times, and then it shuts off.


Solution

plug the included 3.5mm cable into the Opus, then Press and Hold Volume Up + Volume Down + Power Button at the same time.


Razer Opus – Black

Wireless THX® Certified Headphones with Advanced Active Noise Cancellation

US$199.99

  • THX® Certified Headphones
  • Advanced Active Noise Cancellation (Anc) Technology
  • Bluetooth and 3.5 mm connections

Headset Product: Razer Opus

The project you were looking for could not be found or you don’t have permission to view it. | GITLAB VSCode


This article helps me to fix git push to gitlab. It’s been a long time i didn’t to commit to gitlab 😀
remote: The project you were looking for could not be found or you don't have permission to view it. fatal: repository 'https://gitlab.com/josuamarcelc/myproject.git/' not found

git remote set-url origin https://{your_gitlab_username}@gitlab.com/{repo_owner_gitlab_username}/project_repo.git


1. Check Your Remote Origin by

 git remote -v

Result

origin  https://gitlab.com/josuamarcelc/myproject.git (fetch)
origin  https://gitlab.com/josuamarcelc/myproject.git (push)

2. Delete and Add another remote origin

git remote set-url --delete origin https://gitlab.com/josuamarcelc/myproject.git
git remote set-url --add origin https://josuamarcelc@gitlab.com/josuamarcelc/myproject.git

3. Or Shortcut set-url origin

git remote set-url origin https://josuamarcelc@gitlab.com/josuamarcelc/myproject.git

Reference: https://gitlab.com/gitlab-org/gitlab-foss/-/issues/35440

SHOW FULL PROCESSLIST in PostgreSQL


MySQL has show full processlist; to see a list of currently running queries.

PostgreSQL has a similar shell like select * from pg_stat_activity;

1. Simple Command

select * from pg_stat_activity;

2. Second Option

SELECT user, pid, client_addr, query, query_start, NOW() - query_start AS elapsed
FROM pg_stat_activity
WHERE query != '<IDLE>'
-- AND EXTRACT(EPOCH FROM (NOW() - query_start)) > 1
ORDER BY elapsed DESC;

3. Third Option

SELECT pid, age(clock_timestamp(), query_start), usename, query 
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;

4. Finding Long Processing Time / Stuck Queries

SELECT pid, now() - pg_stat_activity.query_start AS duration, query, state
FROM pg_stat_activity
WHERE (now() - pg_stat_activity.query_start) > interval '5 minutes';

5. Cancelling Long Running Queries

SELECT pg_cancel_backend(pid);

6. Kill Process ID / Terminate Stuck Queries

SELECT pg_terminate_backend(pid);

Reference: SHOW FULL PROCESSLIST in PostgreSQL

Public DNS Server List Yang Dapat Dipakai Di Indonesia

OpenDNS

Server DNS pertama rekomendasi Jaka adalah OpenDNS yang sudah sering digunakan oleh banyak orang karena mampu mempercepat akses internet di HP atau PC kamu. OpenDNS ini merupakan salah satu grup dari Cisco dan diklaim aman dan terpercaya. OpenDNS sendiri memiliki berbagai produk yang bisa kamu gunakan. Di antaranya adalah OpenDNS Family Shield dan Home yang bisa kamu gunakan secara gratis. Sedangkan VIP dan Umbrella Prosummer bisa kamu nikmati dengan langganan berbayar.

KeteranganOpenDNS
Primary DNS208.67.222.222
Secondary DNS208.67.220.220
Primary DNS (IPv6)2620:119:35::35
Secondary DNS (IPv6)2620:119:53::53
OpenDNS

Cloudflare DNS

Selanjutnya adalah Cloudflare DNS yang merupakan server DNS yang diklaim paling cepat di antara lainnya. DNS yang dibuat oleh kolaborasi Cloudflare and APNIC ini akan memberikan pengalaman berselancar internet yang lebih maksimal. Kamu yang tak mengerti cara mengganti DNS, bisa mengunduh aplikasi Cloudflare DNS secara gratis. Cloudflare DNS akan membantu kamu untuk browsing secara aman. Sehingga tidak ada orang lain yang bisa mengetahui sejarah internetan kamu. Tak hanya itu, Cloudflare DNS memiliki kecepatan 14,96ms yang sangat cepat.

KeteranganCloudflare DNS
Primary DNS1.1.1.1
1dot1dot1dot1.cloudflare-dns.com
Secondary DNS1.0.0.1
Primary DNS (IPv6)2606:4700:4700::1111
Secondary DNS (IPv6)2606:4700:4700::1001
Cloudflare DNS

Google DNS

Google DNS juga menjanjikan kamu kecepatan browsing yang lebih cepat serta melindungi kamu dari berbagai macam virus dan hacker. Tak berhenti di situ ada juga fitur anti-redirection.

KeteranganGoogle DNS
Primary DNS8.8.8.8
Secondary DNS8.8.4.4
Primary DNS (IPv6)2001:4860:4860::8888
Secondary DNS (IPv6)2001:4860:4860::8844
Google DNS

Quad9

Quad9 ini memiliki fitur yang dapat mempercepat pengalaman kamu dalam berselancar di internet. Selain itu, Quad9 juga akan mengamankan akses kamu di internet. Quad9 ini bekerja sama dengan perusahaan besar seperti IBM, Packet Clearing House, dan Global Cyber Alliance. Tak hanya itu, Quad9 setidaknya memblokir 10 juta akses jahat terhadap penggunanya.

KeteranganQuad9
Primary DNS9.9.9.9
Secondary DNS149.112.112.112
Primary DNS (IPv6)2620:fe::fe
Secondary DNS (IPv6)2620:fe::9
Quad9

Verisign

Verisign ini bisa kamu coba karena memiliki konektivitas yang stabil dan aman dari berbagai bahaya di internet. Kamu bisa menggunakan DNS ini di berbagai perangkat kamu seperti PC, HP maupun tablet kamu. Verisign juga mengklaim tidak akan mencatat dan menjual data public DNS kamu ke pihak ketiga. Selain itu, DNS ini juga tidak akan memberikan kamu iklan apapun saat berselancar di internet.

KeteranganVerisign
Primary DNS64.6.64.6
Secondary DNS64.6.65.6
Primary DNS (IPv6)2620:74:1b::1:1
Secondary DNS (IPv6)2620:74:1c::2:2
Verisign

CleanBrowsing

CleanBrowsing ini adalah DNS terpercaya yang memiliki beragam fitur menarik untuk membantu kamu berselancar di internet secara maksimal. DNS ini memiliki tiga jenis filter yang bisa kamu pilih, di antaranya adalah Family Filter, Adult Filter, dan Security Filter. Masing-masing memiliki fitur yang menarik. Family Filter akan memblokir sejumlah konten dewasa serta memblokir akses VPN. Filter ini cocok digunakan untuk anak atau saudara kamu yang masih kecil. Adult Filter ini sama dengan family filter, tapi VPN tetap bekerja. Sedangkan, Security Filter hanya akan memblokir segala bentuk spam, pishing, dan serangan malware.

KeteranganCleanBrowsing
Primary DNS185.228.168.9
Secondary DNS185.228.169.9
Primary DNS (IPv6)2a0d:2a00:1::2
Secondary DNS (IPv6)2a0d:2a00:2::2
CleanBrowsing

AdGuard DNS

Terakhir dalah AdGuard DNS yang bisa memberikan kamu fitur untuk memblokir berbagai macam iklan di perangkat kamu. Tak hanya itu, DNS ini juga akan menjaga privasi kamu saat browsing. AdGuard DNS juga bisa kamu gunakan sebagai proteksi HP dari konten dewasa agar anak bisa menggunakan gadget secara aman. DNS ini bisa kamu gunakan tanpa harus menggunakan aplikasi.

KeteranganAdGuard DNS
Primary DNS176.103.130.130
Secondary DNS176.103.130.131
Primary DNS (IPv6)2a00:5a60::ad1:0ff
Secondary DNS (IPv6)2a00:5a60::ad2:0ff
AdGuard DNS

Level3

Level3 otomatis akan menyambungkan ke server DNS terdekat dari posisi kamu. Koneksi internet lebih stabil dan bisa untuk membuka situs yang diblokir.

KeteranganLevel3
Primary DNS209.244.0.3
Secondary DNS209.244.0.4
Level3

Comodo Secure DNS

Comodo Secure DNS memberikan koneksi yang cepat dan aman untuk menjelajahi internet. Lebih cepat karena Comodo Secure DNS menggunakan server terdekat dari posisi kamu. Lebih aman karena Comodo Secure DNS menyaring situs berbahaya yang mengandung malware, phising dan lain-lain. Dan yang lebih penting lagi, bisa untuk membuka situs yang diblokir.

KeteranganComodo Secure DNS
Primary DNS8.26.56.26
Secondary DNS8.20.247.20
Comodo Secure DNS

DNS.Watch

DNS.Watch server terletak di negara jerman jadi jika digunakan di indonesia akan mempengaruhi kestabilan koneksi internet kamu. Tetapi bisa digunakan untuk membuka situs yang diblokir.

KeteranganDNS.Watch
Primary DNS84.200.69.80
Secondary DNS84.200.70.40
DNS.Watch

https://ipinfo.io/AS45719

https://dnslytics.com/bgp/as45719

https://db-ip.com/as45719-nawala-project—-dns-filtering-project

https://db-ip.com/all/180.131.145

https://lms.onnocenter.or.id/wiki/index.php/Daftar_DNS_Server_Bagi_Pengguna_Indonesia

Berikut catatan saya IP DNS PING Via Mikrotik:
Indosat
202.155.0.10 ttl 55 time 9-11ms
202.155.0.15 ttl 55 time 10ms
202.155.0.20 ttl 55 time 10-11ms
202.155.0.25 ttl 245 time 10-22ms
202.155.46.66 RTO
202.155.46.77 RTO
202.155.30.227 RTO


Gambar Screenshot Ping IP DNS Indosat via Winbox

IP DNS Telkom
202.134.0.62 9-10ms sip ttl 59
202.134.1.10 19-20ms ttl 59
202.159.32.2 9-15ms v x 58
202.159.33.2 9-10ms ttl 58
202.134.0.155 9-35ms ttl 58
203.130.208.18 nssmg1.telkom.net.id 28-30ms

Gambar Screenshot Ping IP DNS Telkom via Winbox
BINUS
202.58.181.18 avg 10ms
AWARI (Asosiasi Warung Internet Indonesia)
203.142.83.200 TTL 55 time 12-13ms
203.34.118.10 (primary) 57 time 10-12ms
203.34.118.12 (secondary) time 10-23ms
Sat.net.id
202.149.82.25 TTL 54 time 9-12ms
202.149.82.29 TTL 54 time 9-21ms
cbn.net.id
202.158.40.1 TTL 55 time 9-13ms
202.158.20.1 TTL 54 time 9-13ms
202.158.3.7 (primary) 55 time 9-10ms
202.158.3.6 (secondary) 55 time 9-20ms
indo.net.id
202.159.32.2 TTL 58 time 9-10ms
202.159.33.2 TTL 58 time 9-10ms
ukdw.ac.id
222.124.22.18 TTL 59 time 19-29ms
Lintas Artha
202.152.0.2 (primary) 56 time 9-12ms
202.152.5.36 (secondary) RTO
Singnet
165.21.83.88 TTL 54
DNS Nawala
DNS #1: 180.131.144.144 TTL 58 time 10-14
DNS #2: 180.131.145.145 TTL 57 time sering RTO XX 

Update

DNS Server di Indonesia

Server DNS indosat.net.id termasuk DNS Indosat IM2

  • 202.155.0.10
  • 202.155.0.15
  • 202.155.0.20
  • 202.155.0.25
  • 202.155.46.66
  • 202.155.46.77
  • 202.155.30.227

DNS Telkom.net.id Telkom Speedy

  • 202.134.2.5
  • 203.130.196.5
  • 202.134.0.155
  • 202.134.1.10
  • 202.134.0.62
  • 202.159.32.2
  • 202.159.33.2
  • 202.155.30.227

DNS AWARI (Asosiasi Warnet Indonesia)

  • 203.34.118.10
  • 203.34.118.12

DNS sat.net.id

  • 202.149.82.25
  • 202.149.82.29

DNS cbn.net.id

  • 202.158.40.1
  • 202.158.20.1
  • 202.158.3.7
  • 202.158.3.6

Singnet Singapore

  • 165.21.100.88
  • 165.21.83.88

DNS indo.net.id

  • 202.159.32.2
  • 202.159.33.2

DNS itb.ac.id

  • 202.249.24.65
  • 167.205.23.1
  • 167.205.22.123
  • 167.205.30.114

DNS ukdw.ac.id

  • 222.124.22.18

DNS Open DNS

  • 208.67.222.222
  • 208.67.220.220

DNS ScrubIt

  • 67.138.54.100
  • 207.225.209.66

DNS DNSadvantage

  • 156.154.70.1
  • 156.154.71.1

DNS vnsc-pri.sys.gtei.net

  • 4.2.2.1
  • 4.2.2.2
  • 4.2.2.3
  • 4.2.2.4
  • 4.2.2.5
  • 4.2.2.6

Verizon (Reston, VA, US)

  • 151.197.0.38
  • 151.197.0.39
  • 151.202.0.84
  • 151.202.0.85
  • 151.202.0.85
  • 151.203.0.84
  • 151.203.0.85
  • 199.45.32.37
  • 199.45.32.38
  • 199.45.32.40
  • 199.45.32.43

GTE (Irving, TX, US)

  • 192.76.85.133
  • 206.124.64.1

One Connect IP (Albuquerque, NM, US)

  • 67.138.54.100

OpenDNS (San Francisco, CA, US)

  • 208.67.222.222
  • 208.67.220.220

Exetel (Sydney, AU)

  • 220.233.167.31

VRx Network Services (New York, NY, US)

  • 199.166.31.3

SpeakEasy (Seattle, WA, US)

  • 66.93.87.2
  • 216.231.41.2
  • 216.254.95.2
  • 64.81.45.2
  • 64.81.111.2
  • 64.81.127.2
  • 64.81.79.2
  • 64.81.159.2
  • 66.92.64.2
  • 66.92.224.2
  • 66.92.159.2
  • 64.81.79.2
  • 64.81.159.2
  • 64.81.127.2
  • 64.81.45.2
  • 216.27.175.2

Sprintlink (Overland Park, KS, US)

  • 199.2.252.10
  • 204.97.212.10
  • 204.117.214.10

Cisco (San Jose, CA, US)

  • 64.102.255.44
  • 128.107.241.185

iptables Command Insert and Delete an IP

Result of DROP is Connection Refused

Iptables is a firewall, installed by default on all official Ubuntu distributions (Ubuntu, Kubuntu, Xubuntu). When you install Ubuntu, iptables is there, but it allows all traffic by default. Ubuntu comes with ufw – a program for managing the iptables firewall easily.

  • Reject Specific IP in iptables
    • sudo iptables -I INPUT -s 111.111.111.111 -j DROP
  • Show IP List in iptables
    • iptables -L INPUT --line-numbers
Chain INPUT (policy ACCEPT)
num             target        prot        opt          source          destination
1               DROP          all         --           111.111.111.111 anywhere
  • Delete IP on IP List in iptables
    • iptables -D INPUT 1
  • Flushing the List in iptables
    • sudo iptables -F -t nat -v
Flushing chain PREROUTING'
Flushing chai nINPUT'
Flushing chain OUTPUT'
Flushing chain POSTROUTING'

How To Install Configure and Use Memcached in CodeIgniter 3.x.x Ubuntu

Memory object caching systems like Memcached can optimize backend database performance by temporarily storing information in memory, retaining frequently or recently requested records. In this way, they reduce the number of direct requests to your databases.

In this guide, you will learn how to install and configure a Memcached server. You’ll also learn how to add authentication to secure Memcached using Simple Authentication and Security Layer (SASL). Finally, you’ll learn how to bind Memcached to a local or private network interface to ensure that it is only accessible on trusted networks, by authenticated users.

1. Install in Ubuntu

sudo apt-get -y install php8.0-memcached memcached //depend on PHP version

2. Configure the Memcached Memory

vi /etc/memcached.conf

# Start with a cap of 64 megs of memory. It's reasonable, and the daemon default
# Note that the daemon will grow to this size, but does not start out holding this much
# memory
-m 4112

3. Restart Memcached

service memcached restart

4. Use Memcached In CodeIgniter 3.x.x PHP

4a. Check Cache Info

$CI =& get_instance();
$CI->load->driver('cache');
echo '<pre>';
print_r($CI->cache->memcached->cache_info());
echo '</pre>';

4b. Create Cache

$CI =& get_instance();
$CI->load->driver('cache');
$CI->cache->memcached->save('variable', json_encode($array_variable), 60);
// params: 'variable' => cache_key, 
// params: $array_variable => array value content, 
// params: 60 => expired_time_in_second

4c. Get Cache

$CI =& get_instance();
$CI->load->driver('cache');
$array_variable = $CI->cache->memcached->get('variable');
if($cached !== false){
    return json_decode($array_variable, true);
}

4d. Delete Cache

$CI =& get_instance();
$CI->load->driver('cache');
$CI->cache->memcached->delete('variable');

4e. Clear All Caches

$CI =& get_instance();
$CI->load->driver('cache');
$CI->cache->memcached->clean();

References:

User Guide Cache CodeIgniter 2.x.x

User Guide CodeIgniter 3.x.x

Memcached in Magento

Poison Tree William Blake Arts

A Poison Tree
BY WILLIAM BLAKE


I was angry with my friend;
I told my wrath, my wrath did end.
I was angry with my foe:
I told it not, my wrath did grow.

And I waterd it in fears,
Night & morning with my tears:
And I sunned it with smiles,
And with soft deceitful wiles.

And it grew both day and night.
Till it bore an apple bright.
And my foe beheld it shine,
And he knew that it was mine.

And into my garden stole,
When the night had veild the pole;
In the morning glad I see;
My foe outstretched beneath the tree.


“A Poison Tree” is a poem written by William Blake, published in 1794 as part of his Songs of Experience collection. It describes the narrator’s repressed feelings of anger towards an individual, emotions which eventually lead to murder. The poem explores themes of indignation, revenge, and more generally the fallen state of mankind.

Poem
The poem relies on a trochaic beat. It consists of four stanzas and begins with an emphasis on the first person. The first person perspective changes with the use of the word “And” after the first stanza, while the emphasis on “I” is replaced

The original draft has a line drawn beneath the first stanza, which could denote that Blake originally intended the poem as concluding at the 4th line. There are also many differences between the manuscript and published versions of the poem, with the original line 3 and 4 reading “At a Friends Errors Anger Shew / Mirth at the Errors of a Foe.”