Configure nginx with HTTP JavaScript module using the --add-module option:
./configure --add-module=<path-to-njs>/nginx
Alternatively, you can build a dynamic version of the njs module
./configure --add-dynamic-module=<path-to-njs>/nginx
#!/bin/sh | |
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264 | |
if [ "`/usr/bin/whoami`" != "root" ]; then | |
echo "You need to execute this script as root." | |
exit 1 | |
fi | |
cat > /etc/yum.repos.d/centos.repo<<EOF |
# Install linux update, followed by GCC and Make | |
sudo yum -y update | |
sudo yum install -y gcc make | |
# Install Nginx and PHP-FPM | |
sudo yum install -y nginx php70-fpm | |
# Install PHP extensions | |
sudo yum install -y php70-devel php70-mysql php70-pdo \ | |
php70-pear php70-mbstring php70-cli php70-odbc \ |
def measure | |
t = Time.now | |
yield | |
puts Time.now - t | |
end |
output = popen("/usr/local/bin/ffprobe -v error -show_format -show_streams %s" % self._audio).read() | |
for spec in {'sample_rate', 'channels'}: | |
eval(u'{0:s} = popen("echo "{0:s}" | grep {0:s}).read().replace("{0:s}=", "").rstrip("\n")'.format(spec)) | |
# sample_rate = popen("echo \"%s\" | grep sample_rate" % output).read().replace("sample_rate=", "").rstrip('\n') | |
# channels = popen("echo \"%s\" | grep channels" % output).read().replace("channels=", "").rstrip('\n') | |
if int(sample_rate) > 16000 or int(channels) > 1: | |
filename, extension = self._audio.split('.') | |
output_file = ".%s_mono.%s" % (filename, extension) |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import os | |
sys.path.insert(0, os.path.abspath('..')) | |
from facebookads.objects import ( | |
AdUser, |
module MIU where | |
data Symbol : Set where | |
I : Symbol | |
U : Symbol | |
open import Data.List | |
Word : Set | |
Word = List Symbol |
module MIU where | |
data Symbol : Set where | |
I : Symbol | |
U : Symbol | |
open import Data.List | |
Word : Set | |
Word = List Symbol |
module CacheClassMethods | |
def has_serializer | |
if self.instance_eval "Object.const_defined? #{self.class.name}Serializer.to_s" | |
self.instance_eval "#{self.class.name}Serializer" | |
end | |
end | |
def hash_key(source = nil) | |
"#{self.class.name.to_s.downcase}:#{source.to_s.downcase}" |
[general] | |
state_file = /var/lib/awslogs/agent-state | |
[messsages] | |
datetime_format = %b %d %H:%M:%S | |
file = /var/log/messages | |
buffer_duration = 5000 | |
log_stream_name = {hostname} - {instance_id} | |
initial_position = start_of_file | |
log_group_name = messages |
Configure nginx with HTTP JavaScript module using the --add-module option:
./configure --add-module=<path-to-njs>/nginx
Alternatively, you can build a dynamic version of the njs module
./configure --add-dynamic-module=<path-to-njs>/nginx