Copy / Backup foto / video dari Instagram

10 May

Copy foto / video dari Instagram

Ada kalanya kita membutuhkan, atau mau melakukan backup dari foto / video dari Instagram.
Hal ini sangat mudah dilakukan dengan menggunakan phyton

1. install
C:\Users\SEAG>pip install instagram-scraper
Collecting instagram-scraper
Downloading instagram-scraper-1.3.1.tar.gz
Requirement already satisfied: requests>=1.0.4 in d:\anaconda3\lib\site-packages (from instagram-scraper)
Collecting tqdm>=3.8.0 (from instagram-scraper)
Downloading tqdm-4.11.2-py2.py3-none-any.whl (46kB)
100% |████████████████████████████████| 51kB 1.2MB/s
Collecting requests_mock (from instagram-scraper)
Downloading requests_mock-1.3.0-py2.py3-none-any.whl
Requirement already satisfied: nose in d:\anaconda3\lib\site-packages (from instagram-scraper)
Requirement already satisfied: six in d:\anaconda3\lib\site-packages (from requests_mock->instagram-scraper)
Building wheels for collected packages: instagram-scraper
Running setup.py bdist_wheel for instagram-scraper … done
Stored in directory: C:\Users\SEAG\AppData\Local\pip\Cache\wheels\3f\99\f3\4db390c41593f8ef5a4a2a82bd2fec3cec
Successfully built instagram-scraper
Installing collected packages: tqdm, requests-mock, instagram-scraper
Successfully installed instagram-scraper-1.3.1 requests-mock-1.3.0 tqdm-4.11.2

