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 / docker_wordpress.md
Created August 30, 2024 23:39 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@rahulmr
rahulmr / Program.cs
Created May 1, 2024 10:38 — forked from kenwalger/Program.cs
C# and MongoDB Update Operation
using System;
using MongoDB.Bson;
using MongoDB.Driver;
namespace MongoDBCRUDExample
{
class Program
{
static void Main(string[] args)
@rahulmr
rahulmr / ws.ps1
Created October 13, 2023 10:29 — forked from byt3bl33d3r/ws.ps1
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]'
@rahulmr
rahulmr / install_microk8s.sh
Created September 30, 2023 21:53 — forked from khiemdoan/install_microk8s.sh
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)
@rahulmr
rahulmr / Dockerfile
Created August 4, 2023 07:57 — forked from bsergean/Dockerfile
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"]
@rahulmr
rahulmr / bitbucket-pipelines.yml
Created March 13, 2023 08:41 — forked from cabrerahector/bitbucket-pipelines.yml
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:
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/**
// import_json_appsscript.js
// https://gist.github.com/allenyllee/c764c86ed722417948fc256b7a5077c4
//
// Changelog:
// (Oct. 16 2019) tag: allenyllee-20191016
// 1. Fixed google script error: urlfetchapp - service invoked too many times https://stackoverflow.com/questions/10598179/google-apps-script-urlfetchapp-service-invoked-too-many-times
// (Jul. 16 2018) tag: allenyllee-20180716
// 1. Fixed the issue "If you try to query /arrayA[k]/arrayB[n]/arrayC[m]/.../member, you will always get /arrayA[k]/arrayB[k]/arrayC[k]/.../member."
// (Nov. 30 2017) tag: allenyllee-20171130
// 1. Add the ability to query array elements by using xpath like "/array[n]/member" where "n" is array index
@rahulmr
rahulmr / env.rb
Created September 28, 2022 16:06 — forked from SarahElson/env.rb
How To Implement Data Tables In Cucumber Using Selenium Ruby
#/support/env.rb
require 'rubygems'
require 'watir'
Before do |scenario|
$browser = Watir::Browser.new :firefox
$browser.driver.manage.window.maximize
end
After do |scenario|
@rahulmr
rahulmr / ecommerce_steps.rb
Created September 28, 2022 16:06 — forked from SarahElson/ecommerce_steps.rb
How To Implement Data Tables In Cucumber Using Selenium Ruby
#/step_definistions/ecommerce_steps.rb
Given(/^Ecommerce webpage Login Page loads$/) do
$browser.goto "https://ecommerce-playground.lambdatest.io/index.php?route=account/login"
$user_session = LoginPage.new
end
Then(/^Ecommerce Login Link is present loaded$/) do
assert($user_session.username_textbox.name, "email")
assert($user_session.password_textbox.name, "password")
end