国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
# Amazon Neptune version 4 signing example (version v2) | |
# The following script requires python 3.6+ | |
# (sudo yum install python36 python36-virtualenv python36-pip) | |
# => the reason is that we're using urllib.parse() to manually encode URL | |
# parameters: the problem here is that SIGV4 encoding requires whitespaces | |
# to be encoded as %20 rather than not or using '+', as done by previous/ | |
# default versions of the library. | |
#!/usr/bin/env ts-node | |
// This script uploads your assets to the CDK staging bucket in S3 (just as cdk deploy would) | |
// and writes out two files: | |
// - parameters.ini to use in CLI deployments (see instructions below) | |
// - parameters.json to use in AWS CodePipeline for CloudFormation deployments | |
// | |
// Installation instructions: | |
// - Save this script cdk-package.ts to the root of your CDK repo (i.e. next to cdk.json) and make it executable | |
// - Install script dependencies: npm install jsonpath aws-sdk adm-zip @types/jsonpath @types/adm-zip |
import ec2 = require('@aws-cdk/aws-ec2'); | |
import cdk = require('@aws-cdk/core'); | |
import { Fn, Tag, Resource } from '@aws-cdk/core'; | |
import { AmazonLinuxImage, UserData, InstanceType } from '@aws-cdk/aws-ec2'; | |
import { Role, ServicePrincipal, ManagedPolicy, CfnInstanceProfile } from '@aws-cdk/aws-iam' | |
/** | |
* Create my own Ec2 resource and Ec2 props as these are not yet defined in CDK | |
* These classes abstract low level details from CloudFormation |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"apigateway:*", | |
"cloudformation:CancelUpdateStack", | |
"cloudformation:ContinueUpdateRollback", | |
"cloudformation:CreateChangeSet", | |
"cloudformation:CreateStack", | |
"cloudformation:CreateUploadBucket", |
You will need 2 VPCs. The Internet VPC will have the Internet Gateway and the OpenSwan EC2 instance. The Project VPC will have your application or Kubernetes cluster.
#! /bin/bash | |
# | |
# Diffusion bilibili live avec ffmpeg | |
# Make sure you have FFmpeg installed in your mac | |
# list avfoundation devices | |
ffmpeg -f avfoundation -list_devices true -i "" | |
# change the param after `-i` and `-f flv` |
apt-get install python-pip
pip install shadowsocks
sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
#!/bin/python | |
import sys | |
import re | |
import subprocess | |
#Format: "oldref newref branch" | |
line = sys.stdin.read() | |
(base, commit, ref) = line.strip().split() | |
new_branch_push = re.match(r'[^1-9]+', base) |