Add syntax highlight for your code in blogspot.com

There a lots of JavaScript syntax highlight library available, I chose highlight.js which is quite simple and straight forward in my view; and easy enough to put into your blogspot.com.
Here is the steps:
Edit your blog's template HTML by paste following codes before the </head>

    <link href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/railscasts.min.css" rel="stylesheet"></link>
    <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
    <script>hljs.initHighlightingOnLoad();</script>

For your blog poster, use

<pre><code class="lang">code in lang ...</code></pre>

This is using the default language packs of highlight.js which support most common languages:
  • Apache 
  • Bash 
  • C# 
  • C++ 
  • CSS 
  • CoffeeScript 
  • Diff 
  • HTML
  • XML 
  • HTTP 
  • Ini 
  • JSON 
  • Java 
  • JavaScript 
  • Makefile 
  • Markdown 
  • Nginx 
  • Objective-C 
  • PHP 
  • Perl 
  • Python 
  • Ruby 
  • SQL

and railscasts color scheme. you can goto https://highlighjs.org to find more language and color scheme.


It is pretty simple, isn't it?

$5 VPS 对比

英文原文:  https://joshtronic.com/2017/02/14/five-dollar-showdown-linode-vs-digitalocean-vs-lightsaild-vs-vultr/  
中文摘要:  http://www.appinn.com/compare-linode-vs-digitalocean-vs-lightsail-vs-vultr/

对比了四家大牌 VPS 服务商

这四家服务器分别是:
对比了8个方面的性能; 最后, 推荐度为 Linode > DigitalOcean / Vultr > Amazon Lightsail。 现在 buyvm 的VPS也用了好几年了,是不是要考虑换换呢?

补充

看了原文下面的评论, 提到了 https://www.ovh.com/us/vps/ OVH VPN 看起来也不错。
微软的桌面版 Power BI 也是基于CEF开发的!
Windows统治客户端的年代 在Web大潮涌动近20年之后 几近结束。

Perl script to convert to x Based String


#/usr/bin/perl

use strict;
use warnings;
use constant DIV => 24;


my $v = shift or die "Usage: $0 ";

my $d = 0;
my $str = '';

do {
    my $c = chr(ord('A') + ($v % DIV));
    $str = $c . $str;
    $v = int($v / DIV)
} while ($v > 0);

print $str;

0;

Easy way to prevent from GFW DNS abusing

The easiest way to distinguish the GFW DNS abusing result from real DNS responses is using iptables to block the dummy DNS response by GFW

# iptables -t mangle -I PREROUTING -s 8.8.8.8/16 -m ttl --ttl-gt 63 -j DROP
# ip6tables -t mangle -I PREROUTING -s 2001:4860:4860::8844/112 -m hl --hl-gt 52 -j DROP