Content is where I expect much of the real money will be made on the Internet, just as it was in broadcasting.

The television revolution that began half a century ago spawned a number of industries, including the manufacturing of TV sets, but the long-term winners were those who used the m......

-- 阅读剩余部分 --

git log --pretty=format:"%cn made a commit %h on %ad - %s" --date=short

关于grep,如果要反向匹配,就是说,不含有某个字符,用grep -v

If you look at it tells you that after installing @vue/cli-service ( which may be part of the standard CLI installation ) then vue-cli-service is available in npm scripts, but that if you want to access it directly then you need to use ./node_modules/.bin/vue-cli-service This worked for me, and I guess you could add ./node_modules/.bin to your $PATH if you were so inclined.

-- 阅读剩余部分 --

Title: How to verify json web token (jwt) signature by using PHP native functions?

class Jsonwebtoken()
   public static function verify(string $token)
        /**应该学习firebase jwt lib,做大量错误处理 */
        $tokenParts = explode('.', $token);
        list($headb64, $bodyb64, $cryptob64) = $tokenParts;

        /** both work */
        $pubKey = openssl_get_publickey('file://'.__DIR__.'/');
        // $pubKey = file_get_contents(__DIR__.'/');

        $signature = self::urlsafeB64Decode($cryptob64); // from Google Firebase JWT lib

        $isVerified = openssl_verify("$headb64.$bodyb64", $signature, $pubKey, OPENSSL_ALGO_SHA256);

        return $isVerified === 1; // openssl_verify return value is int

     * Decode a string with URL-safe Base64.
     * @param string $input A Base64 encoded string
     * @return string A decoded string
    public static function urlsafeB64Decode(string $input)
        $remainder = strlen($input) % 4;
        if ($remainder) {
            $padlen = 4 - $remainder;
            $input .= str_repeat('=', $padlen);
        return base64_decode(strtr($input, '-_', '+/'));

-- 阅读剩余部分 --

$my_array = array("Dog","Cat","Horse");

list($a, $b, $c) = $my_array;
echo "I have several animals, a $a, a $b and a $c.";
// I have several animals, a Dog, a Cat and a Horse.

这个函数有点意思, 和ES6里面的 ...Array有点像。

-- 阅读剩余部分 --