serverless create \
> --template-url https://github.com/yandex-cloud/serverless-plugin/tree/master/templates/nodejs
npm i
sls deploy
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
| import {DiskService, SnapshotService} from "yandex-cloud/api/compute/v1"; | |
| const FOLDER_ID = process.env.FOLDER_ID; | |
| export async function handler(event, context) { | |
| const snapshotService = new SnapshotService(); | |
| const diskService = new DiskService(); | |
| const diskList = await diskService.list({ | |
| folderId: FOLDER_ID, |
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
| // Конфгурируем Yandex.Cloud provider | |
| provider "yandex" { | |
| zone = "ru-central1-a" | |
| } | |
| // Объявляем переменную с названием Организации на гитхабе. | |
| // К сожалению github provider не создает ресурсы `github_actions_secret` в личных репах | |
| // https://github.com/terraform-providers/terraform-provider-github/issues/422 | |
| // К счастью базовая функциональность организаций теперь бесплатна. | |
| variable "github_organization" { |
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
| 14 apple.com | |
| 40 vk.com | |
| 44 github.com | |
| 49 tumblr.com | |
| 55 dropbox.com | |
| 85 medium.com | |
| 87 paypal.com | |
| 92 icloud.com | |
| 100 booking.com | |
| 112 weebly.com |
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
| ; | |
| ; /etc/resolv.conf | |
| ; Compiled by Chris Hills ([email protected]) | |
| ; | |
| ; This list can be obtained from the following locations:- | |
| ; - http://www.chaz6.com/files/resolv.conf | |
| ; - http://gitorious.org/chaz6/chaz6-dns-caches | |
| ; - git://gitorious.org/chaz6/chaz6-dns-caches.git | |
| ; | |
| ; Note 1: Having many nameservers defined can significantly slow down your |
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
| const AWS = require('aws-sdk'); | |
| AWS.config.update({ | |
| region: 'ru-central1', | |
| credentials: new AWS.Credentials({ | |
| accessKeyId: 'accessKeyId', | |
| secretAccessKey: 'secretAccessKey' | |
| }) | |
| }); |
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
| package main | |
| import ( | |
| "context" | |
| "encoding/json" | |
| "fmt" | |
| ) | |
| // Входной JSON-документ будет автоматически преобразован в объект данного типа | |
| type Request struct { |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
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
| ## AWS | |
| # from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories | |
| http://169.254.169.254/latest/user-data | |
| http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME] | |
| http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME] | |
| http://169.254.169.254/latest/meta-data/ami-id | |
| http://169.254.169.254/latest/meta-data/reservation-id | |
| http://169.254.169.254/latest/meta-data/hostname | |
| http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key |
This file has been truncated, but you can view the full file.
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
| ` | |
| ~/ | |
| ~ | |
| ×™× | |
| ___ | |
| __ | |
| _ |