This file contains hidden or 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
"gcc-4.2 -o conftest -I/Users/VuTran/.rvm/rubies/ruby-1.9.3-p429/include/ruby-1.9.1/x86_64-darwin12.4.0 -I/Users/VuTran/.rvm/rubies/ruby-1.9.3-p429/include/ruby-1.9.1/ruby/backward -I/Users/VuTran/.rvm/rubies/ruby-1.9.3-p429/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/sw/include -D_GNU_SOURCE -DPOSIX_C_SOURCE=1-D_POSIX_C_SOURCE=200112L -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -fno-common -pipe conftest.c -L. -L/Users/VuTran/.rvm/rubies/ruby-1.9.3-p429/lib -L/sw/lib -L. -L/sw/lib -lruby.1.9.1 -lpthread -ldl -lobjc " | |
/Users/VuTran/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:317: warning: Insecure world writable dir /usr/local in PATH, mode 040777 | |
In file included from /Users/VuTran/.rvm/rubies/ruby-1.9.3-p429/include/ruby-1.9.1/ruby.h:32, | |
from conftest.c:1: | |
/Users/VuTran/.rvm/rubi |
This file contains hidden or 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
App 3230 stderr: [ 2014-02-18 19:04:53.2116 3677/0x00000004c9ece0(Worker 1) utils.rb:68 ]: *** Exception Errno::ECONNRESET in Rack body object #each method (Connection reset by peer) (process 3677, thread 0x00000004c9ece0(Worker 1)): | |
App 3230 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/utils/unseekable_socket.rb:114:in `write' | |
App 3230 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/utils/unseekable_socket.rb:114:in `write' | |
App 3230 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:141:in `block in process_request' | |
App 3230 stderr: from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/activerecord-3.2.12/lib/active_record/query_cache.rb:46:in `each' | |
App 3230 stderr: from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/activerecord-3.2.12/lib/active_record/query_cache.rb:46:in `each' | |
App 3230 stderr: from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/co |
This file contains hidden or 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
Add all the following lines to the file: “/etc/sysctl.conf” | |
fs.file-max = 5000000 | |
net.core.netdev_max_backlog = 400000 | |
net.core.optmem_max = 10000000 | |
net.core.rmem_default = 10000000 | |
net.core.rmem_max = 10000000 | |
net.core.somaxconn = 100000 | |
net.core.wmem_default = 10000000 | |
net.core.wmem_max = 10000000 |
This file contains hidden or 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: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
This file contains hidden or 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
# in lib/lotus/commands/console.rb | |
def load_engine(engine) | |
require engine | |
rescue LoadError | |
ensure | |
return Object.const_get( | |
ENGINES.fetch(engine) { | |
raise ArgumentError.new("Unknown console engine: #{ engine }") | |
} |
This file contains hidden or 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
Python snippet to count number of requests on countries. | |
```python | |
# in examples/src/main/python/access_log_analyzer.py | |
import sys | |
from pyspark import SparkContext | |
from geoip import geolite2 |
This file contains hidden or 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 API::V1::BaseController < ApplicationController | |
skip_before_filter :verify_authenticity_token | |
before_filter :cors_preflight_check | |
after_filter :cors_set_access_control_headers | |
def cors_set_access_control_headers | |
headers['Access-Control-Allow-Origin'] = '*' | |
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS' |
This file contains hidden or 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
package main | |
import ( | |
"bufio" | |
"net" | |
) | |
type Client struct { | |
incoming chan string | |
outgoing chan string |
This file contains hidden or 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
echo ">> Prepare" | |
ls /etc/apt/sources.list.d/ | grep mongodb | |
if [ $? -ne 0 ]; then | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list | |
fi | |
echo ">> Updating System" | |
sudo apt-get update | |
# handle current bug in grub menu |
This file contains hidden or 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
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties | |
16/04/04 01:57:42 INFO SparkContext: Running Spark version 1.6.1 | |
16/04/04 01:57:42 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable | |
16/04/04 01:57:43 INFO SecurityManager: Changing view acls to: ubuntu | |
16/04/04 01:57:43 INFO SecurityManager: Changing modify acls to: ubuntu | |
16/04/04 01:57:43 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(ubuntu); users with modify permissions: Set(ubuntu) | |
16/04/04 01:57:43 INFO Utils: Successfully started service 'sparkDriver' on port 60507. | |
16/04/04 01:57:44 INFO Slf4jLogger: Slf4jLogger started | |
16/04/04 01:57:44 INFO Remoting: Starting remoting | |
16/04/04 01:57:44 INFO Remoting: Remoting started; listening on addresses :[akka.tcp://[email protected]:55429] |
OlderNewer