Skip to content

Instantly share code, notes, and snippets.

View rga-odoo's full-sized avatar

Ravi Gadhia rga-odoo

View GitHub Profile
input {
file {
path => "/logs/*.log"
start_position => "beginning"
sincedb_path => "/dev/null"
codec => multiline {
pattern => "^%{TIMESTAMP_ISO8601:timestamp_log} "
negate => true
what => "previous"
}
server:
http_listen_port: 9080
grpc_listen_port: 0
# log_level: debug
positions:
filename: /tmp/positions.yaml
clients:
- url: http://loki:3100/loki/api/v1/push
#!/usr/bin/env python3
import sys
sys.path.insert(1, '/Users/ravi/13.0/workspace')
import atexit
import csv # pylint: disable=deprecated-module
import logging
import os
import signal
import sys
@rga-odoo
rga-odoo / openerp_node_proxy.js
Last active August 29, 2015 14:12
OpenERP node proxy server for js test coverage
var path = "../../addons/,../../../../addons/trunk", //TODO: pass addons path as cli argument
addons = path.split(","),
addons_path = [];
var express = require("express"),
httpProxy = require('http-proxy'),
http = require('http'),
istanbul = require('istanbul'),
fs = require("fs"),
path = require('path'),
from oauth.oauth import OAuthRequest, OAuthSignatureMethod_HMAC_SHA1
from hashlib import md5
import json, time
import random, math, re, urllib, urllib2
STREAM_URL = "https://userstream.twitter.com/2/user.json"
class Token(object):
def __init__(self,key,secret):
@rga-odoo
rga-odoo / vimrc
Last active August 29, 2015 13:59
my vimrc
set nocompatible " be iMproved, required
filetype off " required
filetype indent on
syntax on
set backspace=indent,eol,start
" Better modes. Remember where we are
set viminfo=!,'100,\"100,:20,<50,s10,h,n~/.viminfo
set encoding=utf-8
#!/usr/bin/env python
'''Server to show computer load'''
import re
from os import popen
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from socket import gethostname
def load():
'''Very fancy computer load :)'''