Skip to content

Instantly share code, notes, and snippets.

@adenot
adenot / aws-regions-short.md
Created June 20, 2024 08:28
AWS Regions and Official Short Codes (from AWS Billing)
Region Short Code Region Name Region Long Code
ape1 Asia Pacific (Hong Kong) ap-east-1
apn1 Asia Pacific (Tokyo) ap-northeast-1
apn2 Asia Pacific (Seoul) ap-northeast-2
apn3 Asia Pacific (Osaka) ap-northeast-3
aps1 Asia Pacific (Singapore) ap-southeast-1
aps2 Asia Pacific (Sydney) ap-southeast-2
aps3 Asia Pacific (Mumbai) ap-south-1
aps4 Asia Pacific (Jakarta) ap-southeast-3
@adenot
adenot / ownvpn-privacy-policy.md
Last active June 16, 2024 06:10
ownVPN Privacy Policy - https://ownvpn.app
  1. Introduction: Welcome to ownVPN, where your privacy is not just a feature—it’s the foundation of everything we do. This Privacy Policy underscores our commitment to safeguarding your personal information and clarifies our practices regarding the collection, use, and disclosure of your data when using our app.

  2. No Data Collection:

  • Direct Cloud Provider Interaction: ownVPN is designed to operate without collecting any personal information from you. The app interfaces directly with your chosen cloud provider, and all configuration data remains between you and your cloud provider.
  • No Company Communication: The ownVPN app does not communicate any data back to us. We do not receive, store, or analyze any data related to your use of ownVPN.
  1. Information Sharing and Disclosure: Since we do not collect any personal information, there is nothing to share or disclose to third parties. We are committed to ensuring your privacy and keeping your personal data confidential.
@adenot
adenot / ssm-loader.sh
Last active April 19, 2022 22:11
Using SSM Loader (AWS CloudShell)
pip3 install ssm-loader
./.local/bin/ssm dump /app/dev/ -o app-dev.json
# edit app-dev.json, and load back:
./.local/bin/ssm load -f app-dev.json
@adenot
adenot / describe-workspace-bundles.sh
Created August 4, 2021 09:59
AWS Workspaces Bundles (aws workspaces describe-workspace-bundles)
bash-5.1# aws workspaces describe-workspace-bundles --owner AMAZON | jq -r '.Bundles[] | "\(.BundleId),\(.ComputeType.Name),\(.Description)"'
wsb-b0s22j3d7,PERFORMANCE,Windows 7 Experience provided by Windows Server 2008 R2 with PCoIP 2 vCPU 7.5GiB Memory 100GB Storage
wsb-clj85qzj1,STANDARD,Amazon Linux 2 with PCoIP 2 vCPU 4GiB Memory 50GB Storage
wsb-gm4d5tx2v,PERFORMANCE,Windows 10 Experience provided by Windows Server 2016 with PCoIP 2 vCPU 7.5GiB Memory 100GB Storage
wsb-1pzkp0bx4,POWERPRO,Windows 7 Experience provided by Windows Server 2008 with PCoIP 8 vCPU 32GiB Memory 100GB Storage
wsb-2bs6k5lgn,POWER,Amazon Linux 2 with PCoIP 4 vCPU 16GiB Memory 100GB Storage
wsb-6cdbk8901,PERFORMANCE,Windows 10 Experience provided by Windows Server 2016 with Office 2016 and PCoIP 2 vCPU 7.5GiB Memory 100GB Storage
wsb-bh8rsxt14,VALUE,Windows 10 Experience provided by Windows Server 2016 with PCoIP 1 vCPU 2GiB Memory 10GB Storage
wsb-92tn3b7gx,VALUE,Windows 7 Experience provided by Windows Server 2008 R2 with PCoIP
@adenot
adenot / install-kubectl-cloudshell.sh
Last active March 4, 2024 19:15
Install kubectl on aws cloudshell
curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.19.6/2021-01-05/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv kubectl /usr/local/bin/kubectl
@adenot
adenot / install-docker.md
Created July 25, 2021 01:00 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
from btgym import BTgymEnv
import IPython.display as Display
import PIL.Image as Image
from gym import spaces
import gym
import numpy as np
import random
pragma solidity ^0.4.18;
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
@adenot
adenot / kittycore.sol
Created December 7, 2017 03:05
KittyCore v0.4.18+commit.9cf6e910
pragma solidity ^0.4.11;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
@adenot
adenot / cloudfront_headers_https.json
Created June 19, 2016 03:29
Cloudfront headers passed to the origin from a CURL request. (with "Forward Headers: All" option)
{
"host": "staging.REDACTED",
"x-amz-cf-id": "TeSvfNKhljGl5v1Nldr0ApgX0LbmW25-sfTbOvU-kfSxjBAszhQNOQ==",
"connection": "Keep-Alive",
"user-agent": "curl/7.47.0",
"via": "1.1 74b217f6de96253e0ed5551fd50bc165.cloudfront.net (CloudFront)",
"x-forwarded-for": "52.62.49.205",
"cloudfront-is-mobile-viewer": "false",
"cloudfront-is-tablet-viewer": "false",
"cloudfront-is-smarttv-viewer": "false",