Skip to content

Instantly share code, notes, and snippets.

View masroore's full-sized avatar

Masroor Ehsan masroore

  • Apex Biotech Ltd.
  • /dev/null
View GitHub Profile
@masroore
masroore / README.md
Created May 14, 2024 03:22 — forked from eusonlito/README.md
Laravel Auth and Session without database. Using a remote API as Auth and Data provider.

This is an example of a web that uses a remote API as a database wrapper.

The remote API is stateless and the web uses cookies to maintain session persistence.

The API authentication endpoint returns a TOKEN that allows the web to make each request to the API with the user authentication header.


Este es un ejemplo de web que usa una API remota como wrapper de base de datos.

const pw = require('playwright');
const UserAgent = require('user-agents');
const uuid = require('uuid');
const tmp = require('tmp-promise');
const UINT32_MAX = (2 ** 32) - 1;
const WEBGL_RENDERERS = ['ANGLE (NVIDIA Quadro 2000M Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (NVIDIA Quadro K420 Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (NVIDIA Quadro 2000M Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (NVIDIA Quadro K2000M Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (ATI Radeon HD 3800 Series Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (AMD Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D
@masroore
masroore / multi-download-threadpool.py
Created March 13, 2023 05:20
Download Multiple Files Concurrently in Python
import requests
from multiprocessing.pool import ThreadPool
def download_url(url):
print("downloading: ",url)
# assumes that the last segment after the / represents the file name
# if url is abc/xyz/file.txt, the file name will be file.txt
file_name_start_pos = url.rfind("/") + 1
file_name = url[file_name_start_pos:]
@masroore
masroore / mern-server-setup.md
Created June 21, 2022 20:44 — forked from bradtraversy/mern-server-setup.md
Setup Ubuntu & Deploy MERN app

Linux Server Setup & MERN App Deployment

These are the steps to setup an Ubuntu server from scratch and deploy a MERN app with the PM2 process manager and Nginx. We are using Linode, but you could just as well use a different cloud provider or your own machine or VM.

Create an account at Linode

Click on Create Linode

Choose your server options (OS, region, etc)

SSH Keys

SQL Server 2017
----------------
Enterprise Core - 6GPYM-VHN83-PHDM2-Q9T2R-KBV83
Developer - 22222-00000-00000-00000-00000
Enterprise - TDKQD-PKV44-PJT4N-TCJG2-3YJ6B
Standard - PHDV4-3VJWD-N7JVP-FGPKY-XBV89
Web - WV79P-7K6YG-T7QFN-M3WHF-37BXC
https://www.teamos-hkrg.com/index.php?threads/microsoft-sql-server-english-2017-rtm-teamos.42103/
@masroore
masroore / wg_install.sh
Created June 1, 2020 10:05 — forked from Anachron/wg_install.sh
A script to spin up a Wireguard VPN server with Unbound recursive DNS in a hurry
#!/bin/bash
# This file is designed to spin up a Wireguard VPN quickly and easily,
# including configuring a recursive local DNS server using Unbound
#
# Make sure to change the public/private keys before running the script
# Also change the IPs, IP ranges, and listening port if desired
# iptables-persistent currently requires user input
# add wireguard repo
sudo add-apt-repository ppa:wireguard/wireguard -y
Keyword Searches Competition Bid
how to train a dog 12100 0.54 1.63
how to train your dog 12100 0.48 1.47
blue dog training 8100 0.17 0.41
how to house train a dog 4400 0.41 0.79
dog training videos 3600 0.82 2.18
petsmart dog training 3600 0.3 0.75
dog training equipment 2900 0.99 1.29
training dogs 2900 0.85 2.14
gun dog training 2900 0.6 1.21
@masroore
masroore / CMakeLists.txt
Created January 6, 2015 18:35
OpenALPR-net cmake files
PROJECT(openalpr-net)
SET(PROJECT_NAME "openalpr-net")
#set(CMAKE_BUILD_TYPE Debug)
CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
# Set the OpenALPR version in cmake, and also add it as a DEFINE for the code to access
SET(OPENALPR_MAJOR_VERSION "2")
SET(OPENALPR_MINOR_VERSION "0")
SET(OPENALPR_PATCH_VERSION "0")
from __future__ import absolute_import
import multiprocessing
import Queue
from grab.spider.error import FatalError
class WorkerBackendInterface(self):
pass
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import time
from grab.error import GrabNetworkError, GrabTimeoutError
from grab.spider import Spider, Task
import lxml.html
import random