dapurhosting.com Blog for Tech

November 12, 2019

Disable Contact Form Prestashop

Filed under: Uncategorized — dh @ 3:45 am

(more…)

August 6, 2018

File Count

Filed under: Uncategorized — dh @ 4:53 pm
ls -1 | wc -l

April 10, 2018

Download File dari Google Drive

Filed under: Uncategorized — dh @ 7:37 am

Cara download file dari google drive via ssh

buat file getfile.sh


touch getfile.sh
chmod +x getfile.sh
nano getfile.sh

Copy paste:

#!/bin/bash
fileid="### file id ###"
filename="MyFile.csv"
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}

Ganti fileid dengan id file google.
Ganti filename dengan nama file asli.

fileid didapat dari share file (klik kanan di file, lalu klik Get shareable link), contoh: https://drive.google.com/open?id=1_naou3PopRVlQt9FZJTCGzRKGp306hs8
1_naou3PopRVlQt9FZJTCGzRKGp306hs8 adalah FILEID

Referensi:

https://gist.github.com/tanaikech/f0f2d122e05bf5f971611258c22c110f

October 26, 2016

Menambah Hardisk

Filed under: Uncategorized — dh @ 7:50 pm

http://www.techotopia.com/index.php/Adding_a_New_Disk_Drive_to_a_CentOS_6_System

June 15, 2016

DNS Lookup

Filed under: Uncategorized — dh @ 12:51 am

http://www.kloth.net/services/dig.php

August 18, 2015

Kill Mass Process

Filed under: Uncategorized — dh @ 9:52 am

Ambil id proses

ps -ef | grep awk | grep -v grep | awk '{print $2}'


kill -9 `ps -ef | grep CROND | grep -v grep | awk '{print $2}'`
kill -9 `ps -ef | grep Average | awk '{print $2}'`
kill -9 `ps -ef | grep pidstat | grep -v grep | awk '{print $2}'`

December 28, 2014

Block Yandex

Filed under: Uncategorized — dh @ 3:22 am

Di file .htaccess tambahkan

SetEnvIfNoCase User-Agent "^Yandex*" bad_bot
order allow, deny
deny from env=bad_bot
deny from 95.108.152.0/22
deny from 95.108.216.0/23
deny from 95.108.240.0/21
deny from 95.108.248.0/23
deny from 178.154.128.0/17
deny from 178.154.160.0/22
deny from 178.154.164.0/23
deny from 199.36.240.0/22
deny from 213.180.192.0/19
deny from 213.180.204.0/24
deny from 213.180.206.0/23
deny from 213.180.209.0/24
deny from 213.180.218.0/23
deny from 213.180.220.0/23
deny from 77.88.0.0/18
deny from 77.88.22.0/23
deny from 77.88.24.0/21
deny from 77.88.24.0/22
deny from 77.88.28.0/22
deny from 77.88.36.0/23
deny from 77.88.42.0/23
deny from 77.88.44.0/24
deny from 77.88.50.0/23
deny from 87.250.224.0/19
deny from 87.250.230.0/23
deny from 87.250.252.0/22
deny from 93.158.128.0/18
deny from 93.158.137.0/24
deny from 93.158.144.0/21
deny from 93.158.144.0/23
deny from 93.158.146.0/23
deny from 93.158.148.0/22
deny from 95.108.128.0/17
deny from 95.108.128.0/24
deny from 5.255.192.0/18
deny from 178.154.243.0/24
deny from 37.140.128.0/18
deny from 95.108.158.0/24

di file robots.txt tambahkan

User-agent: Yandex
Disallow: /

December 21, 2014

Block Baidu

Filed under: Uncategorized — dh @ 5:38 am

Buka atau buat file robots.txt dan tambahkan

User-agent: Baiduspider
User-agent: Baiduspider-video
User-agent: Baiduspider-image
Disallow: /

Blok baidu dan ip china

RewriteCond %{HTTP_USER_AGENT} ^Baiduspider [NC]

deny from baidu.com
deny from crawl.baidu.com
deny from 220.181.7.
deny from 123.125.66.
deny from baiduspider-220-181-7-20.crawl.baidu.com
deny from baiduspider-220-181-7-61.crawl.baidu.com

order allow,deny
deny from *.baidu.com
deny from 202.46.
deny from 203.125.234.
deny from 220.181.7.
deny from 123.125.66.
deny from 123.125.71.
deny from 119.63.192.
deny from 119.63.193.
deny from 119.63.194.
deny from 119.63.195.
deny from 119.63.196.
deny from 119.63.197.
deny from 119.63.198
deny from 119.63.199.
deny from 180.76.5.
deny from 202.108.249.
deny from 61.135.146.200
deny from 61.135.145.221
deny from 61.135.145.207
deny from 202.108.250.196
deny from 68.170.119.76
deny from 207.46.199.52
deny from 180.76.
deny from 220.181.
deny from 185.10.
allow from all

December 15, 2014

Speedtest

Filed under: Uncategorized — dh @ 11:49 am

(more…)

December 6, 2014

Smartfren

Filed under: Uncategorized — dh @ 10:13 am

(more…)

« Newer PostsOlder Posts »

Powered by WordPress