Skip to content

Instantly share code, notes, and snippets.

View ryanbennettvoid's full-sized avatar

Ryan Bennett ryanbennettvoid

View GitHub Profile
@douglasmiranda
douglasmiranda / gist:f4fb99eb25a59838489b
Created March 25, 2015 05:04
install thumbor (ubuntu 14.04)
add-apt-repository ppa:mc3man/trusty-media -y && sudo apt-get update
apt-get install ffmpeg libjpeg-dev libpng-dev libtiff-dev libjasper-dev libgtk2.0-dev python-numpy python-pycurl webp python-opencv python-dev python-pip
pip install thumbor
@chrishaff
chrishaff / gist:83b0a3b621c3301ecc32
Last active October 8, 2017 12:39 — forked from okor/gist:79c38cfb03b153bd4eb2
Install Thumbor on Ubuntu 14.04 includes python-opencv for face/feature detection. Don't forget to enable the detectors https://github.com/thumbor/thumbor/wiki/Enabling-detectors.
# sudo su and run the following
sudo apt-get update && \
sudo apt-get -y upgrade && \
# install all dependencies
sudo apt-get -y install \
build-essential \
checkinstall \
gcc \
@slav123
slav123 / doPut.go
Created August 18, 2014 04:20
PUT request GO LANG
func doPut(url string) {
client := &http.Client{}
request, err := http.NewRequest("PUT", url, strings.NewReader("<golang>really</golang>"))
request.SetBasicAuth("admin", "admin")
request.ContentLength = 23
response, err := client.Do(request)
if err != nil {
log.Fatal(err)
} else {
defer response.Body.Close()
@ddennedy
ddennedy / dash-avc264 command lines
Last active July 27, 2022 03:44
Use ffmpeg and mp4box to prepare DASH-AVC/264 v1.0 VoD
See my DASH-IF presentation from October, 2014:
https://s3.amazonaws.com/misc.meltymedia/dash-if-reveal/index.html#/
1. encode multiple bitrates with keyframe alignment:
ffmpeg -i ~/Movies/5D2_Portrait.MOV -s 1280x720 -c:v libx264 -b:v 1450k -bf 2 \
-g 90 -sc_threshold 0 -c:a aac -strict experimental -b:a 96k -ar 32000 out.mp4
My input was 30 fps = 3000 ms. If it were 29.97, then a GOP size of 90 frames will yield a base segment
size of 3003 milliseconds. You can make the segment size some multiple of this, e.g.: 6006, 9009, 12012.
require 'google-search'
require 'thread'
require 'nokogiri'
require 'open-uri'
CASCADE_SNIPPETS = false
def method_missing method_name, *args, &block
result_queue = Queue.new
@micho
micho / nginx.conf
Last active September 29, 2023 16:38 — forked from unixcharles/nginx.conf
nginx config for http/https proxy to localhost:3000
First, install nginx for mac with "brew install nginx".
Then follow homebrew's instructions to know where the config file is.
1. To use https you will need a self-signed certificate: https://devcenter.heroku.com/articles/ssl-certificate-self
2. Copy it somewhere (use full path in the example below for server.* files)
3. sudo nginx -s reload
4. Access https://localhost/
Edit /usr/local/etc/nginx/nginx.conf:
@AliMD
AliMD / install-doceker.md
Last active October 24, 2023 07:30
Install docker on linux as easy as possible

Install Docker on linux

Any distribution of architecture as easy as possible.

# Install docker latest version from original website
curl -fsSL https://get.docker.com/ | sh

# Adding your user to the "docker" group
sudo usermod -aG docker $(whoami)
## you will have to log out and back in for this to take effect!
@tsabat
tsabat / supervisor.conf
Created December 28, 2011 15:09
Sample supervisor config file
; Sample supervisor config file.
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; sockef file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
;[inet_http_server] ; inet (TCP) server disabled by default
@CAFxX
CAFxX / persistent_pipes_linux.md
Last active January 4, 2024 04:32
Persistent pipes/circular buffers for Linux

📂 Persistent "pipes" in Linux

In a project I'm working on I ran into the requirement of having some sort of persistent FIFO buffer or pipe in Linux, i.e. something file-like that could accept writes from a process and persist it to disk until a second process reads (and acknowledges) it. The persistence should be both across process restarts as well as OS restarts.

AFAICT unfortunately in the Linux world such a primitive does not exist (named pipes/FIFOs do not persist

@phuysmans
phuysmans / gist:4f67a7fa1b0c6809a86f014694ac6c3a
Created January 8, 2018 09:29
docker compose health check example
version: '2.1'
services:
php:
tty: true
build:
context: .
dockerfile: tests/Docker/Dockerfile-PHP
args:
version: cli
volumes: