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 / irene_globals.user.js
Last active March 14, 2024 09:30
Tampermonkey script for scope injection in irene
// ==UserScript==
// @name Irene Globals
// @namespace https://appknox.com/
// @version 2.0.0
// @description load irene globals for console operations
// @author cosmosgenius
// @match http://irene.local:4200/*
// @match http://localhost:4200/*
// @match https://secure.appknox.com/*
// @icon https://secure.appknox.com/images/favicon.ico
@cosmosgenius
cosmosgenius / isitflutter.py
Created July 23, 2021 10:42
Detect if the app is flutter or not
import argparse
import os.path
from zipfile import ZipFile
parser = argparse.ArgumentParser()
parser.add_argument("app", help="Path to IPA file")
args = parser.parse_args()
ipalocation = args.app
if not os.path.isfile(ipalocation):
raise Exception("file missing")
@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,
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
#!/bin/sh
git --work-tree=/home/ubuntu/settings.git --git-dir=/home/ubuntu/settings.git/.git pull -p
@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
@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 / 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 / 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 / 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/ \