Skip to content

Instantly share code, notes, and snippets.

View ChrisMacNaughton's full-sized avatar

Chris MacNaughton ChrisMacNaughton

View GitHub Profile
apps:
alacritty:
command: env XDG_RUNTIME_DIR= XDG_CONFIG_HOME=$SNAP_USER_DATA XDG_DATA_DIRS=$SNAP_DATA alacritty
#[macro_export]
macro_rules! log {
($message:expr) => {{
log!($message, Debug)
}};
($message:expr, $level:ident) => {{
charmhelpers::core::hookenv::log(
$message.to_string(),
Some(LogLevel::$level),
);
@ChrisMacNaughton
ChrisMacNaughton / 95-ceph-osd.rules
Last active January 16, 2017 08:36
modification on ceph-osd.rules, replaces one in /lib/udev/rules.d/
# OSD_UUID
ACTION=="add", SUBSYSTEM=="block", \
ENV{DEVTYPE}=="partition", \
ENV{ID_PART_ENTRY_TYPE}=="4fbd7e29-9d25-41b8-afd0-062c0ceff05d", \
OWNER:="ceph", GROUP:="ceph", MODE:="660", \
ATTR{queue/scheduler}="cfq", \
RUN+="/usr/sbin/ceph-disk --log-stdout -v trigger /dev/$name"
ACTION=="change", SUBSYSTEM=="block", \
ENV{ID_PART_ENTRY_TYPE}=="4fbd7e29-9d25-41b8-afd0-062c0ceff05d", \
OWNER="ceph", GROUP="ceph", MODE="660"
series: xenial
applications:
"ceph-osd":
charm: "cs:xenial/ceph-osd"
num_units: 3
options:
"ephemeral-unmount": /mnt
"osd-devices": /dev/xvdb
annotations:
"gui-x": "579"
Cap'n Proto version 0.5.3
### Keybase proof
I hereby claim:
* I am chrismacnaughton on github.
* I am chrismacnaughton (https://keybase.io/chrismacnaughton) on keybase.
* I have a public key whose fingerprint is 8E0A 4095 FDF5 AFDC E88F F13E 74BA F13D 12E6 A841
To claim this, I am signing this object:
$ wget -O delegate.tar.gz http://www.delegate.org/anonftp/DeleGate/bin/linux/9.9.13/linux2.6-dg9_9_13.tar.gz
...
$ gzip -d < delegate.tar.gz | tar xfv -
...
$ cd dg*
$ make
make: *** No targets specified and no makefile found. Stop.
$ ls
CONTENTS.txt DGROOT
$ ls DGROOT/
#!/usr/bin/python
print "About to benchmark ceph"
import threading;
import subprocess;
import random;
import time;
import sys;
import re;
@ChrisMacNaughton
ChrisMacNaughton / index.haml
Created April 1, 2015 13:27
Example of somewhat static pages with a controller
.jumbotron
.container
%h1 This is the best home page ever!
%p
We can sell anything with this!
%p
=link_to "Sign Up Now", new_user_registration_path, class: 'btn btn-success'
@ChrisMacNaughton
ChrisMacNaughton / gist:9218430
Last active August 29, 2015 13:56
chef deploy symlinks
symlinks(
'.env' => '.env',
'system' => 'public/system',
'pids' => 'tmp/pids',
'log' => 'log',
'config/solr.yml' => 'config/solr.yml'
)