Skip to content

Instantly share code, notes, and snippets.

View chergaoui's full-sized avatar

Ahmed Chergoui chergaoui

View GitHub Profile
@chergaoui
chergaoui / Extract frame from video
Created February 19, 2014 16:38
Quick script I recently used to extract a frame from a .webm file. The frame is saved as a .png file.
#!/bin/bash
# NB: the script file must be in the same directory as media files
FILES=./*.webm
for f in $FILES
do
echo "Processing $f file..."
ffmpeg -i "$f" -ss 10 -vframes 1 "$f.png"
done
@chergaoui
chergaoui / maintenance.html
Last active May 22, 2018 16:16 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@chergaoui
chergaoui / .htaccess
Created May 22, 2018 16:18
Maintenance Htaccess file
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_ADDR} !^11\.111\.111\.111
RewriteCond %{REQUEST_URI} !^/maintenance\.html$
RewriteRule ^(.*)$ http://domain.com/maintenance.html [R=307,L]