Skip to content

Instantly share code, notes, and snippets.

View cosmosgenius's full-sized avatar
💭
Websocket debugging

Sharat MR cosmosgenius

💭
Websocket debugging
View GitHub Profile
@cosmosgenius
cosmosgenius / redis.win.conf
Created March 3, 2015 18:23
Redis Windows Config
port 6379
timeout 0
tcp-keepalive 0
loglevel notice
logfile stdout
databases 16
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
@cosmosgenius
cosmosgenius / xlstojson.py
Last active December 18, 2015 06:59
script to convert a expense excel sheet to json data
import xlrd
import json
import sys
import argparse
def convert(workbook):
wb = xlrd.open_workbook(workbook)
year = 2013
data = []
@cosmosgenius
cosmosgenius / nginx-compile-configure
Created October 19, 2013 19:30
nginx compilation configurations
./configure --prefix=$HOME \
--sbin-path=$HOME/sbin/nginx \
--conf-path=$HOME/etc/nginx/nginx.conf \
--error-log-path=$HOME/var/logs/nginx/error.log \
--http-log-path=$HOME/var/logs/nginx/access.log \
--pid-path=$HOME/var/logs/nginx/nginx.pid \
--lock-path=$HOME/var/logs/nginx/nginx.lock \
--http-proxy-temp-path=$HOME/tmp/nginx/proxy/ \
--http-fastcgi-temp-path=$HOME/tmp/nginx/fastcgi/ \
--http-uwsgi-temp-path=$HOME/tmp/nginx/uwsgi/ \
@cosmosgenius
cosmosgenius / keybase.md
Last active February 10, 2017 08:13
keybase.md

Keybase proof

I hereby claim:

  • I am cosmosgenius on github.
  • I am sharat (https://keybase.io/sharat) on keybase.
  • I have a public key ASBDRPP_r-Bj96F6J8KK9yiTGlDo4xaT4Wq3pYOsloHY3Ao

To claim this, I am signing this object:

@cosmosgenius
cosmosgenius / etcd.xml
Created March 31, 2017 11:19
etcd firewalld service
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>etcd is a distributed, consistent key-value store for shared configuration and service discovery</short>
<description>etcd is a distributed, consistent key-value store for shared configuration and service discovery</description>
<port protocol="tcp" port="2379"/>
<port protocol="tcp" port="2380"/>
</service>
@cosmosgenius
cosmosgenius / nginx.conf
Last active March 31, 2017 14:10
Nginx Config
user nginx;
worker_processes auto;
worker_rlimit_nofile 65535;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 4096;
@cosmosgenius
cosmosgenius / confd.service
Created March 31, 2017 14:46
confd service
[Unit]
Description=Confd
After=etcd.service
[Service]
ExecStart=/usr/bin/confd -backend etcd -node http://127.0.0.1:2379 --watch
Restart=always
[Install]
WantedBy=basic.target
#!/bin/sh
git --work-tree=/home/ubuntu/settings.git --git-dir=/home/ubuntu/settings.git/.git pull -p
1) Read an image from file
2) Display an image that you read from file
3) Capture Video using your webcam and display the feed
4) Display back and white live stream from your webcam.
5) Have a slider to change brightness of the webcam live stream. Display.
6) Have a slider to change contrast of the webcam live stream. Display.
7) Capture a snapshot from your webcam. Then display difference between live video stream and this snapshot. (Background subtraction)
8) Display Canny edge image from your live webcam stream
9) Have a slider to change smoothness / sharpness of image from live webcam stream.
10) Display histogram of colors (RGB) from your live webcam stream
@cosmosgenius
cosmosgenius / dump_server.py
Created September 20, 2020 10:52
Python3 request dump http.server
#!/usr/bin/env python3
import os
import contextlib
import sys
import socket
from functools import partial
import logging
from http.server import (
BaseHTTPRequestHandler,