Skip to content

Instantly share code, notes, and snippets.

Working from home

ǃшɒʞɒH ǃǀɄ abilogos

Working from home
View GitHub Profile
mrbar42 /
Last active Dec 6, 2022
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
chronon / ext.txt
Created Feb 18, 2017
List of docker-php-ext-install extension names
View ext.txt
Possible values for ext-name:
View avform.js
function toRad(degree) { return degree * Math.PI / 180; }
function toDeg(radian) { return radian * 180 / Math.PI; }
// round floating point errors
function rnd( float ){
return (Math.floor(100000 * float) / 100000).toFixed(5);
function assert( a, b ){
ben-albon / php5.6-pgsql.Dockerfile
Last active Oct 5, 2022
Docker PHP Image with PostgreSQL Driver
View php5.6-pgsql.Dockerfile
FROM php:5.6-apache
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
COPY src/ /var/www/html

How do I do this thing?

I'm not aware of how to use Google, how do I do this basic thing in Language X?

tagged coding, question

edited by Grammar Nazi (2.5M), asked by 1337z0r (2)

Answer 1 (12)

jtdp / gist:5443498
Last active Oct 9, 2022
Revert file permission changes in local git repository.. Very useful when you change permissions due to working on a samba share. Lifted from:
View gist:5443498
git diff -p \
| grep -E '^(diff|old mode|new mode)' \
| sed -e 's/^old/NEW/;s/^new/old/;s/^NEW/new/' \
| git apply
tuupola / isikukood.js
Created Sep 3, 2009
Validate Estonian national identification number (isikukood).
View isikukood.js
* Validate Estonian national identification code.
* Copyright (c) 2009 Mika Tuupola
* Licensed under the MIT license:
function isikukood(kood) {