For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
var request = require('request-promise'); | |
var co = require('co'); | |
var fs = require('fs'); | |
var cheerio = require('cheerio'); | |
var dateFormat = require('dateformat'); | |
var usernames = ['jd615645', 'jayhung97724']; | |
var fcc_info = []; |
function byteArrayToWordArray(ba) { | |
var wa = [], | |
i; | |
for (i = 0; i < ba.length; i++) { | |
wa[(i / 4) | 0] |= ba[i] << (24 - 8 * i); | |
} | |
return CryptoJS.lib.WordArray.create(wa, ba.length); | |
} |
let moment = require('moment'); | |
let cheerio = require('cheerio'); | |
let async = require('asyncawait/async'); | |
let await = require('asyncawait/await'); | |
let rp = require('request-promise'); | |
const URL = 'https://npm.cpami.gov.tw/bed_1.aspx'; | |
const getASPState = () => { | |
return new Promise( (resolve, reject) => { |
function makeObjectIterable (foo) { | |
foo[Symbol.iterator] = function* () { | |
yield* Object.keys(foo).map(function (name) { | |
return [name, foo[name]] | |
}) | |
} | |
return foo | |
} | |
Note: "Forked" from Latency Numbers Every Programmer Should Know
Event | Nanoseconds | Microseconds | Milliseconds | Comparison |
---|---|---|---|---|
L1 cache reference | 0.5 | - | - | - |
Branch mispredict | 5.0 | - | - | - |
L2 cache reference | 7.0 | - | - | 14x L1 cache |
Mutex lock/unlock | 25.0 | - | - | - |
Javascript thinks you should know to make sure you understand nodejs properly
sudo eopkg install -y git | |
sudo eopkg install -y atom | |
sudo eopkg it gnome-tweak-tool | |
apm install color-picker file-icons minimap | |
apm install linter-csslint linter-eslint linter-js-yaml | |
sudo eopkg it -y neofetch | |
sudo eopkg bi --ignore-safety https://raw.githubusercontent.com/solus-project/3rd-party/master/network/web/browser/google-chrome-stable/pspec.xml | |
sudo eopkg it -y google-chrome-*.eopkg;sudo rm google-chrome-*.eopkg |
#!/bin/bash | |
echo "Starting Windows configuration" | |
WIN_USERPATH=$(wslpath $(wslvar USERPROFILE)) | |
WIN_OBSIDIAN=$WIN_USERPATH/Documents/obsidian | |
WIN_VAULTSDIR=$WIN_OBSIDIAN/vaults | |
WSL_OBSIDIAN=~/obsidian | |
if [ ! -d "$WIN_VAULTSDIR" ]; then |
""" | |
stable diffusion dreaming | |
creates hypnotic moving videos by smoothly walking randomly through the sample space | |
example way to run this script: | |
$ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry | |
to stitch together the images, e.g.: | |
$ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4 |