Skip to content

Instantly share code, notes, and snippets.

Avatar
🦇
chmod +x bits

Mohamed El Bahja melbahja

🦇
chmod +x bits
View GitHub Profile
@melbahja
melbahja / file.conf
Created Jan 14, 2020
Parse and loop through key value pairs in bash
View file.conf
# this is a comment
MYVAR=My value
OKOK=asas
YES=asja
@melbahja
melbahja / README.md
Created Jan 8, 2019 — forked from mrbar42/README.md
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)
View README.md

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
      |- 360p.m3u8
View gist:fe680b36a22c2cb00e6c0e2e22022fdf
<?php
$q = $_GET['query'] ?? null;
if ($q !== null) {
$q = htmlspecialchars(strip_tags($q), ENT_QUOTES, "UTF-8");
}
// data to browser
$data = json_encode(['q' => $q]);