Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View gayanvirajith's full-sized avatar
:octocat:

Gayan Virajith gayanvirajith

:octocat:
View GitHub Profile
@gayanvirajith
gayanvirajith / python-beatifulsoup.py
Last active August 17, 2021 07:51
Extract html table column values using python 3 and beautifulsoup4
from urllib.request import urlopen
from bs4 import BeautifulSoup
import pandas as pd
html = urlopen("http://localhost:8080")
soup = BeautifulSoup(html, "html.parser")
table = soup.find("table")
files = {'path': []}
@gayanvirajith
gayanvirajith / visual-studio-vim.md
Last active June 22, 2021 00:46
Visual studio vim troubleshoot
@gayanvirajith
gayanvirajith / react-autoformatters.md
Last active June 5, 2021 12:41
React formatters and git hooks

React formatters and git hooks

Note: On visual studio code you should installed Eslint and Prettier plugins

Install dev dependencies.

npm i prettier eslint-config-prettier eslint-plugin-prettier --save-dev
@gayanvirajith
gayanvirajith / sample-command-line.js
Created June 3, 2021 05:42
Node command line arg sample
const commandLineArgs = require("command-line-args");
const commandArgs = commandLineArgs([
{
name: "check",
type: Boolean
},
{
name: "export",
type: Boolean
autonumber

Title: ATM Flow

_: ** Withdraw cash **

USER -> ATM: Insert card

ATM -> BANK: Verify card
@gayanvirajith
gayanvirajith / readme.md
Created February 6, 2021 09:49
check recently modified files

How to check recently modified files using terminal commands on Linux:

Type in your terminal:

$ find /etc -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort -r .

If you want to see directory files, type in your terminal:

@gayanvirajith
gayanvirajith / docker-compose.yml
Last active January 8, 2021 09:59
MongoDB replica set with docker and docker-compose
version: "3.0"
volumes:
mongo-keys:
mongo-data-1:
mongo-data-2:
mongo-data-3:
networks:
rs0:
@gayanvirajith
gayanvirajith / readme.md
Last active December 4, 2020 04:52
Amazon linux 1 and 2- php 7.2 installations

Amazon Linux 1

sudo yum update
sudo yum install php72 php72-cli php72-xml php72-json php72-mbstring php72-process php72-common php72-fpm php72-zip php72-mysqlnd vim

Amazon Linux 2

sudo amazon-linux-extras enable php7.2
@gayanvirajith
gayanvirajith / readme.md
Last active December 1, 2020 08:16
dnsmask - DNS Masking
@gayanvirajith
gayanvirajith / readme.md
Last active September 19, 2021 15:14
mongo db docker

setup mongo on docker

Create bridge network

docker network create mynet

Pull docker and run as a deamon