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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>AWS IoT Pub/Sub Demo</title> | |
</head> | |
<body> | |
<h1>AWS IoT Pub/Sub Demo</h1> | |
<form> | |
<button type="button" id="connect">connect!</button> |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [{ | |
"Action": "ec2:*", | |
"Effect": "Allow", | |
"Resource": "*", | |
"Condition": { | |
"StringEquals": { | |
"ec2:Region": [ | |
"us-east-1", |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
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
* cofnig origin ref: http://serverfault.com/questions/235669/how-do-i-make-rabbitmq-listen-only-to-localhost | |
Bugs: | |
* epmd stays up after rabbitmq-server is stopped. It's shared amond all Erlang instances, so maintainers feel not one packake should kill it. | |
https://bugzilla.redhat.com/show_bug.cgi?id=1104843 | |
* Erlang has a bug requiring ERL_EPMD_ADDRESS to be specified as IPv6. It seems that, if epmd is built with ipv6, it looses ability to bind with ipv4. Fix traversing from upstream. | |
https://bugs.launchpad.net/ubuntu/+source/erlang/+bug/1374109 | |
https://github.com/erlang/otp/compare/maint...msantos:epmd-IPv6-node-reg | |
We run R16B03-1/3.2.4-1 |
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
wget -nc http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux | |
wget -nc http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz | |
cp -nv ~/.ssh/id_rsa.pub . | |
qemu-system-x86_64 -machine accel=kvm -kernel linux -initrd initrd.gz -m 1G -smp 2 -append "blacklist=vga16fb fb=false video=false vga=normal auto=true url=http://10.0.2.10:8080/debian-preseed.txt hostname=otto domain=" -net user,guestfwd=:10.0.2.10:8080-cmd:"/bin/busybox httpd -i" -hda /dev/shm/deb.img -net nic -display none |
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
from __future__ import print_function | |
import socket | |
import sys | |
_module = sys.modules[__name__] | |
def disable_socket(): | |
""" disable socket.socket to disable the Internet. useful in testing. | |
.. doctest:: |
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
shared_buffers = 512MB | |
work_mem = 16MB | |
fsync = off | |
synchronous_commit = off | |
wal_buffers = 64MB | |
checkpoint_segments = 36 | |
checkpoint_timeout = 10min | |
random_page_cost = 2.0 | |
effective_cache_size = 1024MB |
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
# INCORRECT! DON'T DO THIS! | |
>>> x = "www.alliancefrançaise.nu" # This is the problematic line. Forgot to make this a Unicode string. | |
>>> print x | |
www.alliancefrançaise.nu | |
>>> x.encode('punycode') | |
'www.Alliancefranaise.nu-h1a31e' | |
>>> x.encode('punycode').decode('punycode') | |
u'www.Alliancefran\xc3\xa7aise.nu' | |
>>> print x.encode('punycode').decode('punycode') | |
www.alliancefrançaise.nu |
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/bash | |
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/ | |
# Install stuff # | |
################# | |
# Install development tools and some misc. necessary packages | |
yum -y groupinstall "Development tools" | |
yum -y install zlib-devel # gen'l reqs |
NewerOlder