Skip to content

Instantly share code, notes, and snippets.

@smitp
smitp / testmon.sh
Created June 18, 2024 05:29
testmon.sh
#!/usr/bin/env bash
download_database=false
upload_database=false
collect_only=false
run_testmon=false
incremental_collect=false
export_impacted_tests=false
input_sha=$CIRCLE_SHA1
S3_BUCKET="YOUR_S3_BUCKET"
@smitp
smitp / ffmpeg_tricks.md
Last active May 27, 2020 10:56
FFMpeg Tricks

Inspect file

ffmpeg -i file.mp4

Convert file

This converts file with new bitrates specified. Also makes it stream optimized.

@smitp
smitp / blog_articles_render.js
Last active December 31, 2020 11:01
[JS-Interview] Problem 1
function getRandomBool(n) {
var maxRandomCoeff = 1000;
if (n > maxRandomCoeff) n = maxRandomCoeff;
return Math.floor(Math.random() * maxRandomCoeff) % n === 0;
}
function renderArticle(article){
console.log(`Rendered ${article}`);
}
@smitp
smitp / redis_cleanup.py
Last active March 6, 2020 05:23 — forked from zioproto/redis-delete-old-keys.py
Delete/List Redis Stale Keys
#!/usr/bin/env python
from __future__ import print_function
import redis
import sys
if len(sys.argv) < 2:
print("python redis_cleanup.py delete|list".format())
sys.exit(-1)