I hereby claim:
- I am ktham on github.
- I am kevintham (https://keybase.io/kevintham) on keybase.
- I have a public key ASA70H-Lg-zL-bE9Q_Lx-ZagsbKox3uoLkjtG6eEjkD49go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # Running a simple web server in ruby | |
| ruby -run -e httpd . -p 8888 | |
| # Running a simple web server in python2 | |
| python -m SimpleHTTPServer 8888 | |
| # Running a simple web server in python3 | |
| python3 -m http.server 8888 | |
| # Running a simple web server in node via http-server |
Installs ruby-2.0.0-p0 on ubuntu via checkinstall so it's in your package manager and you can remove it.
Quick install:
curl -L https://gist.github.com/ngauthier/5039249/raw/1868bf4714052b40e2bb7fdf3f40fbeb5d730bca/ruby-2-install-ubuntu.sh | bash -s
| #! /bin/sh | |
| # Copyright (c) 2013 PgPool Global Development Group | |
| # | |
| # Permission to use, copy, modify, and distribute this software and | |
| # its documentation for any purpose and without fee is hereby | |
| # granted, provided that the above copyright notice appear in all | |
| # copies and that both that copyright notice and this permission | |
| # notice appear in supporting documentation, and that the name of the | |
| # author not be used in advertising or publicity pertaining to | |
| # distribution of the software without specific, written prior |
| # Outputs this at warn log level: | |
| # 1.2.3.4 GET /path 200 OK BlahController#action HTML 938.2 (DB 11.8, View 719.7) {params} {optional params from flash[:log]} | |
| # | |
| # Save as config/initializers/oneline_detailed_logging.rb. Consider | |
| # decreasing the log level from "info" to "warn" (in production.rb) so | |
| # the one-line log message replaces the standard request logs. | |
| # override process_action to add 2 things to the payload: | |
| # - remote IP |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
| if Rails.env.production? | |
| require 'new_relic/agent/instrumentation/controller_instrumentation' | |
| module NewRelic | |
| module Agent | |
| module Instrumentation | |
| module API | |
| def newrelic_request_headers | |
| @newrelic_request.env |
| module ActiveRecord | |
| module ConnectionAdapters | |
| module DatabaseStatements | |
| # | |
| # Run the normal transaction method; when it's done, check to see if there | |
| # is exactly one open transaction. If so, that's the transactional | |
| # fixtures transaction; from the model's standpoint, the completed | |
| # transaction is the real deal. Send commit callbacks to models. | |
| # | |
| # If the transaction block raises a Rollback, we need to know, so we don't |
| # Make sure xCode 4.3 is installed first!!! | |
| # Command line tools no longer come bundled with xCode, install it by going to: | |
| preferences -> downloads -> command line tools | |
| # Install RVM | |
| bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) | |
| # Then restart terminal |