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
@ovichiro
ovichiro / tomcat-linux.service.md
Last active February 2, 2024 03:20
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

@kenwalger
kenwalger / Program.cs
Last active May 1, 2024 10:38
C# and MongoDB Update Operation
using System;
using MongoDB.Bson;
using MongoDB.Driver;
namespace MongoDBCRUDExample
{
class Program
{
static void Main(string[] args)
@bsergean
bsergean / Dockerfile
Created November 20, 2019 19:16
simple websocket proxy written in python
FROM python:3.8.0-alpine3.10
RUN pip install websockets
COPY ws_proxy.py /usr/bin
RUN chmod +x /usr/bin/ws_proxy.py
EXPOSE 8765
CMD ["python", "/usr/bin/ws_proxy.py"]
@khiemdoan
khiemdoan / install_microk8s.sh
Last active September 30, 2023 21:53
Install Microk8s on Ubuntu machine
# Install microk8s from the edge channel (Rancher requires Helm 2.15.1 or above)
sudo snap install microk8s --classic
# Enable useful plugins
sudo microk8s.enable dns dashboard storage ingress helm
# Allow running priviledged Pods (required by Rancher's `cattle-node-agent`)
sudo sh -c 'echo "--allow-privileged=true" >> /var/snap/microk8s/current/args/kube-apiserver'
sudo systemctl restart snap.microk8s.daemon-apiserver.service
# Setup and install Tiller (part of Helm)
image: node:10.15.0
test: &test
name: Install and Test
script:
- cd my-tools
- npm install
- npm test
- npm pack
artifacts: # defining the artifacts to be passed to each future step.
# - dist/**
@dimaskiddo
dimaskiddo / jibri-minio.sh
Created July 10, 2020 09:02
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"
@dimaskiddo
dimaskiddo / jitsi-jibri-minio.md
Created July 10, 2020 09:06
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:

@kiterobo
kiterobo / create-kiteconnect-candlestick-q.py
Created August 20, 2020 05:41 — forked from oldmonkABA/create-kiteconnect-candlestick-q.py
Implementation of ticks to 1min and 15 mins candles in zerodha kiteconnect using python queues. This code is modified version of the code given in http://ezeetrading.in/Articles/Candles_formation_from_tick_data_zerodha.html. The difference is that in on_ticks functions the only action performed is that the ticks are place in a event queue. This …
################## Ticks to candles in kiteconnect python ####################
# Author : Arun B
# Reference : http://ezeetrading.in/Articles/Candles_formation_from_tick_data_zerodha.html
# Purpose : Convert ticks to candles by putting ticks in a queue. This redues time wasted in on_ticks function
################################################################################
from kiteconnect import KiteTicker
import datetime
from copy import copy
import queue
@byt3bl33d3r
byt3bl33d3r / ws.ps1
Last active April 23, 2024 15:33
Async Websocket PowerShell client (producer/consumer pattern)
<#
References:
- https://docs.microsoft.com/en-us/dotnet/api/system.net.websockets.clientwebsocket?view=netframework-4.5
- https://github.com/poshbotio/PoshBot/blob/master/PoshBot/Implementations/Slack/SlackConnection.ps1
- https://www.leeholmes.com/blog/2018/09/05/producer-consumer-parallelism-in-powershell/
#>
$client_id = [System.GUID]::NewGuid()
$recv_queue = New-Object 'System.Collections.Concurrent.ConcurrentQueue[String]'
@cabrerahector
cabrerahector / bitbucket-pipelines.yml
Last active January 24, 2024 14:17
Bitbucket Pipelines - Deploying to Server with atlassian/ftp-deploy with Manual Triggers
image: atlassian/default-image:2
pipelines:
custom:
deploy-to-production:
- step:
name: Deploy to Production
deployment: production
script: