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
fn main() { | |
let u: Vec<usize> = vec![]; | |
let v = vec![0, 1, 2]; | |
let w = vec![0, 1, 2, 3, 4, 5]; | |
let a = u.get(1..).unwrap_or(&[]).chunks(3).next().unwrap_or(&[]); | |
let b = v.get(1..).unwrap_or(&[]).chunks(3).next().unwrap_or(&[]); | |
let c = w.get(1..).unwrap_or(&[]).chunks(3).next().unwrap_or(&[]); | |
println!("{:?}\n{:?}\n{:?}", a, b, c); |
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
fn main() { | |
println!("Hello, GCI!"); | |
} |
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
""" | |
Based on https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html | |
""" | |
from requests.packages.urllib3.util.ssl_ import create_urllib3_context | |
from requests.adapters import HTTPAdapter | |
import hmac | |
import hashlib | |
import datetime | |
import base64 | |
import os |
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 | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
YELLOW='\033[0;33m' | |
NC='\033[0m' # No Color | |
if [[ $EUID -eq 0 ]]; then | |
echo -e "${RED}x${NC} This script must not be run as root" | |
exit 1 | |
fi |
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
""" | |
Based on https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html | |
""" | |
from requests.packages.urllib3.util.ssl_ import create_urllib3_context | |
from requests.adapters import HTTPAdapter | |
import hmac | |
import hashlib | |
import datetime | |
import base64 | |
import os |