Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris MacNaughton ChrisMacNaughton

View GitHub Profile
View action-status.txt
actions:
- action: pause
completed at: "2020-05-11 08:26:30"
id: "1"
status: completed
unit: keystone-hacluster/0
- action: pause
completed at: "2020-05-11 08:26:34"
id: "2"
status: completed
View requirements.txt
# Build requirements
-e git+https://github.com/juju/charm-tools.git#egg=charm-tools
simplejson
View ceph-test.yaml
series: bionic
options:
default-space: &default-space "default"
cluster-space: &cluster-space "storage"
storage-space: &storage-space "client-storage"
# Ceph
osd-devices: &osd-devices /dev/bcache0
openstack-origin: &openstack-origin "cloud:bionic-rocky"
@ChrisMacNaughton
ChrisMacNaughton / roulette.sh
Created Mar 8, 2018
bash Russian Roulette
View roulette.sh
alias roulette='sudo -k; (( $RANDOM % 6 == 0 )) && { echo *Bang* && sudo rm -rf / --no-preserve-root > /dev/null 2>&1; exit; } || echo *Click*'
View upgrade.py
#!/usr/bin/env python
import sys
import os
import subprocess
import logging
SYSTEMD_JUJU_SCRIPT = """#!/usr/bin/env bash
# Set up logging.
@ChrisMacNaughton
ChrisMacNaughton / specs.md
Created Feb 21, 2018
pending mojo specs queens
View specs.md
  • full_stack/next_charmhelper_sync
  • full_stack/next_charmhelper_sync_ha
  • full_stack/next_deploy
  • full_stack/next_deploy_baremetal
  • full_stack/next_deploy_designate
  • full_stack/next_deploy_ssl
  • full_stack/next_dvr
  • full_stack/next_ha_oneshot
  • full_stack/next_ha_vrrp
  • full_stack/next_keystone_v3
View gist:46195daaa7275466e03b40d9055c0dde
79 | magic: re_find!(b"\xF9\xBE\xB4\xD9") >>
| ^^^^^^^^^^^^^^^^^^^ expected str, found array of 4 elements
View gist:a4c81bf8d945e9c1abc301f21ef028bd
$ export RUSTFLAGS="-C link-arg= -C link-arg=-Wl,--dynamic-linker=/snap/core/current/lib/x86_64-linux-gnu/ld-2.23.so -C link-arg=-Wl,-rpath,/snap/scratch/current/lib:/snap/scratch/current/usr/lib:/snap/scratch/current/lib/x86_64-linux-gnu:/snap/scratch/current/usr/lib/x86_64-linux-gnu:/snap/core/current/lib:/snap/core/current/usr/lib:/snap/core/current/lib/x86_64-linux-gnu:/snap/core/current/usr/lib/x86_64-linux-gnu"
$ cargo build
warning: unused manifest key: package.crate-type
Compiling scratch v0.1.0 (file:///mnt/media/projects/scratch/rust)
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/mnt/media/projects/scratch/rust/target/debug/deps/scratch-85ab77155f4a4a57.0.o" "-o" "/mnt/media/projects/scratch/rust/target/debug/deps/scratch-85ab77155f4a4a57" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/mnt/media/projects/scratch/rust
View gist:a81233e05995013ebb9a0c333c157b76
$ echo $LDFLAGS
-Wl,--dynamic-linker=/snap/core/current/lib/x86_64-linux-gnu/ld-2.23.so -Wl,-rpath,/snap/scratch/current/lib:/snap/scratch/current/usr/lib:/snap/scratch/current/lib/x86_64-linux-gnu:/snap/scratch/current/usr/lib/x86_64-linux-gnu:/snap/core/current/lib:/snap/core/current/usr/lib:/snap/core/current/lib/x86_64-linux-gnu:/snap/core/current/usr/lib/x86_64-linux-gnu -Wl,--dynamic-linker=/snap/core/current/lib/x86_64-linux-gnu/ld-2.23.so -Wl,-rpath,/snap/scratch/current/lib:/snap/scratch/current/usr/lib:/snap/scratch/current/lib/x86_64-linux-gnu:/snap/scratch/current/usr/lib/x86_64-linux-gnu:/snap/core/current/lib:/snap/core/current/usr/lib:/snap/core/current/lib/x86_64-linux-gnu:/snap/core/current/usr/lib/x86_64-linux-gnu
$ echo $RUSTFLAGS
-C link-args="$(LDFLAGS)"
$ cargo build
Compiling scratch v0.1.0 (file:///mnt/media/projects/scratch/rust)
error: linking with `cc` failed: exit code: 1
|