openssl x509 -text -noout -in $FILE
openssl req -text -noout -in $FILE
const fs = require('fs'); | |
const path = require('path'); | |
const chalk = require('chalk'); | |
const walk = require('fs-walk'); | |
function transform(fileContent) { | |
const result = fileContent; | |
if (!fileContent.includes('angular.module')) { | |
return result; |
A Note from kestas.kuliukas.com rewritten using arrow function/const.
const fact = (n) => n === 1 ? 1 : n*fact(n-1)
fact
functionconst makeFact = givenFact => n => n === 1 ? 1 : n*givenFact(n-1)
# install postgresql 10 | |
brew upgrade postgresql | |
# Check version by `brew list --versions postgres` | |
export OLD_POSTGRES_VERSION=9.6.5; | |
export NEW_POSTGRES_VERSION=10.0; | |
# Stop postgresql service | |
brew services stop postgresql |
Add Unicode Codepoint mapping alongside the ideograph in Table of General Standard Chinese Characters (通用规范汉字表)
Run the snippet in the console when opening 通用规范汉字表.
$(".mw-parser-output dl dd").each(function(){$(this).append(`<small style="margin-left:1rem"><code>U+${$(this).text().replace(/[\d\s]+/i, "").codePointAt(0).toString(16).toUpperCase()}</code></small>`)})
#!/bin/sh | |
openssl_version=1.1.0g | |
nginx_version=1.12.2 | |
zlib_version=1.2.11 | |
pcre_version=8.41 | |
wget -O- https://ftp.pcre.org/pub/pcre/pcre-$pcre_version.tar.bz2 | tar -xjvf - |
# $1: The application name | |
echo `system_profiler -xml SPApplicationsDataType | xmllint --xpath \ | |
"//dict[string='$1']/key[.='version']/following-sibling::*[1]/text()" -` |
{"sig":"a5a638c14ba35a75f201dfb094a56c1927af11eec7f82910def125d098d7b3e236475a15475ac159d127fad468499ff2335de5cd61a6c785059f89fee83a0d790","msghash":"7e85b2fe5994bd57d9557aad4b766abb72f8648ce27893c63c71a5b5094794fe"} |
require("jest-preset-angular"); | |
test.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])( | |
'.add(%i, %i)', | |
(a, b, expected) => { | |
expect(a + b).toBe(expected); | |
}, | |
); | |
describe.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])( |