Skip to content

Instantly share code, notes, and snippets.

View RushOnline's full-sized avatar

Eugene RushOnline

  • Intech
  • Great Novgorod, Russia
View GitHub Profile
@RushOnline
RushOnline / myapp-rails.conf
Created April 28, 2013 14:24
Run rails application under upstart control
description "MyApp @ Rails"
start on runlevel [2345]
stop on runlevel [!2345]
env APP_PATH="/var/www/apps/ecilop"
env APP_USER="deploy"
env APP_EXEC="rails server -e production"
# env APP_EXEC="rackup myapp.ru -s thin -E production"
@RushOnline
RushOnline / boot.rb
Created April 22, 2013 13:54
Change default host:port bindings for rails app. Add the following lines to the file config/boot.rb
# add following to file config/boot.rb to change default host:port bindings
require 'rails/commands/server'
module Rails
class Server
alias :default_options_alias :default_options
def default_options
default_options_alias.merge!(Host: '127.0.0.1', Port: 3333)
end
@RushOnline
RushOnline / gist:5387778
Created April 15, 2013 12:43
Replace DryCrudSample with HotspotManager in all files within current directory recursively.
grep -Rl DryCrudSample . | xargs -n1 sed -i 's/DryCrudSample/HotspotManager/g'
--- rp-pppoe-3.8/src/pppoe-server.c 2010-07-15 16:42:39.031057949 +0400
+++ rp-pppoe-3.8/src/pppoe-server.c 2010-07-15 16:48:14.078605821 +0400
@@ -97,6 +97,7 @@
#define MAX_SERVICE_NAMES 64
static int NumServiceNames = 0;
static char const *ServiceNames[MAX_SERVICE_NAMES];
+static int ReactionOnNoServiceName = 1;
PppoeSessionFunctionTable DefaultSessionFunctionTable = {
PppoeStopSession,