Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
global | |
lua-load /usr/local/etc/haproxy/acme-http01-webroot.lua | |
ssl-default-bind-ciphers AES256+EECDH:AES256+EDH:!aNULL; | |
tune.ssl.default-dh-param 4096 | |
debug | |
defaults | |
mode http | |
option log-health-checks | |
option dontlognull |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
ffmpeg -i input.mp4 -s hd480 -c:v libx264 -crf 23 -c:a aac -strict -2 output.mp4 |
import VideoToolbox | |
import AVFoundation | |
private var __canHWAVC: Bool = false | |
private var __tokenHWAVC: dispatch_once_t = 0 | |
public protocol NYXAVCEncoderDelegate : class | |
{ | |
func didEncodeFrame(frame: CMSampleBuffer) | |
func didFailToEncodeFrame() |
#!/bin/sh | |
# This script must be executed in the repo where | |
# the *.ts files are. | |
# It will concatenate the segments into one temp | |
# file which ffmpeg will reencode the audio track. | |
# By default the ouptup filename is output.mp4 | |
# but can be changed by providing the name as parameter. | |
# | |
# ffmpeg is required |
# curl - Raw upload | |
curl -X PUT -T image.png https://example.com/upload | |
# curl - Content-Type: multipart/form-data | |
curl -F name=logo -F [email protected] https://example.org/upload | |
# curl - POST presigned URL (S3) |
# mix.exs file dependencies: | |
# defp deps do | |
# [ | |
# {:sweet_xml, "~> 0.4.0"}, | |
# {:json, "~> 0.3.0"} | |
# ] | |
# end | |
defmodule ElixirXml do | |
import SweetXml |
<?php | |
// echo uuid_encode('cd76b808-4017-4965-b9b1-2dbcf857e405'); | |
function uuid_encode($uuid){ | |
$binary = pack("h*", str_replace('-', '', $uuid)); | |
$binary = base64_encode($binary); | |
$binary = str_replace('/', '_', $binary); | |
$binary = str_replace('=', '', $binary); | |
return $binary; |