nl(Blabber).
abcast
#!/bin/bash | |
# Pull this file dowm, make it executable and run it with sudo | |
# wget https://raw.github.com/gist/3162027/build-erlang-r15b01.sh | |
# chmod u+x build-erlang-r15b01.sh | |
# sudo ./build-erlang-r15b01.sh | |
if [ $(id -u) != "0" ]; then | |
echo "You must be the superuser to run this script" >&2 | |
exit 1 | |
fi |
Based on Twitter conversation with @b6n | |
*Question 1* | |
The digits in the credit card pattern 4811 XXXX XXXX 2632 sum to 77, what are the | |
middle 8?There are 112,400 card numbers (about 1.2%) in this range that 1) pass | |
the luhn check and 2) sum to 77. The credit card isn't in great danger. | |
*Question 2*Does the sum of the card digits make a good security question for | |
phone support?The first hurdle is having a customer add the 16 digits without | |
miss-adding or freaking out. Next, the numbers do cluster to the middle. A bad |
Any sufficiently complicated concurrent program in another language contains an ad hoc informally-specified bug-ridden slow implementation of half of Erlang.
#!/bin/bash | |
# Pull this file dowm, make it executable and run it with sudo | |
# wget https://raw.github.com/gist/4164394/build-erlang-r15b03.sh | |
# chmod u+x build-erlang-r15b03.sh | |
# sudo ./build-erlang-r15b03.sh | |
if [ $(id -u) != "0" ]; then | |
echo "You must be the superuser to run this script" >&2 | |
exit 1 | |
fi |
#!/bin/bash | |
# Pull this file dowm, make it executable and run it with sudo | |
# wget https://gist.github.com/raw/4361444/r15b03-on-raspbian1212.sh | |
# chmod u+x r15b03-on-raspbian1212.sh | |
# sudo ./r15b03-on-raspbian1212.sh | |
if [ $(id -u) != "0" ]; then | |
echo "You must be the superuser to run this script" >&2 | |
exit 1 | |
fi |
using System.Collections.Generic; | |
using System.IO; | |
using OfficeOpenXml; // (EPPLus - http://epplus.codeplex.com/) | |
namespace OfficeReports | |
{ | |
public static class DumpToExcel | |
{ | |
public static void Dump<T>(IEnumerable<T> data, string outputFilename) | |
{ |
#!/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 |
CQRS with Erlang
Erlang an industry-proven functional programming language that simplifies writing reliable, concurrent, distributed systems.
CQRS is an architectural pattern that separates commands (which mutate state) from queries (which return values). With CQRS the “read” data store and the “write” data store can be on different severs, can use different storage engines, and can be scaled independently. CQRS is often linked with the Event Sourcing pattern which models state as a series of events (past tense verbs) rather than a single “latest” value. What works for an accountant’s ledger and for Git can work for our “write” store too. Given a series of events we can deal with concurrency and collisions more intelligently than “last guy wins”. We can also define varied service level agreements for commands and queries.
CQRS promotes distribution, concurrency and eventual consistency which is dandy until we attempt to code an implementation with conventional tools like C# or Java. Lucky for us Erlang i
Dear Congressman: | |
The NSA programs and activities recently disclosed by the whistleblower Edward Snowden are in clear violation of the Fourth Amendment. Despite the fear and mad scramble for security, our constitution was not amended by 9/11, by Osama bin Laden, or by the PATRIOT Act. The Constitution is still the supreme law, and each federal official has sworn to uphold the Constitution including the Fourth Amendment. | |
If we are in fear of terrorism, the terrorist win. If we allow terrorists to diminish our liberties or to alter our way of life, the terrorists win. I personally have no fear of terrorists. Statistically cars and fatty foods are scary, but terrorists are not. I am, however, afraid of the fear-mongers in Congress. I am afraid they are horse-trading our liberty for our security. I am afraid they are creating a nation of cowards. I am afraid America is becoming precisely what it long struggled against during the Cold War. | |
The PATRIOT Act has been steadily rotting the foundations of our Republi |