- Make sure that there is at least 128MiB of free space after your OSX root partition. OSX [needs this space for upgrading
itself][osx-128]. OSX will fail to upgrade otherwise.
- If this gap doesn't exist and you need it to, boot into a Linux LiveCD with GParted.
- Delete the OSX boot and recovery partitions (don't worry, we still have internet recovery mode).
- Create a single HFS+ filesystem where the partitions used to be.
- Leave 128MiB or more free after the partition! Probably more, maybe the recovery partition needs to occupy this space.
- Boot into Internet Recovery mode using a Thunderbolt ethernet adapter or the built-in ethernet adapter if present. This can be accomplished by holding Alt+Super+R on boot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
import argparse | |
import subprocess | |
def __main__(): | |
parser = argparse.ArgumentParser(prog="piper", description="Pipes output of two programs together.") | |
parser.parse_args() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
import argparse | |
import subprocess | |
from StringIO import StringIO | |
def __main__(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUBSYSTEMS=="usb", ACTION=="add|change", ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="1066", RUN+="/usr/local/bin/schiit-fulla-switch added" | |
SUBSYSTEMS=="usb", ACTION=="remove", ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="1066", RUN+="/usr/local/bin/schiit-fulla-switch removed" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c | |
index 1595f4f..b577af2 100644 | |
--- a/drivers/pci/quirks.c | |
+++ b/drivers/pci/quirks.c | |
@@ -2749,6 +2749,13 @@ static void quirk_hotplug_bridge(struct pci_dev *dev) | |
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HINT, 0x0020, quirk_hotplug_bridge); | |
+static void quirk_hotplug_bridge_skip(struct pci_dev *dev) | |
+{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Author: Todd Larason <[email protected]> | |
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.1 1999/07/11 08:49:54 dawes Exp $ | |
print "256 color mode\n\n"; | |
# display back ground colors | |
for ($fgbg = 38; $fgbg <= 48; $fgbg +=10) { |
I've been hacking on this for a bit, but I'm trying to write a policy using the reference policy to contain Syncthing. I've done most of the files level permissions, but I'm having trouble with the networking aspects. My code is here: https://github.com/rfkrocktk/syncthing/blob/feature/selinux/etc/selinux/syncthing.te#L80 I'm still getting the following denied:
type=AVC msg=audit(1469458131.894:6800): avc: denied { create } for pid=18349 comm="syncthing" scontext=unconfined_u:unconfined_r:syncthing_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:syncthing_t:s0-s0:c0.c1023 tclass=tcp_socket permissive=0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function usage() { | |
echo "Usage: $0 hostname [port]" >&2 | |
echo " hostname Hostname of the server to connect to." >&2 | |
echo " port Port of the server running TLS, defaults" >&2 | |
echo " to 443." >&2 | |
echo "" | |
exit 1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
from math import floor, log | |
def binary_macaddress(macaddress): | |
"""Convert a mac address into a 48-bit integer.""" | |
binary = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# output format is like this: | |
# upload: index.html to s3://$BUCKET/index.html | |
# | |
# so we grab the second item which is the file path and pass that via xargs to the | |
# cloudfront invalidation command | |
aws s3 sync --sse AES256 s3://$BUCKET/ site/ | awk '{print $2;}' | \ | |
xargs aws cloudfront create-invalidation --distribution-id $CF_DISTRO_ID --paths |