I hereby claim:
- I am cbsmith on github.
- I am cbsmith (https://keybase.io/cbsmith) on keybase.
- I have a public key ASAP-aANv7TdH9M92MiL7AmjcQmFCR4m9bNymFF-1y6LIgo
To claim this, I am signing this object:
#cloud-config | |
--- | |
coreos: | |
units: | |
- name: update-fleet-metadata.service | |
command: start | |
content: |- | |
[Unit] | |
Description=Update Fleet metadata tag | |
Before=fleet.service |
"""Shadow run attack simulator. | |
Usage: | |
shadow_combat.py [--debug] [--limit LIMIT | -6 | --rule_of_six] [--threshold THRESHOLD | --opposed_pool OPPOSED [--opposed_limit OPPOSED_LIMIT]] [--dv DV --stun [--soak SOAK] [--armor ARMOR [--ap AP]]] [--contact] [--once | -o | [--iterations ITERATIONS] [-D | --distribution]] [--multi ATTACKS] [--min DAMAGE] ATTACK_POOL | |
shadow_combat.py [--debug] [--contact] [-6 | --rule_of_six] --threshold THRESHOLD ATTACK_STRING DAMAGE_STRING SOAK_STRING | |
shadow_combat.py [--debug] [--contact] [-D | --distribution] [-6 | --rule_of_six] --threshold THRESHOLD ATTACK_STRING DAMAGE_STRING SOAK_STRING ITERATIONS | |
shadow_combat.py [--debug] [--contact] [-6 | --rule_of_six] ATTACK_STRING DAMAGE_STRING DEFENSE_STRING SOAK_STRING | |
shadow_combat.py [--debug] [--contact] [-D | --distribution] [-6 | --rule_of_six] ATTACK_STRING DAMAGE_STRING DEFENSE_STRING SOAK_STRING ITERATIONS | |
shadow_combat.py (-h | --help) | |
shadow_combat.py (-v | --version) |
# Usage: . awscli_functions.sh | |
# Suggested: add to ~/.bashrc | |
# This code lazily uses your default profile && region. | |
# It wouldn't take much to add some logic for using ${PROFILE} and/or ${REGION} as some kind of override. | |
# Lots more functions would be helpful, but I've been playing with ec2 & vpcs a lot lately, so... | |
clusters() | |
{ | |
local __resultvar=$1 | |
local __clusters=$(aws ecs list-clusters | jq -r '.clusterArns[]') |
package message; | |
import "gogo.proto"; | |
option (gogoproto.sizer_all) = true; | |
option (gogoproto.marshaler_all) = true; | |
option (gogoproto.unmarshaler_all) = true; | |
option java_package = "org.mozilla.heka"; | |
option java_outer_classname = "HekaMessage"; |
package message; | |
import "gogo.proto"; | |
option (gogoproto.sizer_all) = true; | |
option (gogoproto.marshaler_all) = true; | |
option (gogoproto.unmarshaler_all) = true; | |
option java_package = "org.mozilla.heka"; | |
option java_outer_classname = "HekaMessage"; |
import random | |
import itertools | |
def sample(population, k): | |
"How random.sample should really be defined." | |
if callable(getattr(population, '__len__', None)) and callable(getattr(population, '__getitem__', None)): | |
return random.sample(population, min(k, len(population))) | |
p = iter(population) |
// -*- compile-command: "g++ -O3 -march=native -std=c++11 -Wall -Werror endian.cpp -o endian" -*- | |
#include <fstream> | |
#include <ostream> | |
#include <istream> | |
#include <cstdint> | |
#include <algorithm> | |
#include <cassert> | |
#include <string> | |
#include <vector> | |
#include <limits> |
I hereby claim:
To claim this, I am signing this object:
// -*- compile-command: "clang++ -Weverything -Wno-c++98-compat -ggdb -o test -std=c++11 -stdlib=libc++ test.cpp" -*- | |
#include <iostream> | |
#include <type_traits> | |
template <typename T, typename U, bool boolable = std::is_convertible<T,bool>::value, bool assignable = std::is_assignable<T, U>::value > | |
struct or_assign_helper; | |
template <typename T, typename U> | |
struct or_assign_helper<T, U, true, true> { |
// -*- compile-command: "clang++ -ggdb -o test -std=c++11 -stdlib=libc++ test.cpp" -*- | |
#include <iostream> | |
float add(float x, float y) { | |
return x+y; | |
} | |
auto add_fourty_two = +[](float x) { return add(x, 42); }; | |
auto add_pie_and_fourty_two = +[]() { return add_fourty_two(3.1415926); }; |