This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl s_client -showcerts -verify 5 -connect wikipedia.org:443 < /dev/null | | |
awk '/BEGIN CERTIFICATE/,/END CERTIFICATE/{ if(/BEGIN CERTIFICATE/){a++}; out="cert"a".pem"; print >out}' | |
for cert in *.pem; do | |
newname=$(openssl x509 -noout -subject -in $cert | sed -nE 's/.*CN ?= ?(.*)/\1/; s/[ ,.*]/_/g; s/__/_/g; s/_-_/-/; s/^_//g;p' | tr '[:upper:]' '[:lower:]').pem | |
echo "${newname}"; mv "${cert}" "${newname}" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unbuntu 22.04 has open ssl3, incomptabile with dotnet restore and outdated servers | |
create manually, with 40gb hard drive; default of 12 is much too small | |
20.04 works much better | |
npm set cafile... | |
use firefox to extract certs | |
extract certs in CRT single cert format (not chain), rename to .crt, copy to /usr/local/share/ca-certificates, update-ca-certificates | |
apt install i3 | |
apt install xfce4-terminal | |
enhanced session is /etc/xrdp/startunbuntu.sh -- export TERMINAL=xfce4-terminal, exec /usr/bin/i3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Watch for Kubernetes pod completion and display log; useful for watching output of cronjobs | |
# | |
# Usage: klogsw <pod-prefix|cronjob-name> | |
# | |
kubectl get pods -w | | |
grep --line-buffered "$1.*Completed" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Needs ES6 promise/async | |
// | |
// usage: | |
// env AZURE_SERVICEBUS_CONNECTION_STRING='...' node main.js | |
// | |
import * as azure from "azure"; | |
const TOPIC = 'the topic'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as bunyan from "bunyan"; | |
let levelMap:{[key: number]: number} = { | |
[bunyan.TRACE]: 0, | |
[bunyan.DEBUG]: 0, | |
[bunyan.INFO]: 1, | |
[bunyan.WARN]: 2, | |
[bunyan.ERROR]: 3, | |
[bunyan.FATAL]: 4 | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
var glob = require('glob'); | |
var webpack = require('webpack'); | |
var PROD = (process.env.NODE_ENV === 'production') | |
module.exports = { | |
devtool: PROD ? 'cheap-module-source-map' : 'source-map', | |
context: path.resolve(__dirname, 'src'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Update a foreign key column with an inserted identity column from another table, without using cursors. | |
-- The example scenario: update an existing set of orders with newly created tracking numbers. | |
drop table #order | |
drop table #tracking_number | |
drop table #output |