This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user saulius saulius; | |
worker_processes 4; | |
error_log /var/log/nginx/nginx.log debug; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
multi_accept on; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: nginx init.d script for Ubuntu. | |
# Description: nginx init.d script for Ubuntu. | |
### END INIT INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./configure \ | |
--prefix=/opt/nginx \ | |
--with-pcre='/home/ubuntu/_sources/pcre' \ | |
--with-http_ssl_module \ | |
--with-http_gzip_static_module \ | |
--with-http_stub_status_module \ | |
--with-cc-opt='-Wno-error' \ | |
--add-module='/home/ubuntu/.rvm/gems/ruby-2.2.0/gems/passenger-5.0.7/ext/nginx' \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--http-log-path=/var/log/nginx/access.log \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# /etc/init.d/sentry | |
# A debian-compatible sentry startup script | |
# | |
### BEGIN INIT INFO | |
# Provides: sentry | |
# Required-Start: $remote_fs $syslog $network | |
# Required-Stop: $remote_fs $syslog $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Time | |
# See http://msdn.microsoft.com/en-us/library/system.datetime.ticks.aspx | |
# https://gist.github.com/chancancode/2830878 | |
TICKS_SINCE_EPOCH = -(Time.utc(0001, 01, 01).to_i * 10000000) | |
def to_ticks | |
utc.to_i * 10000000 + TICKS_SINCE_EPOCH # ruby 1.8.7 doesn't support nano seconds so we're ok without it | |
# to_i * 10000000 + nsec / 100 - TICKS_SINCE_EPOCH | |
# <seconds from 1970-01-01 multiplied by 10 000 000> result is ticks + <self nsec which by default would be skipped>/100 result is ticks + ticks from 0001-01-01 | |
end |