Skip to content

Instantly share code, notes, and snippets.

View damien-monni's full-sized avatar

Damien Monni damien-monni

View GitHub Profile
@damien-monni
damien-monni / delete-items-from-table.js
Created February 21, 2020 13:59
Delete all item from a DynamoDB table
const AWS = require('aws-sdk');
const docClient = new AWS.DynamoDB.DocumentClient({ region: 'eu-west-1' });
const getAllItemFromTable = async (table) => {
let ExclusiveStartKey;
let items = [];
do {
const params = { TableName: table };
if (ExclusiveStartKey) {
params.ExclusiveStartKey = ExclusiveStartKey;
@damien-monni
damien-monni / convert.sh
Created April 26, 2018 08:16
Converts MP4 videos to high quality GIFs converter
#!/bin/bash
for completeFilename in ./*.mp4; do
filename=$(basename "$completeFilename")
f="${filename%.*}"
echo $f
ffmpeg -y -i "$filename" -vf palettegen palette.png