Local Mongo replication
Find mongod.conf
mongosh
db.serverCmdLineOpts()
Local Mongo replication
Find mongod.conf
mongosh
db.serverCmdLineOpts()
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>SVG with border radius</title> | |
</head> | |
<body> | |
<svg width="400" height="400" viewBox="0 0 400 400"> | |
<defs> |
CREATE TABLE things ( | |
id int NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
created timestamp NULL DEFAULT CURRENT_TIMESTAMP, | |
str varchar(10), | |
expires timestamp | |
); | |
INSERT INTO things (str) VALUES ('one'); | |
CREATE TRIGGER set_thing_expires |
SELECT CURRENT_TIMESTAMP; | |
+---------------------+ | |
| current_timestamp | | |
+---------------------+ | |
| 2023-07-23 13:28:42 | | |
+---------------------+ | |
# subtract 10 minutes from current timestamp | |
SELECT DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 10 MINUTE); |
autoload -Uz vcs_info | |
precmd() { vcs_info } | |
zstyle ':vcs_info:git:*' formats '- %b' | |
zstyle ':vcs_info:*' check-for-changes true | |
setopt PROMPT_SUBST | |
PROMPT='${PWD/#$HOME/~} %F{white}%B${vcs_info_msg_0_}%b%f | |
%# ' |
const monthLabels = Array(12) | |
.fill() | |
.map((_, i) => new Date(`${i+1}`).toDateString()) | |
.map(date => date.slice(4, 7)) | |
export default monthLabels | |
// ['Jan', 'Feb', 'Mar', ...'Dec'] |
import { fromPairs, is, map, pipe, toPairs } from 'ramda' | |
const isObject = is(Object) | |
const transformKey = transform => | |
([k, v]) => !isObject(v) ? [transform(k), v] : | |
[transform(k), mapKeys(transform)(v)] | |
const mapKeys = transform => | |
pipe( |
const mapObj = (fn, obj) => | |
Object.entries(obj).map(([key, value]) => { | |
return fn(value, key) | |
}) |
import { fromPairs, map, path, pipe, split, tail } from 'ramda' | |
const removeEmptyQuery = filter(complement(isNil)) | |
const getQueryParams = pipe( | |
path(['location', 'search']), | |
tail, | |
split('&'), | |
map(split('=')), | |
fromPairs, |
<script> | |
let x | |
</script> | |
<p>markup</p> | |
<style> | |
body { | |
background: white; | |
} |