Skip to content

Instantly share code, notes, and snippets.

Michael Schubert schu

Block or report user

Report or block schu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dnf-error-transaction-failed-selinux.md

Encountered the following error with sudo dnf install -y curl jq snapd in a sourcehut build environment with image: fedora/30 base:

[SNIP]

  Installing       : selinux-policy-minimum-3 [======================== ] 21/28
  Installing       : selinux-policy-minimum-3.14.3-37.fc30.noarch         21/28 

  Running scriptlet: selinux-policy-minimum-3.14.3-37.fc30.noarch         21/28 
Traceback (most recent call last):
View acme-client-runner.rb
#!/usr/bin/env ruby
require 'acme-client'
#Production
#ENDPOINT = 'https://acme-v01.api.letsencrypt.org'
#Testing
ENDPOINT = 'https://acme-staging.api.letsencrypt.org'
EMAIL = 'mailto:technion@lolware.net'
DOMAIN = 'lolware.net'
View sudoers Vagrant NFS on Debian
[...]
# https://github.com/mitchellh/vagrant/blob/master/plugins/hosts/linux/cap/nfs.rb
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports
Cmnd_Alias VAGRANT_EXPORTS_COPY = /bin/cp /tmp/exports /etc/exports
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /bin/sed -r -e * d -ibak /tmp/exports
Cmnd_Alias VAGRANT_NFSD_CHECK = /etc/init.d/nfs-kernel-server status
Cmnd_Alias VAGRANT_NFSD_START = /etc/init.d/nfs-kernel-server start
Cmnd_Alias VAGRANT_NFSD_APPLY = /usr/sbin/exportfs -ar
View Docker Registry S3 policy example
# https://github.com/docker/distribution/blob/master/docs/storage-drivers/s3.md#s3-permission-scopes
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:ListAllMyBuckets",
"Resource": "arn:aws:s3:::*"
},
View gist:95417a659b02f7ee143f
#!/bin/bash
set -eu
if [[ $# -lt 2 ]]; then
echo "usage: $0 <image.vdi> <name.box> [<vagrant package args>...]" >&2
exit 1
fi
readonly NAME="vdi2vagrantbox-${RANDOM}"
View keybase.md

Keybase proof

I hereby claim:

  • I am schu on github.
  • I am schu (https://keybase.io/schu) on keybase.
  • I have a public key whose fingerprint is C9C3 016B 59F1 3A98 9F6F DDEE D52E EE54 2ABF 47AA

To claim this, I am signing this object:

@schu
schu / gist:5142968
Last active Dec 14, 2015
Gerrit gsql - email_address
View gist:5142968
$ sudo -u gerrit java -jar bin/gerrit.war gsql
gerrit> update account_external_ids set email_address = 'foo@example.com' where account_id=XXX;
gerrit> \q
View systemd fcgiwrap
$ cat /etc/systemd/system/fcgiwrap.service
[Unit]
Description=fcgiwrap Server
After=nss-user-lookup.target
[Service]
ExecStart=/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9001 -u http -g http -- /usr/sbin/fcgiwrap
ExecStartPost=/usr/bin/chmod 660 /run/fcgiwrap.sock
Restart=on-failure
Type=forking
@schu
schu / bzr.wsgi
Created Feb 28, 2012
bzr.wsgi example
View bzr.wsgi
from bzrlib.transport.http import wsgi
def application(environ, start_response):
app = wsgi.make_app(
root="/srv/bazaar/repos/",
prefix="/bzr",
readonly=False,
enable_logging=False)
return app(environ, start_response)
You can’t perform that action at this time.