I hereby claim:
- I am rochacon on github.
- I am rochacon (https://keybase.io/rochacon) on keybase.
- I have a public key whose fingerprint is 1C1D A0A2 1A14 2267 1BBC 680B D2FF 14CE D133 597F
To claim this, I am signing this object:
// this script lists all queues with a message count diferrent than 0 | |
// usage: bun list-queues-sizes.ts | |
import { $ } from 'bun'; | |
const queuesUrls = await $`aws sqs list-queues`.json(); | |
const attrs = "QueueArn ApproximateNumberOfMessages ApproximateNumberOfMessagesNotVisible ApproximateNumberOfMessagesDelayed"; | |
const queueAttributes = await Promise.all(queuesUrls.QueueUrls.map((url) => ( | |
$`aws sqs get-queue-attributes --attribute-names ${{ raw: attrs }} --queue-url ${url}`.quiet().json() | |
))); | |
const output = queueAttributes.filter((e) => e.Attributes.ApproximateNumberOfMessages !== "0").map((e) => e.Attributes); |
#!/bin/bash | |
set -exuo pipefail | |
name="${1?must provide name as argument}" | |
netns="${name}" | |
wg_conf="/etc/wireguard/wg-ns.conf" | |
ipv4="$(grep Address "${wg_conf}" | grep -Po '([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\/32)')" | |
dnsaddr="$(grep DNS "${wg_conf}" | grep -Po '([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)')" | |
ip netns add "${netns}" |
#!/bin/bash | |
set -euo pipefail | |
test "${DEBUG:-false}" = "true" && set -x | |
USERNAME="${USER}" | |
NAMESPACE="${NS:-${USERNAME}}" | |
IMAGE="${IMAGE:-docker.io/pkgxdev/pkgx}" | |
ENV_FROM="${ENVFROM:-${NAMESPACE}}" |
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"os" | |
"sort" | |
"strings" | |
"text/tabwriter" |
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net" | |
"os" | |
"sync" | |
"time" |
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"code.google.com/p/go-uuid/uuid" | |
"net/http" | |
) | |
var ( | |
id []byte = []byte(uuid.New() + "\n") | |
) |
#cloud-config | |
--- | |
hostname: master | |
coreos: | |
units: | |
- name: docker.service | |
command: start | |
enable: true | |
drop-ins: |
#!/usr/bin/env python | |
# Reference: http://docs.aws.amazon.com/AmazonS3/latest/dev/PresignedUrlUploadObject.html | |
import argparse | |
import os | |
import boto | |
import requests | |
if __name__ == '__main__': |
aur-sync
is a simple script to keep AUR packages up to date.
How to use it:
# 1. First you need to create some directories where the work will happen:
mkdir -p /tmp/aur-sync-ws
mkdir -p /tmp/aur-sync-ws/build
mkdir -p /tmp/aur-sync-ws/src
cd /tmp/aur-sync-ws