Skip to content

Instantly share code, notes, and snippets.

View iam-mhaseeb's full-sized avatar
🧑‍💻
Passionate Software Engineer

Muhammad Haseeb iam-mhaseeb

🧑‍💻
Passionate Software Engineer
View GitHub Profile
@iam-mhaseeb
iam-mhaseeb / EDX_ DJANGO_EMAIL_CONFIGURATIONS.md
Last active April 22, 2020 07:36 — forked from asadmanzoor93/EDX_ DJANGO_EMAIL_CONFIGURATIONS.md
Guide to enable django email service in edX locally

To Enable Django Email Service Locally:

  • First you need valid Gmail Account
  • edX installed on your local system in docker

Steps to Follow:

  1. Go to devstack.py located at lms/env/ and cms/env.
  2. Find the EMAIL_BACKEND flag and change it to 'django.core.mail.backends.smtp.EmailBackend
  3. Add few more flags:
@iam-mhaseeb
iam-mhaseeb / readme.md
Created February 27, 2021 18:59
Host wordpress site on heroku for free lifetime.
@iam-mhaseeb
iam-mhaseeb / skytrax.sql
Created April 15, 2021 10:09
Skytrax Database
This file has been truncated, but you can view the full file.
-- Database recreation
DROP DATABASE IF EXISTS skytrax;
CREATE DATABASE skytrax;
USE skytrax;
--Tables recreation
DROP TABLE IF EXISTS public.airline;
DROP TABLE IF EXISTS public.airport;
DROP TABLE IF EXISTS public.lounge;
DROP TABLE IF EXISTS public.seat;
@iam-mhaseeb
iam-mhaseeb / gist:1e09485444d9aa384a1e61c86b1fd3de
Created January 5, 2022 16:58 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@iam-mhaseeb
iam-mhaseeb / slackmojis_downloader.py
Created January 31, 2022 09:40
Slackmojis.com Downloader
import os
import sys
import requests
from bs4 import BeautifulSoup
def show_arg():
req = requests.get(sys.argv[1])
import re
import logging
import requests
from bs4 import BeautifulSoup
from collections import deque
from urllib.parse import urlsplit
from urllib.parse import urlparse
LOGGER = logging.getLogger(__name__)
@iam-mhaseeb
iam-mhaseeb / routing.ts
Created March 4, 2022 06:29
Manual Routing
{
component: AppComponent,
path: '',
canActivate: [LoggedInGuard],
loadChildren: () => import('./homepage/homepage.module').then(m => m.HomepageModule)
},
-- Schema recreation
create schema if not exists skytrax;
--Tables recreation
DROP TABLE IF EXISTS skytrax.airline;
DROP TABLE IF EXISTS skytrax.airport;
DROP TABLE IF EXISTS skytrax.lounge;
DROP TABLE IF EXISTS skytrax.seat;
CREATE TABLE IF NOT EXISTS skytrax.airline(
airline_name VARCHAR(100) DEFAULT 'Unknown',
link VARCHAR(100) DEFAULT 'Unknown',
title VARCHAR(150) DEFAULT 'Unknown',
COPY skytrax.airline
FROM 's3://redshift-data-movement/airline.csv'
CREDENTIALS 'aws_access_key_id=XXXXXXXXXX;aws_secret_access_key=XXXXXXXXXX'
FORMAT as csv
IGNOREHEADER 1
TRUNCATECOLUMNS;