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 / traefik.yaml
Created May 21, 2024 19:29
Local routed setup
# Static configuration
log:
level: INFO
accessLog:
addInternals: false
api:
insecure: true
dashboard: true
@cosmosgenius
cosmosgenius / run.py
Last active April 29, 2024 08:38
Render a geojson file with openstreetmap tiles to png
import geopandas as gpd
import matplotlib.pyplot as plt
import contextily as ctx
# Read the GeoJSON file
gdf = gpd.read_file("file.geojson")
# Plot the GeoJSON data
fig, ax = plt.subplots(figsize=(5, 5))
gdf.plot(ax=ax, edgecolor='blue', facecolor='none') # Plot GeoJSON data
@cosmosgenius
cosmosgenius / irene_globals.user.js
Last active May 21, 2024 11:43
Tampermonkey script for scope injection in irene
// ==UserScript==
// @name Irene Globals
// @namespace https://appknox.com/
// @version 2.0.1
// @description load irene globals for console operations
// @author cosmosgenius
// @match http://irene.local:4200/*
// @match http://localhost:4200/*
// @match https://secure.appknox.com/*
// @match https://*.staging.do.appknox.io/*
@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: