Skip to content

Instantly share code, notes, and snippets.

From computer
sudo iptables -t nat --list
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
From computer
sudo iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
sudo iptables -t nat --list
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
import { IoTDataPlaneClient, PublishCommand } from '@aws-sdk/client-iot-data-plane';
import { TextEncoder } from 'util';
export const dynamoClient = new DynamoDBClient({});
export const iotClient = new IoTDataPlaneClient({});
export const sendCommand = async (args: { id: string; command: string }) => {
const enc = new TextEncoder();
const publishCommand = new PublishCommand({
@cyuste
cyuste / gist:c1a6dbb23bb8b5595ffb9ac6efcd4a6f
Created November 23, 2022 20:26
kvsWebrtcClientMaster logs
carlos@cy-ubuntu:~/Repos/amazon-kinesis-video-streams-webrtc-sdk-c/Debug/samples$ ./kvsWebrtcClientMaster watchbot-xx
[KVS Master] Using trickleICE by default
[KVS Master] Created signaling channel watchbot-xx
[KVS Master] Finished setting audio and video handlers
[KVS Master] Checked sample video frame availability....available
[KVS Master] Checked sample audio frame availability....available
2022-11-23 20:18:15 VERBOSE pregenerateCertTimerCallback(): New certificate has been pre-generated and added to the queue
2022-11-23 20:18:15 INFO initKvsWebRtc(): SDK version: ced19d02ed6fbc1e59dd63bc19d847c5ec5ebf47
[KVS Master] KVS WebRTC initialization completed successfully
2022-11-23 20:18:15 VERBOSE createSignalingClientSync(): Creating Signaling Client Sync
@cyuste
cyuste / instance.ts
Last active February 25, 2021 21:26
alarms using ec2 actions
import * as cdk from "@aws-cdk/core";
import getEnv from "../../config";
import * as ec2 from "@aws-cdk/aws-ec2";
import * as sns from "@aws-cdk/aws-sns";
import * as cw from "@aws-cdk/aws-cloudwatch";
import { EmailSubscription } from "@aws-cdk/aws-sns-subscriptions";
import { SnsAction, Ec2InstanceActions, Ec2Action } from "@aws-cdk/aws-cloudwatch-actions";
import { Stack, StackProps, Duration } from "@aws-cdk/core";
export class TestStack extends Stack {