This file contains 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
All of the following will require sudo if run from the command line: | |
defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 0 | |
#set bluetooth pref to off | |
defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 1 | |
#set bluetooth pref to on | |
This file contains 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
DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/usr/include/libxml2 -I/private/var/folders/0b/fjlqmqr15y5755cl1kqsj1700000gn/T/pip-build-9egv3x/lxml/src/lxml/includes -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.10-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace | |
In file included from src/lxml/lxml.etree.c:239: | |
/private/var/folders/0b/fjlqmqr15y5755cl1kqsj1700000gn/T/pip-build-9egv3x/lxml/src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found | |
#include "libxml/xmlversion.h" | |
^ | |
1 error generated. | |
error: command 'cc' failed with exit status 1 | |
================ SOLUTION |
This file contains 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
openssl genrsa -out something-staging.pem 2048 | |
openssl req -sha256 -new -key something-staging.pem -out something-staging.csr | |
openssl x509 -req -days 3650 -in something-staging.csr -signkey something-staging.pem -out something-staging-self.pem | |
aws iam upload-server-certificate --server-certificate-name something-staging --certificate-body file://something-staging-self.pem --private-key file://something-staging.pem |
This file contains 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/sh | |
# Setup encrypted disk image | |
# For Ubuntu 14.04 LTS | |
CRYPTFS_ROOT=/home/cryptfs | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install cryptsetup |
This file contains 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
I've tracked this down. A change went into Linux kernel V3.16 which fixes this. | |
Previously, the shared memory allocated to containers was hard-coded to 32 MB, and now it's set much higher. | |
boot2docker keeps pretty up-to-date on kernel versions, which is why it works there. | |
If you're not able to upgrade your kernel, then one alternative is to give your | |
container access to the host's IPC namespace using the --ipc host option on docker run. | |
This is a security risk as it breaks the isolation of your container, but it is an option. |
This file contains 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
OVPN_DATA=openvpn-data | |
docker run --name $OVPN_DATA -v /etc/openvpn busybox | |
docker run --volumes-from $OVPN_DATA --rm einyx/vpn:v1 ovpn_genconfig -u udp://vpn..com | |
docker run --volumes-from $OVPN_DATA --rm -it einyx/vpn:v1 ovpn_initpki | |
docker run --volumes-from $OVPN_DATA -d -p 1194:1194/udp --cap-add=NET_ADMIN einyx/vpn:v1 | |
docker run --volumes-from $OVPN_DATA --rm -it einyx/vpn:v1 easyrsa build-client-full work | |
docker run --volumes-from $OVPN_DATA --rm einyx/vpn:v1 ovpn_getclient work > work.ovpn |
This file contains 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/sh | |
# Setup encrypted disk image | |
# For Ubuntu 14.04 LTS | |
CRYPTFS_ROOT=/home/cryptfs | |
if ! dpkg-query -W cryptsetup; then | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install cryptsetup |
This file contains 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
openssl genrsa -out com.key 2048 | |
openssl req -new -key com.key -out com.csr -config /usr/local/etc/openssl/openssl.cnf | |
openssl x509 -req -days 3650 -in com.csr -signkey com.key -out com.crt |
This file contains 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
NAME=einyx/casperjs | |
VERSION=latest | |
default: | |
@echo Please use \'make build\' or \'make test example.js\' | |
build: | |
docker build -t $(NAME):$(VERSION) . |
This file contains 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
NAME = einyx/cli53 | |
all : build | |
.built : . | |
docker build -t $(NAME) . | |
@docker inspect -f '{{.Id}}' $(NAME) > .built | |
build : .built |