Based on the following guide: https://ericdraken.com/running-xvfb-on-a-shared-host-without-x/
Using the following docker image: https://hub.docker.com/r/lambci/lambda/
FROM cypress/browsers:node14.7.0-chrome84 | |
# Install aws-lambda-cpp build dependencies | |
RUN apt update && \ | |
apt install -y \ | |
ffmpeg \ | |
xvfb \ | |
g++ \ | |
make \ | |
cmake \ |
import { CfnElement, CfnResource, Stack } from "@aws-cdk/core"; | |
import { makeUniqueId } from "@aws-cdk/core/lib/private/uniqueid"; | |
import { Node } from "constructs"; | |
import * as assert from "assert"; | |
const PINNED_RESOURCE_NAMES_CONTEXT_KEY = "pinnedLogicalIds"; | |
type PinnedLogicalIds = { [segment: string]: PinnedLogicalIds | string }; | |
export class StableNameStack extends Stack { |
/** | |
Open Source Software Licenses | |
PUBLUS | |
Copyright(c) 2013-2014 ACCESS CO., LTD. All rights reserved. | |
This software includes all or part of the following open source software which is available under each license terms and conditions as follows: | |
* LAB.js (LABjs :: Loading And Blocking JavaScript) | |
v2.0.3 (c) Kyle Simpson |
#!/usr/bin/env zsh | |
sudo rm -f /usr/bin/node | |
sudo rm -f /usr/bin/npm | |
sudo ln -s $(which node) /usr/bin/ | |
sudo ln -s $(which npm) /usr/bin/ |
# Count total EBS based storage in AWS | |
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add" | |
# Count total EBS storage with a tag filter | |
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add" | |
# Describe instances concisely | |
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]' | |
# Wait until $instance_id is running and then immediately stop it again | |
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id | |
# Get 10th instance in the account |
Based on the following guide: https://ericdraken.com/running-xvfb-on-a-shared-host-without-x/
Using the following docker image: https://hub.docker.com/r/lambci/lambda/
/** | |
* This code is licensed under the terms of the MIT license | |
* | |
* Deep diff between two object, using lodash | |
* @param {Object} object Object compared | |
* @param {Object} base Object to compare with | |
* @return {Object} Return a new object who represent the diff | |
*/ | |
function difference(object, base) { | |
function changes(object, base) { |
var WebSocket = require('ws'); | |
var Protocol = require('pomelo-protocol'); | |
var Package = Protocol.Package; | |
var Message = Protocol.Message; | |
var EventEmitter = require('events').EventEmitter; | |
var protobuf = require('pomelo-protobuf'); | |
var util = require('util'); | |
var thunkify = require("thunkify"); | |
var JS_WS_CLIENT_TYPE = 'js-websocket'; | |
var JS_WS_CLIENT_VERSION = '0.0.1'; |
## vim /etc/X11/xorg.conf and add | |
Section "ServerFlags" | |
Option "BlankTime" "0" | |
Option "StandbyTime" "0" | |
Option "SuspendTime" "0" | |
Option "OffTime" "0" | |
Option "DontZap" "false" | |
Option "dpms" "false" | |
EndSection |
function int2ip (ipInt) { | |
return ( (ipInt>>>24) +'.' + (ipInt>>16 & 255) +'.' + (ipInt>>8 & 255) +'.' + (ipInt & 255) ); | |
} |