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
#!/usr/bin/env bash | |
# discover what values you can use for a given service in the last 3 months | |
# | |
# aws ce get-dimension-values \ | |
# --dimension SERVICE \ | |
# --time-period Start=$(date -v-3m +%Y-%m-01),End=$(date +%Y-%m-01) \ | |
# --query 'DimensionValues[*].Value' | |
# last 3 months of ecr usage/spend |
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
~/c/r/binsize ❯❯❯ rustc --version | |
rustc 1.31.1 (b6c32da9b 2018-12-18) | |
~/c/r/binsize ❯❯❯ cat src/main.rs | |
fn main() { | |
println!("Hello, world!"); | |
} | |
~/c/r/binsize ❯❯❯ cargo build | |
Finished dev [unoptimized + debuginfo] target(s) in 0.06s | |
~/c/r/binsize ❯❯❯ du target/debug/binsize | |
576K target/debug/binsize |
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": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"ssm:GetParametersByPath" | |
], | |
"Resource": "arn:aws:ssm:<region>:<account>:parameter/grand-rustacean-central/*" | |
} |
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
extern crate envy_store; | |
#[macro_use] | |
extern crate serde_derive; | |
extern crate tokio; | |
use tokio::runtime::Runtime; | |
// parameter names map to field names | |
#[derive(Deserialize, Debug)] | |
struct Config { |
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
# store a secure string | |
$ aws ssm put-parameter \ | |
--name /demo/foo | |
--value bar | |
--type SecureString | |
# store a string list | |
$ aws ssm put-parameter \ | |
--name /demo/bar \ | |
--value baz,boom,zoom \ | |
--type StringList |
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
1. have a brilliant idea for something you want to use | |
2. Stop! Don't start building it. | |
3. Find a project that does something similar. (This likely exists) | |
4. Read it's documentation. | |
* If it has none, learn the project and create some. | |
* If it does, try to build something with it and document what wasn't clear. | |
5. If it feels broke. Write some failing tests, | |
* If possible, fix them, then open a pr | |
* If not, open a pr with failing tests and get the maintainer to teach you how to fix them | |
6. Document your process for contributing in a file called CONTIBUTING.md |
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
Foo ■■■■■■ | |
Foo ■ | |
Foo. ■■■ | |
Foo ■■ |
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 | |
curl --progress \ | |
"https://s3.dualstack.us-east-2.amazonaws.com/aws-xray-assets.us-east-2/xray-daemon/aws-xray-daemon-linux-2.x.zip" \ | |
-o /tmp/xray.zip \ | |
&& unzip -f /tmp/xray.zip \ | |
&& rm /tmp/xray.zip |
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
#[macro_use] | |
extern crate serde; | |
extern crate serde_json; | |
use serde::Serializer; | |
fn comma_delim<S>( | |
x: &Option<Vec<String>>, | |
ser: S, | |
) -> Result<S::Ok, S::Error> |
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
xcode-select --install |