I hereby claim:
- I am maxp on github.
- I am mpenzin (https://keybase.io/mpenzin) on keybase.
- I have a public key whose fingerprint is C086 D0BB A73A 97D5 B486 C516 F5F1 67A9 3283 443B
To claim this, I am signing this object:
;; | |
;; mlib: run proccessing loop in separate thread | |
;; | |
(ns mlib.thread | |
(:require | |
[clojure.core.async :refer [thread <!!]])) | |
; | |
(defn- thread-loop [state' init step cleanup] |
/** | |
openssl req -newkey rsa:2048 -nodes -batch -utf8 -keyout keytemp.pem -x509 -days 365 -out cert.pem \ | |
-subj "/C=GB/ST=London/L=London/O=Global Security/OU=IT Department/CN=example.com" | |
openssl rsa -in keytemp.pem -out key.pem | |
*/ | |
node -e "console.log(require('crypto').randomBytes(20).toString('hex'))" |
openssl req -utf8 -sha256 -out ${NAME}.csr -new -newkey rsa:2048 -nodes -keyout ${NAME}.key | |
https://www.openssl.org/docs/man1.0.2/apps/openssl-req.html | |
openssl req -nodes -newkey rsa:2048 -keyout example.key -out example.csr \ | |
-subj "/C=GB/ST=London/L=London/O=Global Security/OU=IT Department/CN=example.com" \ | |
-batch -utf8 | |
-config "file" |
// | |
// https://hackernoon.com/graceful-shutdown-in-nodejs-2f8f59d1c357 | |
// | |
const express = require('express'); | |
const mongoose = require('mongoose'); | |
const app = express(); | |
app.use(express.urlencoded({extended: true})); | |
app.use(express.json()); |
#!/bin/sh | |
# https://medium.com/@cjus/handy-docker-aliases-4bd85089a3b8 | |
alias dm='docker-machine' | |
alias dmx='docker-machine ssh' | |
alias dk='docker' | |
alias dki='docker images' | |
alias dks='docker service' | |
alias dkrm='docker rm' |
let addrs = new Set() | |
// avoid while(true) {} loops | |
for(let bi = getReasonalbeStartingBlockIndex(); bi > 0; bi--) { | |
let block = await web3.eth.getBlock(bi) | |
if(stopCondition(block)) { | |
// block.timestamp < START_TIME | |
break; | |
} |
type MyTime struct { | |
time.Time | |
} | |
func (self *MyTime) UnmarshalJSON(b []byte) (err error) { | |
s := string(b) | |
// Get rid of the quotes "" around the value. | |
// A second option would be to include them | |
// in the date format string instead, like so below: |
function isObject(obj) { | |
return obj !== null && typeof obj === 'object'; | |
} | |
const isArray = Array.isArray; | |
function isPlainObject(obj) { | |
return isObject(obj) && ( | |
obj.constructor === Object // obj = {} | |
|| obj.constructor === undefined // obj = Object.create(null) |
I hereby claim:
To claim this, I am signing this object: