Mb to Gb data converter

mb to gb data converter - Memory Converter (Data Converter)

Common Memory Conversions

Convert Megabytes (MB) to…

  • 1 Megabyte (MB) = 1024 Kilobytes (KB)
  • 1 Megabyte (MB) = 0.001* Gigabytes (GB)

Convert Gigabytes (GB) to…

  • 1 Gigabyte (GB) = 1,048,576 Kilobytes (KB)
  • 1 Gigabyte (km) = 1,024 Megabytes (MB)
  • 1 Gigabyte (km) = 0.001* Terabyte (MB)

Convert Terabytes (TB) to…

  • 1 Terabyte (TB) = 1,024 Gigabytes (GB)
* Calculation to 3 decimal places

How to strip Image metadata in Ubuntu/Linux

How to strip Image metadata in Ubuntu/Linux
If you want to post some pictures but you’re worried that they might have metadata like location embedded in them, here’s how to strip that data out.

First, install exiftool using this command:

sudo apt-get install libimage-exiftool-perl

Then, go into the directory with the JPEG files. If you want to remove metadata from every file in the directory, use

exiftool -all= *

The exiftool will make copies, so if you had a file called image.jpg, when you’re done you’ll have image.jpg with all the metadata stripped plus a file called image.jpg_original which will still have the metadata.

Sometimes, it is a good idea to scrub EXIF metadata from photos before sharing them, and there is no better tool for the job than exiftool. The command below nukes all EXIF metadata in a photo in one fell swoop (replace foo.jpg with the actual file name):
exiftool -all= foo.jpg
This command removes EXIF metadata from the specified photo, but what if you need to process multiple photos? Then you can use the following command which cleans all the photos in the current directory:
for i in *.jpg; do echo "Processing $i"; exiftool -all= "$i"; done
Instead of purging all EXIF metadata from a photo, you can also remove individual fields. For example, the following command can come in handy when you need to remove geographical coordinates embedded in the photo:
exiftool -geotag= foo.jpg
And the command below can help you to remove geotags from multiple photos in one go:
for i in *.jpg; do echo "Processing $i"; exiftool -geotag= "$i"; done

Rezie image

mogrify * -quality 75 -resize "450x450" *

Upload Video Youtube From Command Line Python

Youtube menyediakan api untuk kita bisa manajemen video yang ada dalam chanel kita. Dengan Api ini memungkinkan untuk kita untuk terus bisa upload data video misalnya dengan menggunakan bahasa pemrograman apapun, salah satunya python.

Sebagai youtuber / publisher ads pemula, salah satu trik yang sering dipakai adalah dengan menembakkan video dari lokal dengan menggunakan perintah sesuai dengan video yang diupload. Ini akan menjadi automatik jika video yang kita upload merupakan hasil dari video yang kita download dengan menggabungkan beberapa video yang lain dan menguploadnya kembali sebagai video unik baru sebagai video monetize. Dan asyiknya itu kalo dah jalan kita tinggal pasang saja satu server, buat timer/schedule untuk stay up to date chanel kita. Ini akan menjadi bagus ketika model scrapping ini kita bisa terapkan dan tanpa kena suspend dari google.


Pastikan sudah terinstall git bash dan python versi 3, tutorial ada di grup https://www.facebook.com/groups/1631160323785934
  1. Download scriptnya di https://github.com/tokland/youtube-upload
  2. Unzip
  3. Buka git bash, lalu masukkan command : 

$pip install --upgrade google-api-python-client progressbar2
$python setup.py install 



untuk yang linux tinggal eksekusi saja di terminal

4. Jika sudah terinstall, coba dulu scriptnya work apa nggak, masukkan command : youtube-upload -h

5. Selanjutnya, buat oauth 2.0 file :
- masuk ke https://console.developers.google.com/
- buat project baru
- aktifkan API
- buat OAuth consent screen
- buat credentials, OAuth client id type other
- edit client_secrets.json  atau gunakan json hasil download letakkan dibagian /usr/local/share/youtube_upload/client_secrets.json atau posisi dimana letak client_secrets.json saat proses instalasi youtube_upload

6. Kita coba upload, buka git bash di folder tempat video berada, kemudian masukkan command sesuai keinginan, misal

Verifikasi dulu channel yg akan diupload videonya

TUNGGU PROSESNYA , hehe kadang kadang error juga

Jika sudah berhasil, akan ada pemberitahuan

Playlist akan otomatis jika sebelumnya belum pernah membuat di channel, coba kita cek


7. Kategori :
Film & Animation
Autos & Vehicles
Music
Pets & Animals
Sports
Short Movies
Travel & Events
Gaming
Videoblogging
People & Blogs
Comedy
Entertainment
News & Politics
Howto & Style
Education
Science & Technology
Movies
Anime/Animation
Action/Adventure
Classics
Documentary
Drama
Family
Foreign
Horror
Sci-Fi/Fantasy
Thriller
Shorts
Shows
Trailers

8. File credential biasanya ada di folder C:\Users\name\.youtube-upload-credentials.json  untuk yang linux bisa dilihat /home/user/.youtube-upload-credentials.json

Kalau mau upload di chanel lain, hapus file credential itu, atau buat baru, misal

youtube-upload --title="Virtual memori komputer" --description="komputer dengan virtual meory" --category="Science & Technology" --tags="Virtual Memory" --thumbnail "Screenshot_229.png" --privacy "Public" outputvideo_vIRTUALmEMORY.mp4


note : file .youtube-upload-credentials.json akan dibuatkan otomatis dari aktivitas upload yang kita lakukan, json yang perlu kita siapkan adalah client_secrets.json

How To Configure MySQL Allow Remote Access Connection

Hot To Configure MySQL Allow Remote Access Connection

