Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

ǃшɒʞɒH ǃǀɄ abilogos

🏠
Working from home
View GitHub Profile
@mrbar42
mrbar42 / README.md
Last active May 19, 2022
Secured HLS setup with Nginx as media server
View README.md

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
chronon / ext.txt
Created Feb 18, 2017
List of docker-php-ext-install extension names
View ext.txt
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
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
ben-albon / php5.6-pgsql.Dockerfile
Last active Mar 29, 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
View every-stackoverflow-question.md

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
jtdp / gist:5443498
Last active Apr 17, 2022
Revert file permission changes in local git repository.. Very useful when you change permissions due to working on a samba share. Lifted from: http://stackoverflow.com/questions/2517339/git-how-to-recover-the-file-permissions-git-thinks-the-file-should-be
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
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:
* http://www.opensource.org/licenses/mit-license.php
*/
function isikukood(kood) {