Skip to content

Instantly share code, notes, and snippets.

View Talhafayyaz11's full-sized avatar
🎯
Focusing

Talhafayyaz Talhafayyaz11

🎯
Focusing
View GitHub Profile
sudo kill -9 $(sudo lsof -t -i:9001)
var MongoClient = require('mongodb').MongoClient;
var DbConnection = function () {
var db = null;
var instance = 0;
async function DbConnect() {
try {
let url = 'mongodb://myurl.blablabla';
export PATH=/opt/homebrew/bin:$PATH
@Talhafayyaz11
Talhafayyaz11 / ubuntu commands
Created September 27, 2021 09:08
Ubuntu common commands
To change permission of folder:
- sudo chmod -R 777 node_module
name: Lighthouse Check
on: [pull_request]
jobs:
lighthouse-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: mkdir /tmp/artifacts
- name: Run Lighthouse
version: "3"
services:
finance_sql:
container_name: tx_sqlserver
restart: "always"
image: mcr.microsoft.com/mssql/server:2017-latest-ubuntu
environment:
SA_PASSWORD: "P@ssw0rd"
ACCEPT_EULA: "Y"
MSSQL_PID: "Express"
version: "3"
services:
tx_postgres:
container_name: tx_postgres
restart: always
image: mdillon/postgis:11-alpine
volumes:
- ./data-dir:/var/lib/postgresql/data
ports:
- "5432:5432"
@Talhafayyaz11
Talhafayyaz11 / gist:f7795b4741cd2e730ff2cf22e603cc58
Created June 11, 2021 10:34
GET REMOTE ACCESS TO SSH HOST
ssh -i pemFile.pem userName@ipv6
DOCKER COMMANDS:
1. List all docker containers
- COMMAND: docker ps -a
2. Docker logs
- COMMANDS: docker logs [OPTIONS] CONTAINER
3. To remove all docker containers:
- COMMAND: docker system prune -a --volumes
- WARNING! This will remove:
@Talhafayyaz11
Talhafayyaz11 / ssh.txt
Created September 11, 2020 11:57
ssh commands
To start fresh agent: eval "$(ssh-agent -s)"
Root ssh path: ssh-add ~/.ssh/limbik_key