curl -k --user admin:PASS https://prod-es1:9200
/_cluster/health?pretty
/_cat/nodes?pretty
/_cluster/health?level=indices&pretty
/_cluster/health?level=shards&pretty
logging: | |
driver: "json-file" | |
options: | |
max-file: "20" | |
max-size: "100m" |
#!/usr/bin/env python3 | |
""" | |
usage: acm_search_certs.py [-h] [--region REGION] [--san-names SAN_NAMES] [--identifiers IDENTIFIERS] | |
[--tags TAGS] [--issuers ISSUERS] [--cert-in-use {0,1}] [--json] [--and-filters] | |
Fetches ACM SSL certificates. | |
options: | |
-h, --help show this help message and exit |
Want a cool new kernel feature but it won't show up in Debian for years?
make deb-pkg makes it easy to install a custom Linux kernel from source.
as root/sudo:
apt install build-essential libncurses5-dev gcc libssl-dev bc bison flex rsync libelf-dev
mkdir /usr/local/src/kernel
chown nonrootuser /usr/local/src/kernel
su - nonrootuser
/Library/LaunchDaemons/limit.maxfiles.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxfiles</string>
<key>ProgramArguments</key>
def urljoin(*args): | |
""" Joins given arguments into an url, removing extra slashes """ | |
return "/".join(map(lambda x: x.rstrip('/') if x.startswith('//') else x.strip('/'), args)) |
xcodebuild -license xcodebuild -runFirstLaunch xcode-select --install
https://mac.install.guide/commandlinetools/index.html https://mac.install.guide/commandlinetools/6.html
'use strict'; | |
var query = `query PageRender { page(url: "/index") { url friendlyName } }`; | |
const e = React.createElement; | |
class EmptyElement extends React.Component { | |
constructor(props) { | |
super(props); | |
} | |
render() { | |
fetch('https://demo.dotcms.com/api/v1/graphql', { | |
method: 'POST', |
#/usr/bin/env bash | |
# fetch server hostnames from `sdm status` to use as completions for `sdm ssh [hostname]` | |
# save the sdm status to a local file from a cron job to speed this up a lot: | |
# sdm status --filter 'TYPE:ssh*' | tail -n +2 | awk '{print $1}' | sort -u > /var/tmp/sdm-status | |
# h/t https://iridakos.com/programming/2018/03/01/bash-programmable-completion-tutorial | |
update_frequency=4h | |
compwords_file=/var/tmp/sdm-status |
python -c 'import secrets,string; print("".join(secrets.choice(string.ascii_letters+string.digits) for i in range(34)))' |