Thursday, June 23, 2016

#blender cube over video

The top track is a 3D scene, while the underlaying track is a video clip.

Sunday, June 12, 2016

Chairman Mao (4) - Stir fried julienne potato with vinegar and chilli

  • Stir fried julienne potato with vinegar and chilli 
  • Pickled radish with chili (appetiser)
  • Xiang Quan / fine spirit from Hunan Province

Thursday, June 02, 2016

Ubuntu / Website design Frameworks / GCP Tools / Useful commands

Since throwing in the towel on operating a LAMP web server and pure HTML back in 2006, I've been using the cloud and Blogger purely exclusively, as there were benefits to this move (like not needing to deal with bare metal). Blogger has lots of templates and flexibility to customize site design. It is CMS based and user maintainable without the need for web geeks, making it relatively simple to hand over. Best of all the sites are alive, and changes propagate to people who subscribe to feeds.

Recently (2016) one thing lead to another and I got into Google Cloud Platform (GCP). The years between 2006 and 2016 were my server capability gap years. Now with GCP I got my server capability back, but cloud based which is even better than ever.

After playing around with my first hand carved GCP website based on one simple HTML file, it is not long until the first client walked in the door (it was a friend who got my story and shared my excitement). It is at that point that recent whispers from my peers started to echo in my head more loudly -- responsive, responsive, responsive. Within a day or two I did a bit of research and got into responsive frameworks. I did a read-up about skeleton, google web fundamentals, material design light (MDL), and codepen. I chose to run with MDL and codepen.

Blogger website tools:
HTML CSS tools
GCP tools
Notes for GCP web server setup:
  1. click to setup a vm instance
  2. click SSH to open terminal
  3. sudo apt-get update
  4. sudo apt-get install apache2
GCP file upload via SSH command terminal:
  • click SSH to open terminal
  • click cog (upper right corner), select Upload file, select local gzip file
  • see file: ls
  • move file into directory: mv myfile.tar.gz var/www/html/archive
  • change directory: cd var/www/html/archive
  • see file: ls
  • extract gzip verbose file structure : tar -xzvf myfile.tar.gz
  • see files: ls
  • delete ter : rm myfile.tar.gz
  • change directory: cd myfile
  • see files: ls
  • change directory: cd ../../../../..
  • run my deploy script:
    sudo sh 1.sh
    (which contains the following commands)
    sudo rm -r /var/www/html/*
    sudo cp -r /home/GOOGLEUSERNAME/var/www/html/* /var/www/html
Ubuntu misc commands:
  • sudo nano /etc/apache2/apache2.conf
  • sudo /etc/init.d/apache2 restart
  • rm -r {delete folder, much faster than with file manager}
Ubuntu system maintenance commands:
  • sudo apt upgrade {to update system}
  • sudo reboot
  • sudo apt-get clean {deletes download cache}
  • sudo apt-get autoremove {uninstall not needed packages}
Ubuntu desktop useful commands:
  • nmap -p 80 192.168.0.*
    to network scan LAN neighborhood for port 80 web servers
Notes for file manager remote folders

  1. Open gnome-terminal
  2. ssh-keygen -t rsa -f ~/.ssh/my-ssh-key -C [googleusername]
  3. Restrict access to keys
    chmod 400 ~/.ssh/my-ssh-key
  4. Go to the metadata page for your project and copypaste pub key
    SUPER IMPORTANT: Metadata tab is to stay empty, but click onSSH Keys tab, and your locallly made pub key to the bottom of the list of google generated keys.
  5. Open Nautilus, connect to server as
    sftp://[googleusername]@[yourgcpserverIPaddress]
Ubuntu wifi workaround for desktop (fixes home connection issue, cause unknown, not sure if this actually works yet):
Domain stuff: