Skip to content

Instantly share code, notes, and snippets.

View Townsheriff's full-sized avatar

Artūrs Townsheriff

  • Latvia, Riga
View GitHub Profile
@Townsheriff
Townsheriff / test-matrix.js
Last active September 3, 2020 13:33
FFmpeg testing matrix with CSV summaries
const maxRates = [5000, 10000, 15000, 20000];
const cq = [15, 16, 17, 18, 19, 20];
const bFrames = [-1, 1, 2, 3, 4, 10, 20];
const gop = [25];
const videoDuration = [30];
const codec = 'hevc_nvenc';
const decklinkCardName = 'DeckLink Quad HDMI Recorder (1)';
const decklinkInput = 'hdmi';
@Townsheriff
Townsheriff / Delete All Items DynamoDb
Last active January 31, 2022 13:08
When you want to delete all items, but not to delete a table
const tableName = '';
const partitionKeyName = '';
const sortKeyName = '';
while (true) {
const scanParams = {
TableName: tableName,
Limit: 100,
};
@Townsheriff
Townsheriff / index.js
Last active March 18, 2018 20:56
Find most popular AS in BGP table (empty and 0 first results should be ignored)
'use strict';
const fs = require('fs');
const split = require('split');
const through = require('through');
const regex = /\*\>?\s+[\d+|\.]+\/\d+\s+[\d+|\.]+\s+([\d+\s]+)/;
const filter = through(function(buffer) {
const line = buffer.toString();
@Townsheriff
Townsheriff / index.js
Last active March 18, 2018 20:16
Parsing BGP file and finding longest AS path
'use strict';
const fs = require('fs');
const split = require('split');
const through = require('through');
const regex = /\*\>?\s+[\d+|\.]+\/\d+\s+[\d+|\.]+\s+([\d+\s]+)/;
const filter = through(function(buffer) {
const line = buffer.toString();