diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`where XXXXX is the size of the RAM disk in terms of memory blocks.
Notes:
| #!/usr/bin/env ruby | |
| # frozen_string_literal: true | |
| require 'json' | |
| require 'base64' | |
| require 'open3' | |
| puts 'Getting authorization token...' | |
| out, status = Open3.capture2 'aws', 'ecr', 'get-authorization-token' |
| # These are the standard pip packages | |
| # I like to install in my user 'global' space. | |
| # They generally do not belong in a project's | |
| # requirements.txt file, and are almost always | |
| # found in a file like requirement_dev.txt | |
| # | |
| # pip install --user requirements_user.txt | |
| # echo 'export PATH=~/.local/bin:$PATH' >> ~/.bash_profile | |
| autopep8>=1.4.3 |
| import os | |
| import random | |
| from PIL import Image, ImageOps | |
| def concat_images(image_paths, size, shape=None): | |
| # Open images and resize them | |
| width, height = size | |
| images = map(Image.open, image_paths) | |
| images = [ImageOps.fit(image, size, Image.ANTIALIAS) |
| { | |
| "Statement": [ | |
| { | |
| "Action": [ | |
| "apigateway:*", | |
| "appsync:CreateApiKey", | |
| "appsync:CreateDataSource", | |
| "appsync:CreateFunction", | |
| "appsync:CreateGraphqlApi", | |
| "appsync:CreateResolver", |
| { | |
| "Statement": [ | |
| { | |
| "Action": [ | |
| "apigateway:*", | |
| "cloudformation:CancelUpdateStack", | |
| "cloudformation:ContinueUpdateRollback", | |
| "cloudformation:CreateChangeSet", | |
| "cloudformation:CreateStack", | |
| "cloudformation:CreateUploadBucket", |
| #remove old | |
| sudo apt-get remove docker docker-engine docker.io | |
| sudo apt-get update | |
| sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" |
| -- takes the leftmost 16 hex-characters of the md5 hash of foo, converts it to base-10, and casts it to a 64-bit number | |
| -- Note: this decreases the possible space of hashes! | |
| SELECT CAST(conv(substring(md5("foo"), 0, 16), 16, 10) AS BIGINT)"); |
| service: service-name | |
| provider: | |
| name: aws | |
| runtime: nodejs6.10 | |
| functions: | |
| myfunc: | |
| handler: handler.myfunc |