Skip to content

Instantly share code, notes, and snippets.

View rahulmr's full-sized avatar
🏠
Working from home

Rahul Raut rahulmr

🏠
Working from home
View GitHub Profile
@rahulmr
rahulmr / warp_log_body.rs
Created April 20, 2022 11:40 — forked from Szymongib/warp_log_body.rs
Plugable filter for logging request body using Warp
// warp version 0.2.2
use warp::{Filter, Rejection};
use bytes::{Bytes, Buf};
#[tokio::main]
async fn main() {
let port: u16 = 8080;
let api = warp::any()
@rahulmr
rahulmr / jibri-minio.sh
Created March 7, 2022 08:40 — forked from dimaskiddo/jibri-minio.sh
Jitsi Jibri Automatic MinIO Uploader
#!/bin/bash -e
PATH=${PATH}:/usr/local/bin
# Configure Recordings
RECORDINGS_DIR=$1
# Configure MinIO
MC_PROTOCOL="YOUR_MINIO_PROTOCOL_HTTP_OR_HTTPS"
@rahulmr
rahulmr / jitsi-jibri-minio.md
Created March 7, 2022 08:40 — forked from dimaskiddo/jitsi-jibri-minio.md
Jitsi Jibri MinIO Setup Guide

How to Automatic Upload Jibri Recording Files to MinIO

Following tutorial will guide you how to automatic upload your Jibri recording files to your own on-premises, cloud, or dedicated servers MinIO.

Escalate Privileged

Before we begin you must make sure that you own the administration / root permission access by running following command:

@rahulmr
rahulmr / tomcat-linux.service.md
Created March 7, 2022 04:28 — forked from ovichiro/tomcat-linux.service.md
Tomcat as a service on Linux

Install Tomcat as a service on Linux

Download Tomcat from the Apache website.
Unpack in /opt/apache-tomcat-x.y.z. E.g. /opt/apache-tomcat-8.5.6.
You'll need a terminal and root access.

Create Tomcat user with restricted permissions

@rahulmr
rahulmr / nginx.conf
Created March 4, 2022 12:58 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@rahulmr
rahulmr / web.config
Created November 25, 2021 08:07 — forked from t-palmer/web.config
Example IIS web.config file for Angular Router applications
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Angular Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
@rahulmr
rahulmr / decryptchromecookies.py
Last active August 28, 2021 22:20
Decrypt Chrome Cookies File (Python 3) - Windows
# Based on:
# https://gist.github.com/DakuTree/98c8362fb424351b803e
# https://gist.github.com/jordan-wright/5770442
# https://gist.github.com/DakuTree/428e5b737306937628f2944fbfdc4ffc
# https://stackoverflow.com/questions/60416350/chrome-80-how-to-decode-cookies
# https://stackoverflow.com/questions/43987779/python-module-crypto-cipher-aes-has-no-attribute-mode-ccm-even-though-pycry
import os
import json
import base64
@rahulmr
rahulmr / client_kivy.py
Created August 26, 2021 19:39 — forked from rogererens/client_kivy.py
A Kivy client for the AutobahnPython WebSocket Echo server (Twisted-based)
# As the Kivy docs ( http://kivy.org/docs/guide/other-frameworks.html ) state:
# install_twisted_rector must be called before importing and using the reactor.
from kivy.support import install_twisted_reactor
install_twisted_reactor()
from autobahn.twisted.websocket import WebSocketClientProtocol, \
WebSocketClientFactory
class MyKivyClientProtocol(WebSocketClientProtocol):
@rahulmr
rahulmr / cron_to_run_script.py
Created August 18, 2021 09:46 — forked from trAve3113r/cron_to_run_script.py
Run python scripts in virtualenv using cron
# execute a python script in virtualenn using cron
# web links to solutions
# http://www.adminschoice.com/crontab-quick-reference
# https://www.unix.com/man-page/linux/5/crontab/
PATH="" # RUN 'echo PATH' as root
MAILTO=mwaigaryan@gmail.com
# setup e-mail first :: https://www.nixtutor.com/linux/send-mail-with-gmail-and-ssmtp/
@rahulmr
rahulmr / hashSHASalt.py
Created June 15, 2021 04:57 — forked from markito/hashSHASalt.py
Hashing using SHA256/Salt in Python
import uuid
import hashlib
def hashText(text):
"""
Basic hashing function for a text using random unique salt.
"""
salt = uuid.uuid4().hex
return hashlib.sha256(salt.encode() + text.encode()).hexdigest() + ':' + salt