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
@Shumen
Shumen / kvm.sh
Last active August 29, 2015 14:03 — forked from will3942/kvm.sh
OSXKVM
# OSXKVM project's ultimate goal is to upstream to run MacOSX from unadulterated and standard images on KVM.
# http://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/
# http://kashyapc.com/2014/03/10/notes-for-building-kvm-based-virtualization-components-from-upstream-git/
# http://blog.ostanin.org/2014/02/11/playing-with-mac-os-x-on-kvm/ #ubuntu12.04, http://files.ostanin.org/2014/02/osx-kvm.tar.xz
# http://www.vpsee.com/2014/06/install-and-run-os-x-mavericks-with-kvm-under-linux/ #Verified on CentOS 6.5 with 3.x kernel
# kernel 3.10.0-* can be patched directly, no need kvm-kmod external module.
# http://git.kernel.org/cgit/virt/kvm/kvm.git/commit/?id=100943c54e0947a07d2c0185368fc2fd848f7f28
# https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/?id=refs/tags/v3.10
@peterhellberg
peterhellberg / browse.tpl
Last active May 1, 2017 21:01
Code7 template used by the Caddy browse directive
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<link rel="stylesheet" href="http://c7.se/css/main.css">
<style>
body { font-family: 'Helvetica Neue', Sans-serif; }
#list {
width: 100%;
}
@ndhu
ndhu / phantomjsGoogleSearch
Created January 8, 2014 23:02
phantomjs. example on how to search google, collect links of search result and scrape multiple pages of the search result
/**
* Created by andy hulstkamp
*/
var webpage = require("webpage"),
fs = require("fs");
var debug = false,
pageIndex = 0,
allLinks = [],
@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
@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 / 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" />
@anthonytxie
anthonytxie / hodl20.py
Created March 24, 2018 21:01
Hodl 20 Rebalancing Algorithm
def calc_allocations(self, date, quantity, cap):
"""Figure out ideal allocations for a given date"""
# {
# coin_name: (percent_allocation, data)
# }
top_market = self.get_top_market(date, quantity)
total_cap = sum([coin.market_cap for coin in top_market])
allocations = [{
@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:

@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"
@resouer
resouer / pod1.yml
Last active March 13, 2023 08:40
How to implement volumes-from in Kubernetes Pod?
---
apiVersion: v1
kind: Pod
metadata:
name: server
spec:
containers:
- image: resouer/sample:v2
name: war
lifecycle: