June 19, 2015

a new Mint 17


  1. Software Manager
  2. ScreenShot, Gpaste 2, Sticky Notes, Screensaver Inhibitor, Timer w Notification
  3. edit fstab
    sudo blkid    # for UUID
    sudo gedit /etc/fstab
    
  4. packages...
    wget https://gist.githubusercontent.com/bcchenbc/cd97144714a89d6dd69e/raw/aaaac1e2f76fcbcf44137f9acece357d7214bb00/install_packages.sh
    chmod +x install_packages.sh
    ./install_packages.sh
    
  5. zsh
    curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
    # ZSH_THEME="jreese" in .zshrc
    nano .zshrc
    chsh -s /bin/zsh
    
  6. latex
    # http://www.tug.org/texlive/quickinstall.html
    # http://mirror.ctan.org/systems/texlive/Images/
    sudo furiusisomount
    # mount texlive iso file
    ./install-tl
    # add "/usr/local/texlive/2015/bin/x86_64-linux" to PATH
    
  7. JRE
    # https://sites.google.com/site/easylinuxtipsproject/java#TOC-Install-JRE-64-bit-
    # https://java.com/en/download/linux_manual.jsp
     sudo mkdir -p -v /opt/java/64
     cd Downloads && tar xvzf ~/Downloads/jre-8u45-linux-x64.tar.gz
     sudo mv -v ~/Downloads/jre1.8.0_45 /opt/java/64
     sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/jre1.8.0_45/bin/java" 1
     sudo update-alternatives --set java /opt/java/64/jre1.8.0_45/bin/java
     mkdir -v ~/.mozilla/plugins
     sudo apt-get remove icedtea-6-plugin && sudo apt-get remove icedtea-7-plugin
     rm -v ~/.mozilla/plugins/libnpjp2.so
     ln -s /opt/java/64/jre1.8.0_45/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
    # uncheck "Keep temporary file..." in "General", [Settings...]
     /opt/java/64/jre1.8.0_45/bin/ControlPanel
    

June 17, 2015

Add code blocks to Blogger

Credit goes to: http://shanhua0131.blogspot.com/2014/01/code.html
Reference: https://code.google.com/p/google-code-prettify/wiki/GettingStarted

1. Use [Edit HTML] in "Template" to add following line into the header.
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script> 2. Then, go "Template", [Customize], [Advanced], [Add CSS] to paste following codes, and click [Apply to Blog]
.post .prettyprint { 
  display: block; /* fixes a strange ie margin bug */
  font-family: Courier New; 
  font-size: 10pt; 
  overflow:auto; 
  background: #f0f0f0 url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAASwCAYAAAAt7rCDAAAABHNCSVQICAgIfAhkiAAAAQJJREFUeJzt0kEKhDAMBdA4zFmbM+W0upqFOhXrDILwsimFR5pfMrXW5jhZr7PwRlxVX8//jNHrGhExjXzdu9c5IiIz+7iqVmB7Hwp4OMa2nhhwN/PRGEMBh3Zjt6KfpzPztxW9MSAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzB8HS+J9kUTvzEDMwAAAABJRU5ErkJggg==) left top repeat-y;
  border: 1px solid #ccc;
  padding: 10px 10px 10px 21px;
  max-height:200px;
  line-height: 1.2em;
}

As the result, codes will be prettified by the script when encapsulated by
<pre class="prettyprint"> def example: codes = here </pre> In some cases: <xmp class="prettyprint"> <some codes="" with=""> <html like="" tags=""> </html></some> <|xmp> (Note the slash need to be changed. It was replaced by vertical bar here for displaying purpose. For more detail, see this)