A fast guide for installing an ELK system. Extracted from Install ELK in 14.04
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java8-installer
const ListItems = () => { | |
const items = [ | |
"Aline", | |
"Clemmie", | |
"Sheba", | |
"Netty", | |
"Spencer", | |
"Aube", | |
"Monika", | |
"Mitch", |
[Unit] | |
Description=Tunnel Client | |
After=network.target | |
[Service] | |
User=root | |
Restart=always | |
WorkingDirectory=/etc/tunnel | |
SyslogIdentifier=tunneld-client | |
ExecStart=/usr/bin/tunnel -config /etc/tunnel/tunnel.yml start-all |
#!/usr/bin/env node | |
const fs = require('fs'); | |
const path = require('path'); | |
const exec = require('child_process').execSync; | |
const uuid = require('uuid'); | |
const S3_BUCKET = 'YOUR_BUCKET_NAME'; | |
const [ , , ...args] = process.argv; |
#!/usr/bin/env node | |
const fs = require('fs'); | |
const path = require('path'); | |
const exec = require('child_process').execSync; | |
const [ , , ...args] = process.argv; | |
// Check if is a git repo | |
if( !fs.existsSync('./.git') ){ |
# /etc/init/foreverinit.conf | |
#description "Forever process" | |
#start on startup | |
#stop on shutdown | |
#setuid myuser | |
#setgid myuser | |
#expect fork |
require 'json' | |
require 'faraday' | |
require 'hashie/mash' | |
class AbstractApi | |
BASE_URL = ENV['ABSTRACT_API_BASE_URL'] || 'https://myapp.com/api' | |
API_VERSION = ENV['ABSTRACT_API_BASE_URL_VERSION'] || 'v1' | |
class Client | |
attr_reader :access_token, :base_url, :apiver |
description "Application service" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
setuid appuser | |
setgid www-data | |
env PATH=/home/user/app/environment/bin |
# lib/rethinkdb_session_store.rb | |
require 'rethinkdb' | |
class RethinkdbSessionStore < ActionDispatch::Session::AbstractStore | |
def initialize(app, options = {}) | |
super | |
@r = RethinkDB::RQL.new.table('sessions') | |
end | |
def get_session(env, session_id) |
module ActionDispatch | |
module Session | |
class CustomFileStore < ActionDispatch::Session::AbstractStore | |
def get_session(env, session_id) | |
session_data = {} | |
session_id ||= generate_sid | |
File.open(tmp_file(session_id),'r') do |f| | |
data = f.read | |
session_data = ::Marshal.load(data) unless data.empty? | |
end rescue nil |
A fast guide for installing an ELK system. Extracted from Install ELK in 14.04
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java8-installer