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
bash-5.0# updog check-update --log-level debug | |
01:20:12 [DEBUG] (1) bottlerocket_release: Found os-release value NAME=Bottlerocket | |
01:20:12 [DEBUG] (1) bottlerocket_release: Found os-release value ID=bottlerocket | |
01:20:12 [DEBUG] (1) bottlerocket_release: Found os-release value PRETTY_NAME=Bottlerocket OS 1.0.6 | |
01:20:12 [DEBUG] (1) bottlerocket_release: Found os-release value VARIANT_ID=aws-k8s-1.17 | |
01:20:12 [DEBUG] (1) bottlerocket_release: Found os-release value VERSION_ID=1.0.6 | |
01:20:12 [DEBUG] (1) bottlerocket_release: Found os-release value BUILD_ID=74c69ec1-dirty | |
01:20:12 [DEBUG] (2) webpki_roots: webpki-roots-shim activated, 138 certificates | |
01:20:12 [DEBUG] (2) webpki_roots: certificate source: /etc/pki/tls/certs/ca-bundle.crt | |
01:20:12 [DEBUG] (2) reqwest::connect: starting new connection: https://updates.bottlerocket.aws/ |
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
[ 0.000000] Linux version 5.4.80 (builder@buildkitsandbox) (gcc version 9.3.0 (Buildroot 2020.02.2)) #1 SMP Sun Jan 24 18:58:55 UTC 2021 | |
[ 0.000000] Command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz root=/dev/dm-0 rootwait ro console=tty0 console=ttyS0 random.trust_cpu=on selinux=1 enforcing=1 systemd.log_target=journal-or-kmsg systemd.log_color=0 net.ifnames=0 biosdevname=0 dm_verity.max_bios=-1 dm_verity.dev_wait=1 "dm-mod.create=root,,,ro,0 1884160 verity 1 PARTUUID=18ae72ac-fb60-49c6-bd89-26cca1448684/PARTNROFF=1 PARTUUID=18ae72ac-fb60-49c6-bd89-26cca1448684/PARTNROFF=2 4096 4096 235520 1 sha256 491c398a43780d31ba2ed15d98a290fefe7825d5c22f8fc8167fe64acd58b49f 05d7756cd6a54e331ecee914cb6010ebcc2e6677ccc5f95d356222ced5070123 1 restart_on_corruption" | |
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers' | |
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers' | |
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers' | |
[ 0.000000] x86/fpu: |
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
--- | |
AWSTemplateFormatVersion: "version date" | |
Description: | |
String | |
Parameters: | |
set of parameters | |
Conditions: |
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
AWSTemplateFormatVersion: 2010-09-09 | |
Description: >- | |
Create the following resources: | |
1) an on-demand DynamoDB table with a local secondary index | |
2) an S3 bucket with a lifecycle policy to clean up after itself | |
3) an SQS queue with AWS CloudWatch alarms on queue depth | |
Parameters: | |
AutoCleanupPrefix: | |
Description: >- |
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
AWSTemplateFormatVersion: "2010-09-09" | |
Description: >- | |
This template deploys an S3 bucket with a lifecycle policy to clean up after itself. | |
Parameters: | |
AutoCleanupPrefix: | |
Description: >- | |
All object with this prefix will be deleted automatically by S3. | |
Type: String | |
RetentionDays: |
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
Syntax | Is valid syntax? | Attempted destructuring? | Can modify v through b? | Is v moved? | Can v be borrowed again (after 'rebind' b)? | Can 'rebind' b? | |
---|---|---|---|---|---|---|---|
let b = v | Yes | No | No | Yes | No | No | |
let &b = &v | Yes | Yes | N/A | N/A | N/A | N/A | |
let &mut b = v | Yes | Yes | N/A | N/A | N/A | N/A | |
let &mut b = &mut v | Yes | Yes | N/A | N/A | N/A | N/A | |
let b = mut v | No | N/A | N/A | N/A | N/A | N/A | |
let b = &mut v | Yes | No | Yes | No | No* | No | |
let mut b = v | Yes | No | No | Yes | No | Yes | |
let mut b = &v | Yes | No | No | No | Yes | Yes | |
let mut b = &mut v | Yes | No | Yes | No | Yes | Yes |
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
fn main() { | |
let s = String::from("123"); | |
let mut stack = Vec::with_capacity(s.len()); | |
pop_and_compare(&mut stack, '1'); | |
} | |
fn pop_and_compare(stack: &mut Vec<char>, closing: char) -> bool { | |
match stack.pop() { | |
None => false, | |
Some(s) => s == closing, |
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
pub fn loop_over_vec_of_iterators(strs: Vec<String>) { | |
// create list of iterators for each word in strs, then loop over each and call next() once. | |
// Since we would like to modify individual iterators by calling its `next()`, we need to | |
// delcare this vector as mutable. | |
let mut iterators_vec: Vec<std::str::Chars> = strs.iter().map(|x| x.chars()).collect(); | |
while let Some(it) = iterators_vec.get_mut(index) { | |
match it.next() { | |
Some(c) => { | |
// do something |
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
// pattern matching on char | |
fn single_roman_to_abs(c: char) -> i32 { | |
match c { | |
'I' => 1, | |
'V' => 5, | |
'X' => 10, | |
'L' => 50, | |
'C' => 100, | |
'D' => 500, | |
'M' => 1000, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder