Create Backup & Write Image of SDCard

Create Backup
sudo dd if=/dev/sdXX of=~/sdcard.img
https://askubuntu.com/a/299090
 

Write Image to SDCard
sudo dd if=sdcard.img of=/dev/sdXX
https://askubuntu.com/a/119228

 

Advertisements

Download Video Youtube Long Hours

Ini ane cobanya di mozilla, untuk browser chrome dll silahkan menyesuaikan..

1. Install adds-on mozilla : Flash Video Downloader – Youtube HD Download [4K]
2. buka tutorial link:

http://www.wikihow.com/Download-YouTube-Videos

Using VLC Player

    1
    Use this method if you have VLC Player installed on your computer. VLC Player is a popular media player, and there's a good chance that you already have it installed. You can use VLC Player to access the actual video file on YouTube's servers, allowing you to download it directly to your computer.[1]
        You can install VLC Player for free from videolan.org. The program is open-source and free, and no one profits from you installing it.
        This method is recommended if you don't want to have to deal with ads, extensions, or the command line. The video will also download in the highest possible quality.
    2
    Copy the URL of the video you want to download. Go to the YouTube website and copy the address of the video you want to download. Make sure to copy the entire URL.
    3
    Open VLC Player. Once you have the URL copied, launch VLC Player.
    4
    Click the "Media" menu and select "Open Network Stream." This will open a new window.
    5
    Paste the YouTube video's URL into the field. Make sure the entire URL got copied.
    6
    Click "Play" to start streaming the video. The video will begin playing in VLC.
    7
    Click "Tools" and select "Codec Information." You can also press Ctrl/⌘ Command+J.
    8
    Right-click the text in the "Location" field at the bottom and click "Select All." This will select everything in the field.
    9
    Copy the selected text. Either right-click the selection and choose "Copy," or press Ctrl/⌘ Command+C.
    10
    Open a new browser tab and paste the copied text. This will load the video directly in your browser.
    11
    Right-click the video in your browser and select "Save video as." This will open the Save As window.
    12
    Give the video a name and select a location. By default, video will be named "videoplayback." You can change this to whatever you'd like and select where you want to save it.
    13
    Save the video. The video will be downloaded to your computer at the highest quality and saved to the location you specified.

Belajar Selenium Python-Java Eclipse di Ubuntu

Selenium itu bisa untuk AutoFill Form Web

Caranya:

1. Copy dan rename: selenium.sh

#!/bin/bash# Following the guide found at this page # http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html

echo "\r\nUpdating system ...\r\n" 
sudo apt-get update

# Create folder to place selenium in 
# echo "\r\nCreating folder to place selenium in ...\r\n" 
sudo mkdir ~/selenium cd ~/selenium

# Get Selenium and install headless Java runtime # 
echo "\r\nInstalling Selenium and headless Java runtime ...\r\n" 
sudo wget http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar 
sudo apt-get install openjdk-7-jre-headless -y 

# Install Firefox # 
echo "\r\nInstalling Firefox ...\r\n" sudo apt-get install firefox -y 

# Install headless GUI for firefox. 'Xvfb is a display server that performs graphical operations in memory' # 
echo "\r\nInstalling XVFB (headless GUI for Firefox) ...\r\n" 
sudo apt-get install xvfb -y 

# Finally, starting up Selenium server #
echo "\r\nStarting up Selenium server ...\r\n"DISPLAY=:1 xvfb-run java -jar ~/selenium/selenium-server-standalone-2.53.1.jar

source: https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c

2. di terminal ketikkan:

chmod +x selenium.sh

./selenium.sh

3. lihat prosessnya sampai keluar Selenium server running

4. untuk start stop server selenium

java -jar ~/selenium/selenium-server-standalone-3.0.1.jar
http://localhost:4444/selenium-server/driver?cmd=getLogMessages
http://localhost:4444/wd/hub/status
http://localhost:4444/selenium-server/driver?cmd=shutDownSeleniumServer

5. untuk testing di chrome, utk firefox belum tahu caranya

sudo apt-get install chromium-chromedriver

ketik di editor dan beri nama misal python_test.py

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome("/usr/lib/chromium-browser/chromedriver")

#driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()

silahkan tes di terminal

python python_test.py

6. Hasil pengujian:

selenium-server-standalone-2.53.1.jar SUPPORT => downgrade ke mozilla 45.0.2

link download mozilla deb: https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/

selenium-server-standalone-3.0.1.jar TIDAK SUPPORT MINT 17

 

source:

http://selenium-python.readthedocs.io
Configure Eclipse with Selenium WebDriver

Autokey – Keyboard Shortcuts

Layout keyboard laptop Anda dirasa kurang nyaman?

Seperti tombol Home-End yg bertumpuk dengan panah kiri/kanan, page up/page down, sehingga harus tekan ‘fn’ tiap kali butuh? Padahal gimana klo butuhnya sering, seperti untuk ngetik / coding dll ?

Solusinya: install Autokey

Lalu setting semisal seperti contoh:

screenshot

Screenshot-1.png

Jika ingin autorun: buka menu Startup Applications, lalu setting semisal :

screenshot-2

Selamat berkreasi.. ^^

 

Stop mysql from running at boot time?

To prevent mysql from starting on boot:

  1. Open the terminal: Ctrl+Alt+T
  2. Open the mysql.conf file: nano /etc/init/mysql.conf
  3. Comment out the “start on” line near the top of the file, the “start on” might be spread across two lines, so comment out both. (comment adding # at the beginning)

If you want to manually start mysql, use the following command:

service mysql start

sumber: http://askubuntu.com/a/57382

Sync Google Drive in Linux Mint -AND- Download Gmail Attachments & Emails to Google Drive

Berikut linknya :

Link Grive:
– install grive: https://mintguide.org/tools/11-install-grive-tools-14-in-ubuntu-and-linux-mint.html
– mount drive (brgkali diperlukan): https://community.linuxmint.com/tutorial/view/2051
– video setting grive: https://www.youtube.com/watch?v=HQ_z838UeoU
– How to Save your Gmail to Google Drive Automatically : http://www.labnol.org/internet/send-gmail-to-google-drive/21236/