Skip to content

Instantly share code, notes, and snippets.

@sjug
sjug / pids.sh
Last active Jan 20, 2021
How podman sets ulimits
View pids.sh
#!/bin/bash
DEFAULT_CORE_LIMIT=512
SOFT_CORE_LIMIT="${1:-${DEFAULT_CORE_LIMIT}}"
HARD_CORE_LIMIT="${2:-${DEFAULT_CORE_LIMIT}}"
echo "Starting test container with core ulimit of ${SOFT_CORE_LIMIT}:${HARD_CORE_LIMIT}"
sudo podman run -d --rm --ulimit core=${SOFT_CORE_LIMIT}:${HARD_CORE_LIMIT} quay.io/libpod/fedora-minimal:latest sleep 1
echo
@sjug
sjug / create_entitlement.sh
Created Feb 18, 2020
Shell script to create machineconfig entitlements
View create_entitlement.sh
#!/bin/bash
sed "s/BASE64_RHSM_CONF_FILE/$(base64 -w 0 rhsm.conf)/" 0000-cluster-wide-machineconfigs.yaml.template > 0000-cluster-wide-machineconfigs.yaml
CERTS=$(find . -maxdepth 1 -name "*.pem" ! -name "*-key.pem")
VALID_CERTS=
ED_FILE=ed_replace
for c in ${CERTS}; do
CERT_KEY=${c%.pem}-key.pem
View tuned_controller.go
package tuned
import (
"context"
"fmt"
"log"
"os"
"strconv"
"time"
View tuned_controller.go
package tuned
import (
"context"
"fmt"
"log"
"os"
"strconv"
"time"
@sjug
sjug / output
Created Jul 27, 2017
metrics endpoint
View output
# HELP engine_daemon_container_actions_seconds The number of seconds it takes to process each container action
# TYPE engine_daemon_container_actions_seconds histogram
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.005"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.01"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.025"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.05"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.1"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.25"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.5"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="1"} 1
View opensearch_ddg.xml
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>DuckDuckGo Tor</ShortName>
<Description>Search DuckDuckGo (HTML)</Description>
<InputEncoding>UTF-8</InputEncoding>
<LongName>DuckDuckGo Search (HTML, non-JS)</LongName>
<Image height="16" width="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAB8lBMVEUAAADkRQzjPwPjQQXkRQ3iPwTiQQXgPQPeQgrcOwPVNgDVNQDWOgbTMwDRMgDQMwDSMwDRNwTQLgDRJgDSJwDSLgDSNwTjOgDiOADjOQDkPADhQAXzs5v+/fv////0vKbiRQvgPQHpdUr85NzuknPdKgDcIwDnZzj2w7HqeU/gPQLsimb/+PftjWn97Obpb0LdJQDeLQDtjmvsi2jgSBDnbULgOQD/39HgLQDeMgDpeFLgSBH0v670uqbaJQD2qImWvP/G1Ob5+/3u//+fvvXyp47dMwDaLwD0u6v0v6/aNQDiXi/aKQD3qozU7/8gSY2vvtg0ZK/OqLDaKQHYKgLgWTfaNADZMgDZMADZLADzqpD7//+xwdz//9H/5Bn/7Bn//ADofADYMADYMQDZOgPXLgDiZDj//97/0AD3tQDvlgHZOgbXLATXMADWMgDfXjLVLQD///z+0AD/3Rn/yRnwnQDcVjbVMQDyv67wuKTSJwDRHQD+8O/tg3/iQQDwhAHnawHWMADvtKfyva7XQ
View keybase.md

Keybase proof

I hereby claim:

  • I am sjug on github.
  • I am jugs (https://keybase.io/jugs) on keybase.
  • I have a public key ASBW_DkEjJUHF0MyW7xMse3OU7JGCFEwlA7cg5dtG89SSAo

To claim this, I am signing this object: