blog

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 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 chain INPUT'
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

I was angry with my friend I told my wrath, my wrath did end | Poison Tree William Blake Arts

A Poison Tree
BY WILLIAM BLAKE

Tommy Shelby Peaky Blinders – William Blakes – A Poison Tree


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.”

Your Personality Meme Lucu – 25Personalities

Sejarah Meme

Istilah “meme” pertama kali dicetuskan oleh Richard Dawkins pada tahun 1976. Awalnya, meme mengacu pada unit transimisi budaya yang berhubungan dengan imitasi. Seiring berjalannya waktu, para pengguna internet menganggap istilah ini mengacu pada kombinasi kata-kata dan gambar yang dibuat untuk membuat lelucon lucu atau biasanya untuk mengkritik fenomena sosial terkini.

Hampir 40 tahun sejak dicetuskan, istilah meme telah menjadi sebuah budaya dalam internet khususnya pada platform microblogging dan media sosial. Sekarang meme dilihat sebagai bentuk perilaku, gaya hidup, kepercayaan, model, dan lain-lain, yang ditiru dan disebarkan untuk dibagikan dari satu individu ke individu lain.

Biasanya meme akan dibagikan melalui interaksi dengan menggunakan beberapa media seperti tulisan, gambar, video, atau fotografi.

Apa yang dianggap sebagai meme dapat bervariasi dan dapat berubah seiring waktu. Secara tradisional, meme terdiri dari kombinasi gambar atau slogan tetapi konsep tersebut telah menjadi lebih luas dan beragam.

Semenjak penggunaan Internet semakin masif, istilah meme kini bagaikan sebuah kata umum yang diketahui semua orang. Meme menjadi sangat populer ketika gags hingga rage comic menghiasi platform-platform media digital seperti blog, websites hingga jejaring sosial.

Jika kamu sempat mengikuti budaya meme populer tersebut, tentu kamu tahu bahwa ada beberapa meme ‘legendaris’ yang hingga kini masih sering digunakan. Tanpa berlama lagi, yuk intip beberapa meme Internet populer di bawah ini!

All religion is a foolish answer to a foolish question. – Thomas Shelby – Peaky Blinders

Finding the meaning behind our existence is a foolish answer.

I think that religions where born when the first children died in the arms of their parents.
At some point you just can’t accept everything, you have to change your views on the realities of a harsh world so you don’t loose your mind. “He is in a better world now”, “this rainbow is a sign send by God”, “I am ill because I have done something wrong”, “this thief who escaped is going to pay for what he did”.

In a place where there is no concept of science, where you are confronted to randomness and injustice, you have to replace [something that we don’t know yet] by [God], it’s shorter and enough most of the time to keep going.

Believers of all confessions are not foolish, nor stupid, I think they just have faith in a better world with better people. I respect that even if I don’t believe in any Gods.

Religions helped us build civilizations by making the first laws and sanitary rules (don’t kill, don’t eat pork, don’t steal, clean yourself)

Not personally religious, but I can understand why believing in a higher being can give a lot of people peace of mind. Edit: It’s certainly better than the depressing alternative, that everything is pointless

Just want to clarify that there is ALOT of difference between atheism or not believing in god, and nihilism.

Honestly, religion is a silly little cult that’s gone on for too long. But I like it because it’s helped me accept who I am. I believe that there is something after death but know that it can never be proven but it’s nice to think that there might be. Plus the accepting myself thing thru religion really helped me come to terms with being gay. Knowing someone would always love me was wonderful. But yeah, religion is a foolish answer to a foolish question.

If God or gods exist, then I see two options, neither of which require a religious background. Either hell doesn’t exist and everyone goes to heaven because situations that lead to where you are can’t be controlled, or hell is basically perfect rehab because people have mental illness and or make poor choices. If your point of view ends up fucked enough, you may see something as right when it’s wrong, so hell just doesn’t make sense. If one doesn’t then why worry about it and waste what time I have? If nothing matters then everything matters

Ask something that can’t be proven isn’t foolish at all. It’s in fact the purpose of questions. If we know the answer to a question and could prove it then where’s the need to ask the questions. And the more unanswerable a question is the better the question is (for example Millennium Prize Problems are better problem then let’s say “what does 1+1 equal”) So “What’s the purpose of everything” is in fact one of the best questions ever written. Of course you can just argue that all questions are foolish in general but that’s totally another thing.

I sorta agree with it. The question’s credibility depends on the particular question, but the answer is definitely stupid.

Asking about our origin is natural. There are three paths you can take to deal with this.

  • First, you can make hypotheses based on science.
  • Second, you can decide not to ignore it.
  • The third is that you make up an answer.

I guess most religion is based on the third option. This answer is usually similar with variations according to culture and environment. Notice how it tends to abuse concepts we can’t understand, like infinity. This answer is great psychologically, but it’s rubbish from the scientific viewpoint.

Another Quotes:

“everyone’s a whore Grace, we just sell different parts of ourselves”

Alfie : I, my friend, am the uncle, and the protector, and the promoter of that fucking thing right there, in whose shadow nothing good nor godly will ever fucking grow. That there, right, is the southern counties’ welterweight champion. He is of mixed religion, therefore he is godless. He was adopted by Satan himself before he was returned out of fear of his awkwardness. But he’s impossible to marry off due to his lethal dimensions. His mother, terrified, she’s fucking abandoned him. And there he is, stood before you like the first of some brand-new fucking species! Any man that you put before him, right, it’d be like entering a fucking threshing machine, mate. Now, will you offer your son?

He stole horses and he told fortunes, often he would tell a man that his horse would be stolen and they would marvel at his powers when it was.

Alfie: “I’ll need another ton for killing Tommy, because his brother is an animal and will try to fucking kill me.”

Tommy: “I take it for the pain. To keep warm.” – Grace: “Is that what it’s for? The warmth? … Ahh. The warmth.” – “All this time.” – “I know. Our love still remains… But you have to listen to the voices that you hear.” I love this scene because it shows Tommy’s escapism, Grace’s support but also her tendency to infiltrate him as his imaginative dark side

“You don’t get what you deserve, you get what you take”

“Me, talking to myself, about myself Something like that”

“There is peace when war is hopeless.”

“During John’s funeral when he said that War already killed them , after that everything is just extra in their life”

Exit mobile version