Skip to content

Instantly share code, notes, and snippets.

@yvonnel098
yvonnel098 / gist:b80f6799c4e4dabe80347e46b4322b9e
Created November 26, 2023 01:30
Calling Twilio API to retrieve and paginate pending tasks using yargs
'use strict';
const axios = require('axios');
require('yargs')
.command(
'exec',
'get Twilio pending tasks with pagination',
yargs => {
yargs.options({
@yvonnel098
yvonnel098 / EventSourceFilter.yml
Created November 25, 2023 23:39
AWS Cloudformation Example of Event Source Mapping Filter from DynamoDB Table Kinesis Stream by Keyword
EventSourceMapping:
Type: AWS::Lambda::EventSourceMapping
DependsOn:
- DLQ
- DestinationLambdaLogicalFunctionName
Properties:
EventSourceArn: Stream.Arn
StartingPosition: "TRIM_HORIZON"
FilterCriteria:
Filters:
@yvonnel098
yvonnel098 / SupervisorTaskCanvasComponent.tsx
Created December 3, 2021 18:23 — forked from chase2981/SupervisorTaskCanvasComponent.tsx
Twilio Flex MessagingCanvas Examples
import * as React from "react";
import {
Manager, Actions, MessagingCanvas, MessagingCanvasContext, DynamicComponent, ContextProvider, MessageList, StateHelper, TaskHelper, ITask,
Supervisor,
TaskChannelDefinition,
TaskContextProps,
Theme
} from '@twilio/flex-ui';
import CoreApiService from '../Shared/CoreApiService';
import { Channel } from 'twilio-chat/lib/channel';
@yvonnel098
yvonnel098 / simple_paginator_sample.php
Created October 4, 2020 19:17
Laravel Simple Pagination
use DB;
use Illymincate\Database\Eloquent\Model;
use Illuminate\Pagination\paginator;
//set $pageSize to items per page
//set $conditions to where $conditions
//set $page to current page number
$results = DB::table('tableName')
->where($conditions)