1. You must create 
    set bind-address : /etc/my.cnf
    bind-address 0.0.0.0

    It will be set Database can allow from any network on IP4

2. Create user mysql for allowing that user can access remotely

    GRANT ALL PRIVILEGES ON *.* TO db_user @'10.10.151.30' IDENTIFIED BY 'db_passwd';
    [-] GRANT ALL PRIVILAGES : to manage privilage for db_user
    [-] *.*  : to allow db_user access any database and table can. It will be *.* --> [database].[spesific table]
    [-] db_user : user that will be create to have that privilage
    [-] @'10.10.151.30' : Source of Ip address user database. That's mean allowing connection from 10.10.151.30
    [-] IDENTIFIED BY 'db_passwd' : Create Password for db_user

3.  If you want to access from localhost too, it must create user from locahost access also
    ex :
        - GRANT ALL PRIVILEGES ON *.* TO db_user @'127.0.0.1' IDENTIFIED BY 'db_passwd';
        OR
        - GRANT ALL PRIVILEGES ON *.* TO db_user @'localhost' IDENTIFIED BY 'db_passwd';

4. To close the vulnerability, cause this will be allow connection from any host. Create Firewall for Drop anythings come to port Mysql(3306) and than allow specified IP Address to access from remote.
    ex :
               
        - DROP ALL Connection to port 3307 (this case database working with port 3307)
            $sudo /sbin/iptables -A INPUT -p tcp --dport 3307 -j DROP

        - ACCEPT Specified address to acces port 3307 from network
           
            $sudo /sbin/iptables -A INPUT -p tcp -d 10.10.70.3 --dport 3307 -j ACCEPT
            $sudo /sbin/iptables -A INPUT -p tcp -s 10.10.70.3 --dport 3307 -j ACCEPT
            $sudo /sbin/iptables -A INPUT -p tcp -d 10.10.151.30 --dport 3307 -j ACCEPT
            $sudo /sbin/iptables -A INPUT -p tcp -s 10.10.151.30 --dport 3307 -j ACCEPT

    if you not familiar with iptables you can used

    *) another complate set iptables;
        Even you can allow outgoing MySql client request (made via mysql command line client or perl/php script), from firewall host 202.54.1.20 as follows:           
            $iptables -A OUTPUT -p tcp -s 202.54.1.20 --sport 1024:65535 -d 0/0 --dport 3306 -m state --state NEW,ESTABLISHED -j ACCEPT
            $iptables -A INPUT -p tcp -s 0/0 --sport 3306 -d 202.54.1.20 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT

           
    *) another way to use ufw (Uncomplicated Firewall) command :
            $sudo ufw allow 3306
            ## only allow subnet 192.168.1.0/24 to connect to our mysql server ##
            $sudo ufw allow from 192.168.1.0/24 to any port 3306

       
5. Enjoyed! Just like that


F.A.Q :

How Do I Grant Access To An Existing Database?

Let us assume that you are always making connection from remote IP called 202.54.10.20 for database called webdb for user webadmin, To grant access to this IP address type the following command At mysql> prompt for existing database, enter:
mysql> update db set Host='202.54.10.20' where Db='webdb';
mysql> update user set Host='202.54.10.20' where user='webadmin';


Some Referece :
- https://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
- https://www.cyberciti.biz/tips/linux-iptables-18-allow-mysql-server-incoming-request.html
- https://www.percona.com/doc/percona-xtrabackup/2.3/howtos/enabling_tcp.html

Short Cut keyboard tmux & screen cheat-sheet




A comparison of the features (or more-so just a table of notes for accessing some of those features) for GNU screen and BSD-licensed tmux.

The formatting here is simple enough to understand (I would hope). ^ means ctrl+, so ^x is ctrl+x. M- means meta (generally left-alt or escape)+, so M-x is left-alt+x
It should be noted that this is no where near a full feature-set of either group. This - being a cheat-sheet - is just to point out the most very basic features to get you on the road.
Trust the developers and manpage writers more than me. This document is originally from 2009 when tmux was still new - since then both of these programs have had many updates and features added (not all of which have been dutifully noted here).
Action tmux screen
start a new session tmux OR
tmux new OR
tmux new-session
screen
re-attach a detached session tmux attach OR
tmux attach-session
screen-r
re-attach an attached session (detaching it from elsewhere) tmux attach -d OR
tmux attach-session -d
screen -dr
re-attach an attached session (keeping it attached elsewhere) tmux attach OR
tmux attach-session
screen -x
detach from currently attached session ^b d OR
^b :detach
^a ^d OR
^a :detach
rename-window to newname ^b , OR
^b :rename-window
^a A
list windows ^b w ^a w
list windows in chooseable menu ^a "
go to window # ^b # ^a #
go to last-active window ^b l ^a ^a
go to next window ^b n ^a n
go to previous window ^b p ^a p
see keybindings ^b ? ^a ?
list sessions ^b s OR
tmux ls OR
tmux list-sessions
screen -ls
toggle visual bell ^a ^g
create another window ^b c ^a c
exit current shell/window ^d ^d
split window/pane horizontally ^b " ^a S
split window/pane vertically ^b % ^a |
switch to other pane ^b o ^a
kill the current pane ^b x OR (logout/^D)
collapse the current pane/split (but leave processes running) ^a X
close other panes except the current one ^b !
cycle location of panes ^b ^o
swap current pane with previous ^b {
swap current pane with next ^b }
show time ^b t
show numeric values of panes ^b q
toggle zoom-state of current pane (maximize/return current pane) ^b z
break the current pane out of its window (to form new window) ^b !
re-arrange current panels within same window (different layouts) ^b [space]

ref : http://maleah.dayid.org/comp/tm.html