Posts

Showing posts with the label share

Sharing Internet with the BeagleBone Black over its usb network interface

Here is the scenario: * My Ubuntu computer has access to the Internet through wifi (wlan0). * I connect my BeagleBone Black to my host computer using the usb cable, and the usb network is on. * The ip addresses of the usb network connection are: + Ubuntu computer: 192.168.7.1 + BeagleBone Black: 192.168.7.2 * But when I log into the BBB, it cannot go out to the Internet. So, I will attempt to share my Ubuntu's wifi connection to the BBB via the usb network connection: 1. SSH to the BBB: ssh debian@192.168.7.1 2. In the BBB console type the following: sudo ifconfig usb0 192.168.7.2 sudo route add default gw 192.168.7.1 3. In the linux console of host system (Ubuntu) type: sudo su #wlan0 is my internet facing interface, eth1 is the BeagleBone USB connection ifconfig eth1 192.168.7.1 iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE iptables --append FORWARD --in-interface eth1 -j ACCEPT echo 1 > /proc/sys/net/ipv4/ip_forw...

How to embed pdf files into your blog (Blogger, WordPress...)

Image
To embed a pdf file into your Blogger or WordPress blog just follow these following steps: 1. Upload the pdf file to Google Drive 2. Set the sharing option of that file to Public (Everyone with the link can View) 3. Click "Get Link" to get the ID of the pdf file. For example: https://drive.google.com/open?id= 0B5ND3Z6x0cw8MkJTV21DNjZUeVk &authuser=0 4. In your blog, insert this iframe with the ID of your pdf file, for example: <iframe height="600px" src="https://docs.google.com/viewer?srcid= 0B5ND3Z6x0cw8MkJTV21DNjZUeVk &amp;pid=explorer&amp;efh=false&amp;a=v&amp;chrome=false&amp;embedded=true" width="100%"></iframe>

Google Drive API - Feeling the openness of Google

I'm currently working on a project that need to migrate all my organization documents (of all users) which hosted on Google App to a new domain (also on Google App) So, the process is: 1. Using a Service Account of the old domain to read all files and folders of all user in the old domain along with their current sharing permissions. 2. For each file / folder, share with the relevant new accounts in the new domain. 3. In the new domain, make a copy of each shared file / folder by another Service Account of this new domain. 4. Apply the old sharing permissions to the same file in the new domain. 5. In the old domain, remove shared permissions to new domain accounts. Service Account is a special account used by the application (this) with the domain-wide privileges. It can manipulate all files and folders of all accounts in the domain. ( https://developers.google.com/drive/delegation ) I've just played around with the api documentations and have some utility func...