2. test untuk mengambil suatu account
C:\Users\SEAG>instagram-scraper setijo
Searching setijo for profile pic: 100% 1/1 [00:00<?, ? images/s]
Searching setijo for posts: 581 media [00:39, 18.79 media/s]
Downloading: 100%|██████████████████████████████████████████████████████████| 582/582 [01:49instagram-scraper –tag ubsgold
Searching #ubsgold for posts: 963 media [00:51, 18.56 media/s]
Downloading: 100%|██████████████████████████████████████████████████████████| 963/963 [03:44<00:00, 1.13it/s]

4. ingin lebih jelas ini link nya
https://github.com/rarcega/instagram-scraper

Advertisements

Raspberry Pi : ntp client

26 Apr

root@turnstile4:~# nano /etc/ntp.conf
driftfile /var/lib/ntp/ntp.drift
server 172.20.33.42
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1

root@turnstile4:~# /etc/init.d/ntp restart
[ ok ] Stopping NTP server: ntpd.
[ ok ] Starting NTP server: ntpd.
root@turnstile4:~# ntpq
ntpq> pe
remote refid st t when poll reach delay offset jitter
==============================================================================
172.20.33.42 149.20.64.28 2 u 4 64 1 1.279 2011.39 0.001
ntpq> exit

zimbra : Failed to start slapd. Attempting debug start to determine error.

20 Apr

Pagi itu, salah satu server harus direstart karena superlemot, tentunya setelah dicoba untuk “di oprak aprik”, lha kok pas mau menghidupkan zimbra ada seperti ini :


[zimbra@ubsweb ~]$ zmcontrol start
Host ubslinux.com
Starting ldap…Done.
Failed.
Failed to start slapd. Attempting debug start to determine error.
58f584fe daemon: getaddrinfo() failed: Name or service not known


Tanya – tanya ke google, dan dicoba – coba kok tetap tidak bisa, malahan saya ketemu cara sendiri, yaitu karena kegagalan nslookup. Sebagai akibat karena setting DNS (wkkk….wkkkk…)


[root@ubsweb ~]# nano /etc/resolv.conf
# Generated by NetworkManager
search localdomain
nameserver 172.20.33.42

[root@ubsweb ~]# /etc/init.d/named restart
Stopping named: . [ OK ]
Starting named: [ OK ]
[root@ubsweb ~]# nslookup ubslinux.com
Server: 172.20.33.42
Address: 172.20.33.42#53

Name: ubslinux.com
Address: 172.20.33.42


Ulangi lagi zimbra start


[zimbra@ubsweb ~]$ zmcontrol start
Host ubslinux.com
Starting ldap…Done.
Starting zmconfigd…Done.
Starting logger…Done.
Starting mailbox…Done.
Starting memcached…Done.
Starting proxy…Done.
Starting amavis…Done.
Starting antispam…Done.
Starting antivirus…Done.
Starting opendkim…Done.
Starting snmp…Done.
Starting spell…Done.
Starting mta…Done.
Starting stats…Done.
Starting service webapp…Done.
Starting zimbra webapp…Done.
Starting zimbraAdmin webapp…Done.
Starting zimlet webapp…Done.

[zimbra@ubsweb ~]$ zmcontrol status
Host ubslinux.com
amavis Running
antispam Running
antivirus Running
ldap Running
logger Running
mailbox Running
memcached Running
mta Running
opendkim Running
proxy Running
service webapp Running
snmp Running
spell Running
stats Running
zimbra webapp Running
zimbraAdmin webapp Running
zimlet webapp Running
zmconfigd Running


 

Install Rocket.chat di centos 7

23 Mar

1. update centos 7
yum -y install epel-release nano && yum -y update

2. instll mongodb
nano /etc/yum.repos.d/mongodb-org.repo
[mongodb-org-3.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc

yum install -y nodejs curl GraphicsMagick npm mongodb-org-server mongodb-org gcc-c++
npm install -g inherits n

3. install node
n 4.5

4. install rocket-chat
cd /opt
curl -L https://rocket.chat/releases/latest/download -o rocket.chat.tgz
tar zxvf rocket.chat.tgz
mv bundle Rocket.Chat
cd Rocket.Chat/programs/server
npm install
cd ../..

5. test rocket-chat
export PORT=3000
export ROOT_URL=http://172.20.33.43:3000/
export MONGO_URL=mongodb://localhost:27017/rocketchat

chkconfig mongod on
systemctl start mongod

node main.js

6. create auto start
nano /usr/lib/systemd/system/rocketchat.service
[Unit]
Description=The Rocket.Chat server
After=network.target remote-fs.target nss-lookup.target nginx.target mongod.target
[Service]
ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rocketchat
User=root
Environment=MONGO_URL=mongodb://localhost:27017/rocketchat ROOT_URL=http://172.20.33.43:3000/ PORT=3000
[Install]
WantedBy=multi-user.target

systemctl enable rocketchat.service
systemctl start rocketchat.service

Rocket Chat

15 Nov

Rocket Chat bisa menjadi jawaban bagi yang membutuhkan aplikasi yang dapat menangani seluruh komunikasi antar tim/perusahaan. Kenapa?

  1. Karena menggunakan email untuk berkomunikasi antar team dirasa sudah terlalu kaku, dan ribet pengarsipannya dan membutuhkan waktu yang lama, terlebih jika email ada attachment file nya.
  2. Di lain hal, menggunakan chat bakal lebih cepat untuk berkomunikasi antar team, tapi fiturnya chat saja, plus susah untuk mencari hal-hal penting di chat.

Rocket Chat = Email + Chat

Apa yang membedakan dengan sistem chat lainnya ?
Dengan menggunakan Rocket Chatchat client dengan pengguna yang diajak berkomunikasi fokus pada rekan kelompok / team. Dalam aplikasi ini, admin grup yang memiliki akses untuk menambahkan anggota. Dengan adanya Rocket Chat ini, koordinasi tidak terganggu oleh chat pribadi maupun kelompok yang lain sehingga apa yang dibahas bisa lebih fokus.

picture1

mau install ??
https://www.vultr.com/docs/how-to-install-rocket-chat-on-centos-7

full backup & restore mysql (linux)

14 Apr

1. backup
mysqldump -u root -p –all-databases > alldb_backup.sql

2. copy to traget
ftp 172.20.33.142
Name (172.20.33.142:root): oracle
Password:
ftp> put alldb_backup.sql
ftp> bye

3. remote
ssh root@172.20.33.142
root@172.20.33.142’s password:

4. restore
cd /home/oracle
mysql -u root -p  < alldb_backup.sql
Enter password:

RASPBERRY PI : Setting apache & PHP

14 Oct

=================================================================================
RASPBERRY PI : Setting apache & PHP
=================================================================================
pi@raspberrypi ~ $ sudo apt-get install apache2 apache2-doc apache2-utils

sudo apt-get update
sudo apt-get upgrade

apt-get install php5-mysql
apt-get install mysql-server mysql-client
sudo nano /var/www/phpinfo.php

<?php
phpinfo();
?>