Skip to content

Instantly share code, notes, and snippets.

@runcom
runcom / keysigning_party.sh
Created Feb 5, 2020
script to sign and send sigs after a keysigning party (FOSDEM)
View keysigning_party.sh
#!/bin/bash
set -e
GNUPGHOME=./gnupg-backup
for i in "${@:1}"
do
KEY=$i
gpg --homedir ./gnupg-backup --ask-cert-level --sign-key $KEY
gpg --homedir ./gnupg-backup --armor --export $KEY | gpg --homedir ./gnupg-backup --encrypt -r $KEY --armor --output fosdem-keysigning/$KEY-signedBy-CC5C9A81EDCAD821.asc
View x11-terms-st-0.8.1::gentoo-st-alpha-scrollback.diff
diff --git a/config.def.h b/config.def.h
index 82b1b09..cfbdc9f 100644
--- a/config.def.h
+++ b/config.def.h
@@ -82,6 +82,9 @@ char *termname = "st-256color";
*/
unsigned int tabspaces = 8;
+/* bg opacity */
+unsigned int alpha = 0xcc;
View origin-node service failing - needs vm reboot
libvirt F25 VM
May 06 15:23:44 fedora.vm ovs-vsctl[8217]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --if-exists del-br br0 -- add-br br0 -- set Bridge br0 fail-mode=secure protocols=OpenFlow13
May 06 15:23:44 fedora.vm origin-node[8146]: F0506 15:23:44.822983 8146 node.go:325] error: SDN node startup failed: exit status 1
May 06 15:23:44 fedora.vm systemd[1]: origin-node.service: Main process exited, code=exited, status=255/n/a
May 06 15:23:44 fedora.vm systemd[1]: Failed to start Origin Node.
May 06 15:23:44 fedora.vm systemd[1]: origin-node.service: Unit entered failed state.
May 06 15:23:44 fedora.vm systemd[1]: origin-node.service: Failed with result 'exit-code'.
@runcom
runcom / Centos_7
Last active Aug 30, 2017
CRI-O + k8s
View Centos_7
# Centos 7 VM, 8GB ram, 20+GB storage
# dnf update
# dnf install gpgme-devel libassuan-devel libseccomp-devel device-mapper-devel btrfs-progs-devel glibc-static glibc-devel glib2-devel iptables git golang
# export GOPATH=$HOME/go
# export PATH=$PATH:$GOPATH/bin
# go get -d github.com/opencontainers/runc
# go get -d github.com/kubernetes-incubator/cri-o
# go get -d k8s.io/kubernetes
# go get -d github.com/containernetworking/cni
@runcom
runcom / config.yml
Last active Nov 15, 2016
test out layer federation with docker
View config.yml
version: 0.1
log:
fields:
service: registry
storage:
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: ./reg_store
http:
View gist:5118b48bba4051a2db6090c5b4fd2475
$ cid=$(docker run -d busybox top)
$ docker exec -d $cid sleep 10000
$ execid=$(docker inspect $cid | jq -r '.[0].ExecIDs[0]')
$ echo -e "GET /exec/$execid/json HTTP/1.0\r\n" | nc -U /var/run/docker.sock | grep Pid || false
View test.go
package main
import (
"bytes"
"io/ioutil"
"github.com/docker/engine-api/client"
"github.com/docker/engine-api/types"
"github.com/docker/engine-api/types/container"
View kill_exec.sh
$ export id=$(docker run -d busybox sleep 10000)
$ docker exec -d $id tail -f /dev/null # runaway process
$ export exec_id=$(docker inspect $id | jq -r '.[0].ExecIDs[0]') # just getting the first one since there's only one
$ sudo kill -9 $(sudo cat /var/run/docker/libcontainerd/containerd/$id/$exec_id/pid)
$ docker inspect $id | jq -r '.[0].ExecIDs' # should be null as we killed it!
View gist:f53269c2a490d05ecb09c47cec0735d9
{
"default": [
{
"type": "reject"
}
],
"transports": {
"docker": {
"registry.access.redhat.com/rhel7": [
{
View docker-changelog.sh
#!/bin/sh
PROG=${PROG:-docker}
if [ ! -f $PROG.spec ]; then
echo "no $PROG.spec found"
exit 1
fi
BRANCH=$(cat $PROG.spec | grep "Version: " | sed -e "s/Version: //" | cut -f1,2 -d.)