I hereby claim:
- I am dwburke on github.
- I am dwburke (https://keybase.io/dwburke) on keybase.
- I have a public key whose fingerprint is 0106 655F A8B4 CAC0 41F8 F116 C79E A36B 43A4 49E0
To claim this, I am signing this object:
for (auto i = list.begin(); i != list.end();) { | |
if (condition) | |
i = list.erase(i); | |
else | |
++i; | |
} | |
or |
// from http://stackoverflow.com/questions/2896600/how-to-replace-all-occurrences-of-a-character-in-string | |
// std::string tmp = ReplaceAll(description, std::string("%"), name); | |
std::string ReplaceAll(std::string str, const std::string& from, const std::string& to) { | |
size_t start_pos = 0; | |
while((start_pos = str.find(from, start_pos)) != std::string::npos) { | |
str.replace(start_pos, from.length(), to); | |
start_pos += to.length(); // Handles case where 'to' is a substring of 'from' | |
} |
#!/usr/bin/env perl | |
use strict; | |
use AnyEvent; | |
use AnyEvent::Util; | |
my $cv = AnyEvent->condvar; | |
$AnyEvent::Util::MAX_FORKS = 5; |
#!/bin/bash | |
# todo - modify swap | |
sudo apt-get install g++ protobuf-compiler libprotobuf-dev \ | |
libboost-dev curl m4 wget libssl-dev | |
wget https://download.rethinkdb.com/dist/rethinkdb-2.3.5.tgz | |
tar xf rethinkdb-2.3.5.tgz |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use JSON; | |
STDOUT->autoflush; | |
use Net::AMQP::RabbitMQ; |
# from http://mah.everybody.org/docs/ssh | |
SSH_ENV="$HOME/.ssh/environment" | |
function start_agent { | |
echo "Initialising new SSH agent..." | |
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" | |
echo succeeded | |
chmod 600 "${SSH_ENV}" | |
. "${SSH_ENV}" > /dev/null |
I hereby claim:
To claim this, I am signing this object: