Skip to content

Instantly share code, notes, and snippets.

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8

@tunght13488
tunght13488 / nginx-cors.conf
Created February 27, 2021 12:34 — forked from sbuzonas/nginx-cors.conf
Nginx CORS maps
map $http_origin $allow_origin {
default "";
"~^https?://(?:[^/]*\.)?(stevebuzonas\.(?:com|local))(?::[0-9]+)?$" "$http_origin";
}
map $request_method $cors_method {
default "allowed";
"OPTIONS" "preflight";
}
@tunght13488
tunght13488 / .gitignore
Created April 20, 2016 07:30 — forked from hiephm/.gitignore
Magento 2 git ignore (NOT for composer installation)
/.idea
/app/etc/env.php
/app/etc/redis.php
/pub/media/*
!/pub/media/.htaccess
/pub/media/catalog/*
!/pub/media/catalog/.htaccess
/pub/media/customer/*
## Magento 2
alias m2="bin/magento"
alias m2rmgen="find var/generation -maxdepth 1 -mindepth 1 -type d -not -name 'Magento' -not -name 'Composer' -not -name 'Symfony' -exec rm -rf {} \;"
alias m2en="m2 module:enable"
alias m2s="m2 module:status"
alias m2f="m2 cache:flush"
alias m2up="m2en --all && m2 setup:upgrade && m2rmgen && m2f"
alias m2static="rm -rf var/view_preprocessed/* && rm -rf pub/static/frontend/* && rm -rf pub/static/_requirejs/frontend/*"
alias m2perm="sudo find . -type d -exec chmod 775 {} \; && sudo find . -type f -exec chmod 664 {} \; && sudo chmod u+x bin/magento"
#!/usr/bin/perl
use Mysql;
use strict;
use vars qw($school_name);
use vars qw($pass);
require "./cgi-lib.pl";
web: /usr/local/sbin/nginx -p `pwd`/tmp/nginx/ -c ../../nginx.conf
fastcgi: /usr/local/sbin/php-fpm
db: /usr/local/bin/mysqld
@tunght13488
tunght13488 / summary
Created August 20, 2013 02:36 — forked from phaedryx/summary
Original text here: http://www.heartmindcode.com/blog/2013/08/loyalty-and-layoffs/
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
// @KarlHillesland, @rexguo, @tom_forsyth, @bkaradzic, @MikeNicolella
// and myself.
@tunght13488
tunght13488 / hack.sh
Created March 31, 2012 11:56 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#