For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
| "use strict"; | |
| const net = require("net"); | |
| const port = 4000; | |
| var time, times = []; | |
| function now() { | |
| let hrtime = process.hrtime(); | |
| return hrtime[0] * 1e9 + hrtime[1]; | |
| } |
| <!-- test pass with CryptoJS v3.1.2 --> | |
| <script src="rollups/tripledes.js"></script> | |
| <script src="components/mode-ecb.js"></script> | |
| <script> | |
| /** | |
| * Encrypt message by DES in ECB mode and Pkcs7 padding scheme | |
| * | |
| * NOTE: DES is weak, please use 3DES(Triple DES) or AES | |
| * | |
| * @param {String} message |
| @startuml | |
| ' uncomment the line below if you're using computer with a retina display | |
| ' skinparam dpi 300 | |
| !define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> | |
| ' we use bold for primary key | |
| ' green color for unique | |
| ' and underscore for not_null | |
| !define primary_key(x) <b>x</b> | |
| !define unique(x) <color:green>x</color> | |
| !define not_null(x) <u>x</u> |
| ffmpeg -f lavfi -i anullsrc=r=11025:cl=mono -t <number of seconds> -acodec aac out.m4a |
data events spewing, call read() to pull data from source.read() will return undefined.data event listener will switch the Readable stream into "old mode", where data is emitted as soon as it is available rather than waiting for you to call read() to consume it. This requires you to handle backpressure problems manually.pipe method helps write less code and handles back-pressure.end listener and don't ever read() or pipe(), it'll never emit end.| var CryptoJS = require('crypto-js') | |
| var request = require('request-promise') | |
| /* | |
| * npm install crypto-js request-promise request | |
| * node wx_t1t_hack.js | |
| */ | |
| // export function testEncription(msg, fullKey) { | |
| // var fullKey = fullKey.slice(0, 16) |
| #!/usr/bin/env python2 | |
| # lrdcq | |
| # usage python2 unwxapkg.py filename | |
| import sys, os | |
| import struct | |
| class WxapkgFile(object): | |
| nameLen = 0 |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).