Skip to content

Instantly share code, notes, and snippets.

View TareqMonwer's full-sized avatar

Tareq Monwer TareqMonwer

View GitHub Profile
@TareqMonwer
TareqMonwer / react-redux-resources.md
Created August 29, 2021 09:20 — forked from azs06/react-redux-resources.md
List of resources to learn react and it's ecosystem
@TareqMonwer
TareqMonwer / countries
Created December 19, 2020 20:47 — forked from kalinchernev/countries
Plain text list of countries
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria
@TareqMonwer
TareqMonwer / django_deploy.md
Created December 8, 2020 15:47 — forked from bradtraversy/django_deploy.md
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

@TareqMonwer
TareqMonwer / cloudSettings
Last active October 15, 2020 11:37
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-08-13T09:14:01.908Z","extensionVersion":"v3.4.3"}
Collecting uwsgi
Using cached uWSGI-2.0.19.1.tar.gz (803 kB)
Building wheels for collected packages: uwsgi
Building wheel for uwsgi (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/tareq/.local/share/virtualenvs/MovieGeek-r2NSDv-Q/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tabfsai5/uwsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tabfsai5/uwsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-rdsjwfs1
cwd: /tmp/pip-install-tabfsai5/uwsgi/
Complete output (116 lines):
/usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'descriptions'
warnings.warn(msg)
public class AreaOfTriangle {
public static void main(String[] args) {
double base = 5;
double vh = 5;
double area = base * vh / 2;
System.out.println("Area = "+area);
}
class Complex {
// A normal parametrized constructor
public Complex() {
System.out.println("Normal Constructor");
}
// copy constructor
Complex(Complex c) {
System.out.println("Copy constructor");
public class Quadric {
public void static main(String[] args) {
int a = 10;
int b = 12;
int c = 15;
double r1 = (-b + Math.sqrt(b * b - 4 * a * c)) / (2 * a);
double r2 = (-b - Math.sqrt(b * b - 4 * a * c)) / (2 * a);
System.out.println("First root = " + r1);
System.out.println("Second root = " + r2);
}
class DisplayOverloading
{
public void disp(char c)
{
System.out.println(c);
}
public void disp(char c, int num)
{
System.out.println(c + " "+num);
}
1. pip install -r requirements.txt
2. python manage.py migrate
3. python manage.py runserver