Now that we live in the Big Data, Web 3.14159 era, lots of people want to build databases that are too big to fit on a single machine. But there's a problem in the form of the CAP theorem, which states that if your network ever partitions (a machine goes down, or part of the network loses its connection to the rest) then you can keep consistency (all machines return the same answer to
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
# Download and Install the Latest Updates for the OS | |
apt-get update && apt-get upgrade -y | |
# Set the Server Timezone to CST | |
echo "America/Chicago" > /etc/timezone | |
dpkg-reconfigure -f noninteractive tzdata | |
# Enable Ubuntu Firewall and allow SSH & MySQL Ports | |
ufw enable | |
ufw allow 22 |
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
sudo add-apt-repository ppa:birdie-team/daily | |
sudo apt-get update && sudo apt-get install birdie-granite | |
sudo add-apt-repository ppa:gotwig/weekly | |
sudo apt-get update | |
sudo apt-get install gazette | |
echo 'Add weather.yahoo.com id to org → pantheon → gazette' | |
sudo apt-add-repository ppa:versable/elementary-update | |
sudo apt-get update | |
sudo apt-get install elementary-tweaks | |
sudo add-apt-repository ppa:tombeckmann/geary |
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
# unregister broken GHC packages. Run this a few times to resolve dependency rot in installed packages. | |
# ghc-pkg-clean -f cabal/dev/packages*.conf also works. | |
function ghc-pkg-clean() { | |
for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'` | |
do | |
echo unregistering $p; ghc-pkg $* unregister $p | |
done | |
} | |
# remove all installed GHC/cabal packages, leaving ~/.cabal binaries and docs in place. |
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
# -*- shell-script -*- | |
function riak_dev_cleanup_stage() { | |
for d in ~/Projects/riak/dev/dev{2,3,4,5}; do | |
$d/bin/riak-admin cluster leave; | |
done | |
~/Projects/riak/dev/dev1/bin/riak-admin cluster plan | |
} |
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
In http://www.datastax.com/dev/blog/row-level-isolation and | |
http://www.datastax.com/dev/blog/atomic-batches-in-cassandra-1-2, Datastax | |
asserts that batch updates to multiple cells in a single row are | |
guaranteed to be isolated from concurrent batches: | |
"Cassandra 1.1 guarantees that if you update both the login and password in the | |
same update (for the same row key) then no concurrent read may see only a | |
partial update." | |
"...the guarantee is that the new login cannot be persisted without the new |
The last few weeks I've spent some night hacking time to get Erjang to be able to run Elixir. Here's a short note on the current status for those interested.
The bottom line is that we can now boot the Elixir REPL, it looks like this:
krab$ ./bin/iex
Warning: could not run smart terminal, falling back to dumb one
Aug 26, 2013 11:11:14 AM erjang.EModuleManager$FunctionInfo$1 invoke
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
% depends: https://github.com/dnet/erlang-oauth | |
% depends: https://github.com/talentdeficit/jsx | |
-module(tweet). | |
-export([ircmain/1, ircproc/1, reload/2]). | |
-define(CONSUMER_KEY, "..."). | |
-define(CONSUMER_SECRET, "..."). | |
-define(ACCESS_TOKEN, "..."). | |
-define(TOKEN_SECRET, "..."). |
This describes my basic Arch Linux installation on my Chromebook Pixel.
Note: I'm a coward, so I installed Arch to an SD card instead of wiping out the existing SSD.
- SD card. A very minimal Arch installation with XFCE will need about 2GB, so I think 4GB is the minimum you can get by with.
- Arch installer on a USB drive. The 2013.05.01 is broken with the recent netctl change. So either get an older or newer one.
- Some Arch Linux familiarity.
- Time, patience, and good eyesight.
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 | |
# Pull this file down, make it executable and run it with sudo | |
# wget https://raw.github.com/gist/5487621/build-erlang-r16b.sh | |
# chmod u+x build-erlang-r16b.sh | |
# sudo ./build-erlang-r16b.sh | |
if [ $(id -u) != "0" ]; then | |
echo "You must be the superuser to run this script" >&2 | |
exit 1 | |
fi |