- Launch Cloud9 IDE with SSM option
- When it launchers, open the Cloud9 IDE in the AWS Console
Install:
- AWS CLI
[package] | |
name = "send-requests" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
chrono = "0.4.38" | |
clap = { version = "4.5.4", features = ["derive"] } |
#!/usr/bin/env python | |
# Usage | |
# ./gen_dkim.py mail.yourdomain.tld | |
import sys | |
from subprocess import call | |
from os import devnull | |
if len(sys.argv) < 2: |
<?php | |
$url = 'http://www.example.com/a-large-file.zip'; | |
$path = '/path/to/a-large-file.zip'; | |
$fp = fopen($path, 'w'); | |
$ch = curl_init($url); | |
curl_setopt($ch, CURLOPT_FILE, $fp); | |
$data = curl_exec($ch); |
{ | |
"Version": "2012-10-17", | |
"Statement": { | |
"Effect": "Deny", | |
"Action": "*", | |
"Resource": "*", | |
"Condition": { | |
"DateLessThan": {"aws:TokenIssueTime": "2014-05-07T23:47:00Z"} | |
} | |
} |
This example implements a simple shared library in C.
This library called libfifthy
exposes a function called add_fifthy
which takes an array of integers and modify it in place by adding 50
to all elements.
Then there's some code in python which builds an array and invokes the add_fifthy
from the shared library and reads the altered array values.
{ | |
"Messages": [ | |
{ | |
"Body": "{\n \"Type\" : \"Notification\",\n \"MessageId\" : \"abcdef01-2345-6789-0abc-defg123456783\",\n \"TopicArn\" : \"arn:aws:sns:eu-west-1:123456789012:ticketless-ticketPurchased\",\n \"Message\" : \"{\\\"ticket\\\":{\\\"id\\\":\\\"abcdef01-2345-6789-0abc-defg123456784\\\",\\\"createdAt\\\":1509980177897,\\\"name\\\":\\\"Alex Smith\\\",\\\"email\\\":\\\"email@example.com\\\",\\\"gig\\\":\\\"nirvana-cork-1991\\\"},\\\"gig\\\":{\\\"capacity\\\":2300,\\\"collectionPoint\\\":\\\"29 South Main Street, Centre, Cork City, Co. Cork, Ireland\\\",\\\"collectionTime\\\":\\\"13:00\\\",\\\"slug\\\":\\\"nirvana-cork-1991\\\",\\\"originalDate\\\":\\\"1991-08-20\\\",\\\"venue\\\":\\\"Cavern Club\\\",\\\"bandName\\\":\\\"Nirvana\\\",\\\"city\\\":\\\"Cork\\\",\\\"date\\\":\\\"2019-06-21\\\",\\\"image\\\":\\\"nirvana.jpg\\\",\\\"year\\\":\\\"1991\\\",\\\"collectionPointMap\\\":\\\"map-nirvana-cork-1991.png\\\",\\\"description\\\":\\\"Lorem Ipsum\\\",\\\"price\\\":\\\"1666.60\\\"}}\",\n \" |
if (typeof Promise.withResolvers === 'undefined') { | |
Promise.withResolvers = function () { | |
let resolve, reject | |
const promise = new Promise((res, rej) => { | |
resolve = res | |
reject = rej | |
}) | |
return { promise, resolve, reject } | |
} | |
} |
The `decode` function has been re-adapted from code provided by Moodstocks SAS and | |
therefore the following license applies to it: | |
Copyright (C) 2014 by Moodstocks SAS | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |