Skip to content

Instantly share code, notes, and snippets.

View Kamleshpaul's full-sized avatar
🇮🇳

Kamlesh Paul Kamleshpaul

🇮🇳
View GitHub Profile
@Kamleshpaul
Kamleshpaul / hls.sh
Created November 9, 2024 08:28 — forked from stenuto/hls.sh
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then
@Kamleshpaul
Kamleshpaul / README.md
Last active September 28, 2024 10:19 — forked from CaptainVincent/README.md
Improve your vscode quickinput-widget

Customize your quickinput-widget

This is a small tool designed to emulate the Sublime style Command Palette as follows.

Screenshot

It requires the use of a specific extension to load the js file from this gist.

I'm using the APC extension, and the usage is as follows.

#zero downtime deployment nextjs without vercel
echo "Deploy starting..."
git pull
npm install || exit
BUILD_DIR=temp npm run build || exit
@Kamleshpaul
Kamleshpaul / instagram_scrape.php
Created September 25, 2019 15:41 — forked from cosmocatalano/instagram_scrape.php
Quick-and-dirty Instagram web scrape, just in case you don't think you should have to make your users log in to deliver them public photos.
<?php
//returns a big old hunk of JSON from a non-private IG account page.
function scrape_insta($username) {
$insta_source = file_get_contents('http://instagram.com/'.$username);
$shards = explode('window._sharedData = ', $insta_source);
$insta_json = explode(';</script>', $shards[1]);
$insta_array = json_decode($insta_json[0], TRUE);
return $insta_array;
}